Am 15.05.2015 um 13:01 schrieb Andrei Petru Mura:
Hi,

Can anyone provied me an example on how to read attachments from a pdf file?

Here is my code, that thrown NullPointerException:

PDDocument document = new PDDocument();
document.load(new File("/path/to/file.pdf"));

use

PDDocument document = PDDocument.load(new File("/path/to/file.pdf"));


About the test - please see the ExtractEmbeddedFiles example from the source code:

https://svn.apache.org/viewvc/pdfbox/branches/1.8/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/ExtractEmbeddedFiles.java?view=markup&sortby=date

another example is in the TestSymmetricKeyEncryption.java file, this is a unit test.

Tilman


document.getDocumentCatalog().getNames().getEmbeddedFiles();

Can anyone provide me a short example?

Thanks,
Andrei



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to