Class FDFDictionary
java.lang.Object
org.apache.pdfbox.pdmodel.fdf.FDFDictionary
- All Implemented Interfaces:
COSObjectable
This represents an FDF dictionary that is part of the FDF document.
- Author:
- Ben Litchfield
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.FDFDictionary(COSDictionary fdfDictionary) Constructor.FDFDictionary(Element fdfXML) This will create an FDF dictionary from an XFDF XML document. -
Method Summary
Modifier and TypeMethodDescriptionThis will get the list of FDF Annotations.Convert this standard java object to a COS object.This will get the incremental updates since the PDF was last opened.This will get the list of embedded FDF entries, or null if the entry is null.The encoding to be used for a FDF field.This will get the list of FDF Fields.getFile()The source file or target file: the PDF document file that this FDF file was exported from or is intended to be imported into.getID()This is the FDF id.This will get the java script entry.getPages()This will get the list of FDF Pages.This will get the status string to be displayed as the result of an action.This will get the target frame in the browser to open this document.voidsetAnnotations(List<FDFAnnotation> annots) This will set the list of annotations.voidsetDifferences(COSStream diff) This will set the differences stream.voidsetEmbeddedFDFs(List<PDFileSpecification> embedded) This will set the list of embedded FDFs.voidsetEncoding(String encoding) This will set the encoding.voidThis will set the list of fields.voidThis will set the file specification.voidThis will set the FDF id.voidThis will set the JavaScript entry.voidThis will set the list of pages.voidThis will set the status string.voidThis will set the target frame in the browser to open this document.voidThis will write this element as an XML document.
-
Constructor Details
-
FDFDictionary
public FDFDictionary()Default constructor. -
FDFDictionary
Constructor.- Parameters:
fdfDictionary- The FDF documents catalog.
-
FDFDictionary
This will create an FDF dictionary from an XFDF XML document.- Parameters:
fdfXML- The XML document that contains the XFDF data.
-
-
Method Details
-
writeXML
This will write this element as an XML document.- Parameters:
output- The stream to write the xml to.- Throws:
IOException- If there is an error writing the XML.
-
getCOSObject
Convert this standard java object to a COS object.- Specified by:
getCOSObjectin interfaceCOSObjectable- Returns:
- The cos object that matches this Java object.
-
getFile
The source file or target file: the PDF document file that this FDF file was exported from or is intended to be imported into.- Returns:
- The F entry of the FDF dictionary.
- Throws:
IOException- If there is an error creating the file spec.
-
setFile
This will set the file specification.- Parameters:
fs- The file specification.
-
getID
-
setID
-
getFields
-
setFields
-
getStatus
This will get the status string to be displayed as the result of an action.- Returns:
- The status.
-
setStatus
This will set the status string.- Parameters:
status- The new status string.
-
getPages
-
setPages
-
getEncoding
The encoding to be used for a FDF field. The default is PDFDocEncoding and this method will never return null.- Returns:
- The encoding value.
-
setEncoding
This will set the encoding.- Parameters:
encoding- The new encoding.
-
getAnnotations
This will get the list of FDF Annotations. This will return a list of FDFAnnotation objects or null if the entry is not set.- Returns:
- A list of FDF annotations.
- Throws:
IOException- If there is an error creating the annotation list.
-
setAnnotations
This will set the list of annotations. This should be a list of FDFAnnotation objects.- Parameters:
annots- The list of annotations.
-
getDifferences
This will get the incremental updates since the PDF was last opened.- Returns:
- The differences entry of the FDF dictionary.
-
setDifferences
This will set the differences stream.- Parameters:
diff- The new differences stream.
-
getTarget
This will get the target frame in the browser to open this document.- Returns:
- The target frame.
-
setTarget
This will set the target frame in the browser to open this document.- Parameters:
target- The new target frame.
-
getEmbeddedFDFs
This will get the list of embedded FDF entries, or null if the entry is null. This will return a list of PDFileSpecification objects.- Returns:
- A list of embedded FDF files.
- Throws:
IOException- If there is an error creating the file spec.
-
setEmbeddedFDFs
This will set the list of embedded FDFs. This should be a list of PDFileSpecification objects.- Parameters:
embedded- The list of embedded FDFs.
-
getJavaScript
This will get the java script entry.- Returns:
- The java script entry describing javascript commands.
-
setJavaScript
This will set the JavaScript entry.- Parameters:
js- The javascript entries.
-