Quantcast
Channel: Adobe Community : Popular Discussions - PDF Language and Specifications
Viewing all articles
Browse latest Browse all 46145

PDF Encryption Help

$
0
0

Hi there,

 

I'm hoping someone may be kind enough to help with PDF Encryption. To give you an idea of what i am trying to do...

 

I have inherited an excel spreadsheet which creates PDF's from data returned in a worksheet from a report. It works by looping through the data and building up a string of PDFMark which then gets written to a file to create the PDF. It could be 1, 5 or a hundred pages long and it works fine if the code which encrypts it is turned off.

 

The problem arises when it attempts to encrypt the PDF but only if it is more than 3 pages long where it returns a error when you open the PDF saying 'wrong operand'. This seems to happen because the object number of the 4th page is 10 - it works for a 3 page doc where page 3 is object number 9 but if i change the object numbers so page 3 is object number 10 it suddenly stops working again.

 

I can only think that there is a problem with the encryption part and i desperately need to fix this but i am getting rather lost in the PDF reference manual and was hoping someone might be able to help explain, in simple terms, how to encrypt a PDF or if anyone out there has any sample code or knows of any 'idiot guides' to encrypting PDF's i could look at?

 

Any help would be hugely appreciated


Viewing all articles
Browse latest Browse all 46145

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>