Extract embedded files from a PDF
JPedal provides several methods to allow easy extraction of embedded files from a PDF. The original file is left untouched by this process.
Extract embedded files from a PDF with the Command-Line or another language
java -cp jpedal.jar org.jpedal.examples.acroform.ExtractEmbeddedFiles inputFile outputFolder
Extract embedded files from a PDF in Java
Static Convenience Methods
ExtractEmbeddedFiles.extractAllFilesFromPdf("inputFile.pdf", "outputFolder");
API Access Methods
ExtractEmbeddedFiles extract = new ExtractEmbeddedFiles("inputFile.pdf");
//extract.setPassword("password");
if (extract.openPDFFile()) {
if (extract.containsEmbeddedFiles()) {
extract.extractEmbeddedFiles("outputFolder");
}
if (extract.containsFilesAttachments()) {
extract.extractFileAttachments("outputFolder");
}
}
extract.closePDFfile();