pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John, Georgy" <gj...@onenetwork.com>
Subject Decrypting secured PDFs with PDFBox 2.0.0
Date Wed, 10 Feb 2016 21:46:13 GMT
Hi,

I'm trying to load a PDF template,  that is secured with a password, and using the template
I will be outputting a modified version of the said PDF template. Unfortunately, I don't think
I can share PDF due to security issues. I've attached a screen a shot of security settings
that are enabled.
I'm loading the template as such:
PDDocument pdfDocument = PDDocument.load(new File(formTemplate),password);

Password is a string, but whenever it reaches this point in the code, I get the following
error:

  Attribute: javax.servlet.error.exception = java.lang.NoSuchMethodError: org.apache.pdfbox.pdmodel.PDDocument.load(Ljava/io/File;Ljava/lang/String;)Lorg/apache/pdfbox/pdmodel/PDDocument;

Standard servlet exception values
  Error status code: 500
  Error message: org.apache.pdfbox.pdmodel.PDDocument.load(Ljava/io/File;Ljava/lang/String;)Lorg/apache/pdfbox/pdmodel/PDDocument;
  Exception type: java.lang.NoSuchMethodError

A method that accepts the said parameters does exist, what exactly is going wrong?

If I am approaching this the wrong to unlock a PDF, what is the correct way to do so in 2.0.0
version? How do I unlock/decrypt this correctly so that the document catalog will be  available?...
I documentCatalog to be available to use the AcroForms.


Thanks,

Georgy


Mime
View raw message