Package org.apache.pdfbox.pdmodel.fdf
Class FDFJavaScript
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.fdf.FDFJavaScript
-
- All 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
Constructors Constructor Description FDFJavaScript()
Default constructor.FDFJavaScript(COSDictionary javaScript)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.java.util.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(java.util.List namedStreams)
This should be a list of PDNamedTextStream objects.
-
-
-
Constructor Detail
-
FDFJavaScript
public FDFJavaScript()
Default constructor.
-
FDFJavaScript
public FDFJavaScript(COSDictionary javaScript)
Constructor.- Parameters:
javaScript
- The FDF java script.
-
-
Method Detail
-
getCOSObject
public COSBase getCOSObject()
Convert this standard java object to a COS object.- Specified by:
getCOSObject
in interfaceCOSObjectable
- Returns:
- The cos object that matches this Java object.
-
getCOSDictionary
public COSDictionary getCOSDictionary()
Convert this standard java object to a COS object.- Returns:
- The cos object that matches this Java object.
-
getBefore
public PDTextStream getBefore()
This will get the javascript that is executed before the import.- Returns:
- 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.
-
getAfter
public PDTextStream getAfter()
This will get the javascript that is executed after the import.- Returns:
- Some javascript code.
-
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.
-
getNamedJavaScripts
public java.util.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.
-
setNamedJavaScripts
public void setNamedJavaScripts(java.util.List namedStreams)
This should be a list of PDNamedTextStream objects.- Parameters:
namedStreams
- The named streams.
-
-