org.pdfbox.pdmodel.fdf

Class FDFJavaScript

Implemented Interfaces:
COSObjectable

public class FDFJavaScript
extends java.lang.Object
implements COSObjectable

This represents an FDF JavaScript dictionary that is part of the FDF document.
Version:
$Revision: 1.4 $
Author:
Ben Litchfield

Constructor Summary

FDFJavaScript()
Default constructor.
FDFJavaScript(COSDictionary javaScript)
Constructor.

Method Summary

PDTextStream
getAfter()
This will get the javascript that is executed after the import.
PDTextStream
getBefore()
This will get the javascript that is executed before the import.
COSDictionary
getCOSDictionary()
Convert this standard java object to a COS object.
COSBase
getCOSObject()
Convert this standard java object to a COS object.
List
getNamedJavaScripts()
This will return a list of PDNamedTextStream objects.
void
setAfter(PDTextStream after)
This will set the javascript code the will get execute after the import.
void
setBefore(PDTextStream before)
This will set the javascript code the will get execute before the import.
void
setNamedJavaScripts(List namedStreams)
This should be a list of PDNamedTextStream objects.

Constructor Details

FDFJavaScript

public FDFJavaScript()
Default constructor.

FDFJavaScript

public FDFJavaScript(COSDictionary javaScript)
Constructor.
Parameters:
javaScript - The FDF java script.

Method Details

getAfter

public PDTextStream getAfter()
This will get the javascript that is executed after the import.
Returns:
Some javascript code.

getBefore

public PDTextStream getBefore()
This will get the javascript that is executed before the import.
Returns:
Some javascript code.

getCOSDictionary

public COSDictionary getCOSDictionary()
Convert this standard java object to a COS object.
Returns:
The cos object that matches this Java object.

getCOSObject

public COSBase getCOSObject()
Convert this standard java object to a COS object.
Specified by:
getCOSObject in interface COSObjectable
Returns:
The cos object that matches this Java object.

getNamedJavaScripts

public List getNamedJavaScripts()
This will return a list of PDNamedTextStream objects. This is the "Doc" entry of the pdf document. These will be added to the PDF documents javascript name tree. This will not return null.
Returns:
A list of all named javascript entries.

setAfter

public void setAfter(PDTextStream after)
This will set the javascript code the will get execute after the import.
Parameters:
after - A reference to some javascript code.

setBefore

public void setBefore(PDTextStream before)
This will set the javascript code the will get execute before the import.
Parameters:
before - A reference to some javascript code.

setNamedJavaScripts

public void setNamedJavaScripts(List namedStreams)
This should be a list of PDNamedTextStream objects.
Parameters:
namedStreams - The named streams.