List of usage examples for com.lowagie.text.pdf PdfName F
PdfName F
To view the source code for com.lowagie.text.pdf PdfName F.
Click Source Link
From source file:org.sejda.impl.itext.component.PdfUnpacker.java
License:Apache License
private void unpack(Set<PdfDictionary> dictionaries) throws TaskIOException { for (PdfDictionary dictionary : dictionaries) { PdfName type = (PdfName) PdfReader.getPdfObject(dictionary.get(PdfName.TYPE)); if (PdfName.F.equals(type) || PdfName.FILESPEC.equals(type)) { PdfDictionary ef = (PdfDictionary) PdfReader.getPdfObject(dictionary.get(PdfName.EF)); PdfString fn = (PdfString) PdfReader.getPdfObject(dictionary.get(PdfName.F)); if (fn != null && ef != null) { PRStream prs = (PRStream) PdfReader.getPdfObject(ef.get(PdfName.F)); if (prs != null) { File tmpFile = copyToTemporaryFile(prs); outputWriter.addOutput(file(tmpFile).name(fn.toUnicodeString())); }/*from w w w . j a v a 2 s . c om*/ } } } }