List of usage examples for com.lowagie.text.pdf PdfName EMBEDDEDFILES
PdfName EMBEDDEDFILES
To view the source code for com.lowagie.text.pdf PdfName EMBEDDEDFILES.
Click Source Link
From source file:org.sejda.impl.itext.component.PdfUnpacker.java
License:Apache License
private Set<PdfDictionary> getEmbeddedFilesDictionaries(PdfReader reader) { Set<PdfDictionary> retSet = new NullSafeSet<PdfDictionary>(); PdfDictionary catalog = reader.getCatalog(); PdfDictionary names = (PdfDictionary) PdfReader.getPdfObject(catalog.get(PdfName.NAMES)); if (names != null) { PdfDictionary embFiles = (PdfDictionary) PdfReader.getPdfObject(names.get(PdfName.EMBEDDEDFILES)); if (embFiles != null) { @SuppressWarnings("unchecked") HashMap<String, PdfObject> embMap = PdfNameTree.readTree(embFiles); for (PdfObject value : embMap.values()) { retSet.add((PdfDictionary) PdfReader.getPdfObject(value)); }// ww w . j av a 2s . c o m } } return retSet; }