sagarcool89
sagarcool89

Reputation: 1376

How to set owner password to existing PDF files?

Does anyone have an idea about how to set owner password to existing PDF files?

Upvotes: 0

Views: 518

Answers (1)

Michael Dautermann
Michael Dautermann

Reputation: 89569

CGPDFContextCreate takes a dictionary in which you can pass a owner password as one of the attributes.

The details for CGPDFContxtCreate you'll find in Apple's reference documents at:

http://developer.apple.com/library/ios/documentation/GraphicsImaging/Reference/CGPDFContext/Reference/reference.html#//apple_ref/c/func/CGPDFContextCreate

And the password setting information you'll find in Apple's docs here:

http://developer.apple.com/library/ios/documentation/GraphicsImaging/Reference/CGPDFContext/Reference/reference.html#//apple_ref/doc/constant_group/Auxiliary_Dictionary_Keys

Upvotes: 1

Related Questions