Am 18.11.2016 um 11:58 schrieb SAMUEL CRUZ JIMENEZ:
Hello,
I do not know how to solve the problem:
What is the problem, i.e. what were you attempting to do, what were you
expecting and what happened instead? Extract attachments from a PDF?
Have you looked at the ExtractEmbeddedFiles.java program from the source
code download? If it didn't work, can you upload the PDF somewhere?
Tilman
PDDocumentNameDictionary names = catalog.getNames
PDEmbeddedFilesNameTreeNode embeddedFiles = names.getEmbeddedFiles();
if (embeddedFiles != null){
Map<String,Object> embeddedFileNames = embeddedFiles.getNames();
Set<String> keys = embeddedFileNames.keySet();
Iterator<String> iterator = keys.iterator();
while (iterator.hasNext()) {
String next = iterator.next();
System.out.println("name: " + next);
}
}
Result:
name: Untitled Object 1
name: Untitled Object 2
name: Untitled Object 3
name: Untitled Object 4
name: Untitled Object 5
I use the library "pdfbox-app-2.0.3"
Can you help me please?
Thanks and best regards
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]