Top Description Fields Constructors Methods
org.apache.pdfbox.pdmodel.fdf

public Class FDFDictionary

extends Object
implements COSObjectable
Class Inheritance
All Implemented Interfaces
org.apache.pdfbox.pdmodel.common.COSObjectable
Imports
java.io.IOException, .Writer, java.util.ArrayList, .List, org.apache.commons.logging.Log, .LogFactory, org.apache.pdfbox.cos.COSArray, .COSDictionary, .COSName, .COSStream, .COSString, org.apache.pdfbox.pdmodel.common.COSObjectable, .COSArrayList, org.apache.pdfbox.pdmodel.common.filespecification.PDFileSpecification, .PDSimpleFileSpecification, org.w3c.dom.Element, .Node, .NodeList

This represents an FDF dictionary that is part of the FDF document.
Author
Ben Litchfield

Field Summary

Modifier and TypeField and Description
private final COSDictionary
private static final Log

Constructor Summary

AccessConstructor and Description
public
FDFDictionary()

Default constructor.

public
FDFDictionary(COSDictionary
The FDF documents catalog.
fdfDictionary
)

Constructor.

public
FDFDictionary(Element
The XML document that contains the XFDF data.
fdfXML
)

This will create an FDF dictionary from an XFDF XML document.

Method Summary

Modifier and TypeMethod and Description
public List<FDFAnnotation>

Returns:

A list of FDF annotations.
getAnnotations
()

This will get the list of FDF Annotations.

public COSDictionary

Returns:

The cos object that matches this Java object.
getCOSObject
()

Implements org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

Convert this standard java object to a COS object.

public COSStream

Returns:

The differences entry of the FDF dictionary.
getDifferences
()

This will get the incremental updates since the PDF was last opened.

public List<PDFileSpecification>

Returns:

A list of embedded FDF files.
getEmbeddedFDFs
()

This will get the list of embedded FDF entries, or null if the entry is null.

public String

Returns:

The encoding value.
getEncoding
()

The encoding to be used for a FDF field.

public List<FDFField>

Returns:

A list of FDF fields.
getFields
()

This will get the list of FDF Fields.

public PDFileSpecification

Returns:

The F entry of the FDF dictionary.
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.

public COSArray

Returns:

The FDF ID.
getID
()

This is the FDF id.

public FDFJavaScript

Returns:

The java script entry describing javascript commands.
getJavaScript
()

This will get the java script entry.

public List<FDFPage>

Returns:

A list of FDF pages.
getPages
()

This will get the list of FDF Pages.

public String

Returns:

The status.
getStatus
()

This will get the status string to be displayed as the result of an action.

public String

Returns:

The target frame.
getTarget
()

This will get the target frame in the browser to open this document.

public final void
setAnnotations(List<FDFAnnotation>
The list of annotations.
annots
)

This will set the list of annotations.

public void
setDifferences(COSStream
The new differences stream.
diff
)

This will set the differences stream.

public void
setEmbeddedFDFs(List<PDFileSpecification>
The list of embedded FDFs.
embedded
)

This will set the list of embedded FDFs.

public void
setEncoding(String
The new encoding.
encoding
)

This will set the encoding.

public final void
setFields(List<FDFField>
The list of fields.
fields
)

This will set the list of fields.

public final void
setFile(PDFileSpecification
The file specification.
fs
)

This will set the file specification.

public final void
setID(COSArray
The new id for the FDF.
id
)

This will set the FDF id.

public void
setJavaScript(FDFJavaScript
The javascript entries.
js
)

This will set the JavaScript entry.

public void
setPages(List<FDFPage>
The list of pages.
pages
)

This will set the list of pages.

public void
setStatus(String
The new status string.
status
)

This will set the status string.

public void
setTarget(String
The new target frame.
target
)

This will set the target frame in the browser to open this document.

public void
writeXML(Writer
The stream to write the xml to.
output
)

This will write this element as an XML document.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fdfback to summary
private final COSDictionary fdf
LOGback to summary
private static final Log LOG

Constructor Detail

FDFDictionaryback to summary
public FDFDictionary()

Default constructor.

FDFDictionaryback to summary
public FDFDictionary(COSDictionary fdfDictionary)

Constructor.

Parameters
fdfDictionary:COSDictionary

The FDF documents catalog.

FDFDictionaryback to summary
public FDFDictionary(Element fdfXML)

This will create an FDF dictionary from an XFDF XML document.

Parameters
fdfXML:Element

The XML document that contains the XFDF data.

Method Detail

getAnnotationsback to summary
public List<FDFAnnotation> getAnnotations() throws IOException

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:List<FDFAnnotation>

A list of FDF annotations.

Exceptions
IOException:
If there is an error creating the annotation list.
getCOSObjectback to summary
public COSDictionary getCOSObject()

Implements org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

Convert this standard java object to a COS object.

Returns:COSDictionary

The cos object that matches this Java object.

Annotations
@Override
getDifferencesback to summary
public COSStream getDifferences()

This will get the incremental updates since the PDF was last opened.

Returns:COSStream

The differences entry of the FDF dictionary.

getEmbeddedFDFsback to summary
public List<PDFileSpecification> getEmbeddedFDFs() throws IOException

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:List<PDFileSpecification>

A list of embedded FDF files.

Exceptions
IOException:
If there is an error creating the file spec.
getEncodingback to summary
public String getEncoding()

The encoding to be used for a FDF field. The default is PDFDocEncoding and this method will never return null.

Returns:String

The encoding value.

getFieldsback to summary
public List<FDFField> getFields()

This will get the list of FDF Fields. This will return a list of FDFField objects.

Returns:List<FDFField>

A list of FDF fields.

getFileback to summary
public PDFileSpecification getFile() throws IOException

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:PDFileSpecification

The F entry of the FDF dictionary.

Exceptions
IOException:
If there is an error creating the file spec.
getIDback to summary
public COSArray getID()

This is the FDF id.

Returns:COSArray

The FDF ID.

getJavaScriptback to summary
public FDFJavaScript getJavaScript()

This will get the java script entry.

Returns:FDFJavaScript

The java script entry describing javascript commands.

getPagesback to summary
public List<FDFPage> getPages()

This will get the list of FDF Pages. This will return a list of FDFPage objects.

Returns:List<FDFPage>

A list of FDF pages.

getStatusback to summary
public String getStatus()

This will get the status string to be displayed as the result of an action.

Returns:String

The status.

getTargetback to summary
public String getTarget()

This will get the target frame in the browser to open this document.

Returns:String

The target frame.

setAnnotationsback to summary
public final void setAnnotations(List<FDFAnnotation> annots)

This will set the list of annotations. This should be a list of FDFAnnotation objects.

Parameters
annots:List<FDFAnnotation>

The list of annotations.

setDifferencesback to summary
public void setDifferences(COSStream diff)

This will set the differences stream.

Parameters
diff:COSStream

The new differences stream.

setEmbeddedFDFsback to summary
public void setEmbeddedFDFs(List<PDFileSpecification> embedded)

This will set the list of embedded FDFs. This should be a list of PDFileSpecification objects.

Parameters
embedded:List<PDFileSpecification>

The list of embedded FDFs.

setEncodingback to summary
public void setEncoding(String encoding)

This will set the encoding.

Parameters
encoding:String

The new encoding.

setFieldsback to summary
public final void setFields(List<FDFField> fields)

This will set the list of fields. This should be a list of FDFField objects.

Parameters
fields:List<FDFField>

The list of fields.

setFileback to summary
public final void setFile(PDFileSpecification fs)

This will set the file specification.

Parameters
fs:PDFileSpecification

The file specification.

setIDback to summary
public final void setID(COSArray id)

This will set the FDF id.

Parameters
id:COSArray

The new id for the FDF.

setJavaScriptback to summary
public void setJavaScript(FDFJavaScript js)

This will set the JavaScript entry.

Parameters
js:FDFJavaScript

The javascript entries.

setPagesback to summary
public void setPages(List<FDFPage> pages)

This will set the list of pages. This should be a list of FDFPage objects.

Parameters
pages:List<FDFPage>

The list of pages.

setStatusback to summary
public void setStatus(String status)

This will set the status string.

Parameters
status:String

The new status string.

setTargetback to summary
public void setTarget(String target)

This will set the target frame in the browser to open this document.

Parameters
target:String

The new target frame.

writeXMLback to summary
public void writeXML(Writer output) throws IOException

This will write this element as an XML document.

Parameters
output:Writer

The stream to write the xml to.

Exceptions
IOException:
If there is an error writing the XML.