pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Lehmkuehler <andr...@lehmi.de>
Subject Re: Names of embedded files
Date Sat, 25 Aug 2012 16:45:42 GMT
Hi,

Am 03.08.2012 15:17, schrieb Czech, Christian:
> Hello,
>
> I'd like to get the names of embedded files in the PDF Document.
>
> My code:
> .....
> 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
>
> Who can help me?
I added a new example on how to extract embedded files. See [1] for further details.

> Thanks
> Christian
>
>
> ________________________________
>
> ELO Digital Office GmbH
> Firmensitz: Heilbronner Strasse 150, 70191 Stuttgart
> Fon: +49 711 806089-0, Fax: +49 711 806089-19, Web: www.elo.com
> Gesch?ftsf?hrer: Karl Heinz Mosbach, Matthias Thiele
> BW-Bank, Konto-Nr. 2089782, BLZ 600 501 01
> Registergericht Stuttgart HRB 15059 - USt-IdNr.: DE812471516


BR
Andreas Lehmkühler

[1] https://issues.apache.org/jira/browse/PDFBOX-1399



Mime
View raw message