Web ptimization generated broken document

If you are a Power Builder developer and have any questions about using our products from Power Builder here is the place to post them.
Post Reply
akosko
Posts: 8
Joined: Mon Jan 06 2003

Web ptimization generated broken document

Post by akosko »

Hello !

I find out a problem using web optimization property. How is it possible that pdf converter generated each time a broken pdf document ? It is possible to see only the first several pages (15 pages) but not to see all the document. If I try to scroll down to other pages an error occcurs: "There was a problem reading this document(14)". I am using Acrobat Reader version 4 to display content of pdf documents.

Have you any idea what went wrong every time I have generated the files?

Could you tell me how can I set FileNameOptionsEx up ?

Thanks.
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hello,

If you want to generate optimized pdf files you can call:

// FileNameOptionsEx = NoPrompt + UseFileName + Linearize

FileNameOptionsEx = 1 + 2 + 32768

Are you using the latest version of the PDF Converter? The latest release is 2.08a, please try to get the update from our site www.amyuni.com. It will most propbaply give you better resutls.

But, in case you are still facing similar problems with the new release please contact our Support support@amyuni.com and send them the original document and the pdf file generated by our driver so they can check this.

Have a nice day !
akosko
Posts: 8
Joined: Mon Jan 06 2003

Post by akosko »

Is this a function ? I have found a function named SetFileNameOptions but no function as SetFileNameOptionsEx in CDINTF.DLL. I have written a few days ago that I am using a power builder component to call external function of this library. Here is several lines from it:
//String name of printer
ls_PrinterName = 'Amyuni PDFWriter'

//holder printer
ll_PDFPrinter = DriverInit ( ls_PrinterName )


IF ll_PDFPrinter <= 0 THEN

SetDefaultPrinter ( ll_PDFPrinter )

SetDefaultFileName ( ll_PDFPrinter, as_outputfile)

SetFileNameOptions ( ll_PDFPrinter, NoPrompt + UseFileName +

LinearizeForWeb)

//printing data windows content
lds_data.Print ( false )

resettiong printer
SetFileNameOptions ( ll_PDFPrinter, 0 )

//close driver
DriverEnd ( ll_PDFPrinter )

all the string values are initialized before.

How can I set up FileNameOptionsEx if I cannot use any function to set it up ?
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Hi,

If you are using the DLL interface of CDintf, than you don't need to use FileNameOptionsEx. This is a method in the ActiveX interface only.

The code you are using seems to be fine. Are you facing any problems while running it?

Calling: SetFileNameOptions ( ll_PDFPrinter, 1 + 2 + 32768 ) should do the job.

Have a nice day !
akosko
Posts: 8
Joined: Mon Jan 06 2003

Post by akosko »

Hello,

I had no problem while runnig this code but when I try to access the generated file. It was the same result either I try it to open directly or from website using output stream. Pdf converter generated each time a broken pdf document. It is possible to see only the first several pages (15 pages) but not to see all the document. If I try to scroll down to other pages an error occcurs: "There was a problem reading this document(14)".

Thanks
Joan
Amyuni Team
Posts: 2799
Joined: Wed Sep 11 2002
Contact:

Post by Joan »

Please send your document to support@amyuni.com if possible please send both the original document and the pdf one. If not please send only the pdf file so they can check it more closely.

Thanks
akosko
Posts: 8
Joined: Mon Jan 06 2003

Post by akosko »

My further investigation shows me some different results and I believe that I finally find something may be crucial issue for us. When I click to file directly and I let windows to open file with associated program (that is Acrobat Reader) then the damaged file seems correct. It is the only way how can I open it without problems. It seems as the problem is in AcrobatReader plugin for Internet Explorer. I think so for now. I try to find out other way to test it more thoroughly. If I could not find some desirable result I will try to contact you again and then I will send you my generated file, too. Thank you for your patience.

With regards
dclayton
Posts: 8
Joined: Mon Apr 14 2003
Location: Houston
Contact:

Post by dclayton »

We use similar techniques for large documents all the time, and have never seen this. I think you are either picking up the document before it is compeltely spooled to the file and sending it to the browser, or something like that.
Post Reply