Example usage for com.itextpdf.text.pdf PdfName FS

List of usage examples for com.itextpdf.text.pdf PdfName FS

Introduction

In this page you can find the example usage for com.itextpdf.text.pdf PdfName FS.

Prototype

PdfName FS

To view the source code for com.itextpdf.text.pdf PdfName FS.

Click Source Link

Document

A name

Usage

From source file:org.sejda.impl.itext5.component.PdfUnpacker.java

License:Open Source License

private Set<PdfDictionary> getFileAttachmentsDictionaries(PdfReader reader) {
    Set<PdfDictionary> retSet = new NullSafeSet<PdfDictionary>();
    for (int k = 1; k <= reader.getNumberOfPages(); ++k) {
        PdfArray annots = reader.getPageN(k).getAsArray(PdfName.ANNOTS);
        if (annots != null) {
            for (PdfObject current : annots) {
                PdfDictionary annot = (PdfDictionary) PdfReader.getPdfObject(current);
                if (PdfName.FILEATTACHMENT.equals(annot.getAsName(PdfName.SUBTYPE))) {
                    retSet.add(annot.getAsDict(PdfName.FS));
                }//from   w w w.  ja v a  2s.  co m
            }
        }
    }
    return retSet;
}