How do I remove PDF encryption?


I was able to bypass printing securities for the image extraction, but
wanted also to test the security removal. I could not find a sample of
how to do this. Please help me with the needed code to remove the
security of a PDF and save that PDF as a new PDF without security.

Please take a look at the following FAQ:
How do I remove PDF security?

The VB.NET translation could be as follows:

Dim doc as PDFDoc = new PDFDoc(“encrypted.pdf”)
doc.SetSecurityHandler(Nothing) ’ or something similar.
doc.Save(“out.pdf”, SDF.Doc.SaveOptions.e_linearized)

Is PDFTron able to remove third party or user security securities?


Using PDFNet you can remove any type of standard PDF security (e.g. 40-
bit RC4, 128-RC4, variable RC4, AES encryption, and all revisions of
standard security handler).

Using PDFNet you can also implement custom security handlers (by
deriving from SecurityHandler class) to process PDF documents with
custom security. Naturally PDFNet can't remove custom security unless
you register a handler/plugin with the same name (this is also true
for Acrobat or other third party solutions).