EncryptPDFDocument and LinearizePDFDocument

If you are a C/C++/C# developer and have any questions about using our products from your application here is the place to post them.
Post Reply
yahoo2
Posts: 11
Joined: Fri Oct 22 2004

EncryptPDFDocument and LinearizePDFDocument

Post by yahoo2 »

Hello,

I've just implemented the two functions mentioned above.

Your documentation says, I have to use the EncryptPDFDocument function
first an then the LinearizePDFDocument function.
I've tested this, but in this order my Acrobat Reader 6 (german version) tells me that my document is not optimized for the web.

When I first set a password to an document, and after that I use the EncryptPDFDocument function, everything works fine.

Have I done something wrong?

Thanks,

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

Post by Joan »

Hello,

I didn't really get your question. Please let me know what do you mean by: "When I first set a password to an document, and after that I use the EncryptPDFDocument function, everything works fine."

Also I couldn't find where in the documentation we are mentioning that we should use EncryptPDFDocument than Linearization.

Please note that these two options can be set while generating the pdf document or after generating it. I guess you are encrypting the document and linearizing it using the Document Interface of CDintf, right?
yahoo2
Posts: 11
Joined: Fri Oct 22 2004

Post by yahoo2 »

Hi!

Well, let me help you 8) :D

Ok, I have a PDF-Document wich is generated wirt OpenOffice for example. On this document, I use the EncryptPDFDocument funtion to protect the PDF with a password. After that I use the LinearizePDFDocument funtion to optimize the Document for web view.
Page 58 of the documention (example) advise me to use the LinearizePDFDocument first, then set a password to the PDF.

Here it comes: I first set a password, and after that I optimized the same PDF-File. In this order my Acrobat Reader asks me for a password and shows me that the file is optimized for web view.

In the other case(First optimizing and then set the password, as documentation advises me) my Acrobat Reader ask me for a password, but the propertys of the document tells me that there is no web optimize.

So, what is the right order of the two functions?

Thanks for your answer,

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

Post by Joan »

Hello,

Thanks for your help 8)

In fact there shouldn't be a difference if you use linearization or encryption first.

I don't think the example on page 58 was ment to suggest to use Linearization first than Encryption, if this was the case there would be at least a note in the documentation about this.

I tried to Linearize a pdf file first than encrypt it. The generated file was both linearized and Encrypted so there doesn't seem to be an issue with the order of the functions.

If you wish please send your pdf file to our technical support support@amyuni.com to open a request and test with your own document and check what is going on.

Othewise, you can use Encryption than Linearization as this order is giving you the good output.

Hope this helps.
Last edited by Joan on Tue Feb 08 2005, edited 1 time in total.
yahoo2
Posts: 11
Joined: Fri Oct 22 2004

Thank you!

Post by yahoo2 »

Hi!

Cool 8)

Thanks for your support!

Yahoo
Post Reply