List of usage examples for com.itextpdf.text.pdf PdfNameTree readTree
public static HashMap<String, PdfObject> readTree(PdfDictionary dic)
From source file:org.sejda.impl.itext5.component.PdfUnpacker.java
License:Open Source License
private Set<PdfDictionary> getEmbeddedFilesDictionaries(PdfReader reader) { Set<PdfDictionary> retSet = new NullSafeSet<PdfDictionary>(); PdfDictionary catalog = reader.getCatalog(); PdfDictionary names = catalog.getAsDict(PdfName.NAMES); if (names != null) { PdfDictionary embFiles = names.getAsDict(PdfName.EMBEDDEDFILES); if (embFiles != null) { HashMap<String, PdfObject> embMap = PdfNameTree.readTree(embFiles); for (PdfObject value : embMap.values()) { retSet.add((PdfDictionary) PdfReader.getPdfObject(value)); }/*from w w w . j a va 2 s . c o m*/ } } return retSet; }