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.
-
-
Field Summary
Fields Modifier and Type Field Description private COSDictionary
dictionary
-
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 java.lang.String
getAfter()
This will get the javascript that is executed after the import.java.lang.String
getBefore()
This will get the javascript that is executed before the import.COSDictionary
getCOSObject()
Convert this standard java object to a COS object.java.util.Map<java.lang.String,PDActionJavaScript>
getDoc()
Returns the dictionary's "Doc" entry, that is, a map of key value pairs to be added to the document's JavaScript name tree.void
setAfter(java.lang.String after)
This will set the javascript code the will get execute after the import.void
setBefore(java.lang.String before)
This will set the javascript code the will get execute before the import.void
setDoc(java.util.Map<java.lang.String,PDActionJavaScript> map)
Sets the dictionary's "Doc" entry.
-
-
-
Field Detail
-
dictionary
private final COSDictionary dictionary
-
-
Constructor Detail
-
FDFJavaScript
public FDFJavaScript()
Default constructor.
-
FDFJavaScript
public FDFJavaScript(COSDictionary javaScript)
Constructor.- Parameters:
javaScript
- The FDF java script.
-
-
Method Detail
-
getCOSObject
public COSDictionary getCOSObject()
Convert this standard java object to a COS object.- Specified by:
getCOSObject
in interfaceCOSObjectable
- Returns:
- The cos object that matches this Java object.
-
getBefore
public java.lang.String getBefore()
This will get the javascript that is executed before the import.- Returns:
- Some javascript code.
-
setBefore
public void setBefore(java.lang.String before)
This will set the javascript code the will get execute before the import.- Parameters:
before
- A reference to some javascript code.
-
getAfter
public java.lang.String getAfter()
This will get the javascript that is executed after the import.- Returns:
- Some javascript code.
-
setAfter
public void setAfter(java.lang.String after)
This will set the javascript code the will get execute after the import.- Parameters:
after
- A reference to some javascript code.
-
getDoc
public java.util.Map<java.lang.String,PDActionJavaScript> getDoc()
Returns the dictionary's "Doc" entry, that is, a map of key value pairs to be added to the document's JavaScript name tree.- Returns:
- Map of named "JavaScript" dictionaries.
-
setDoc
public void setDoc(java.util.Map<java.lang.String,PDActionJavaScript> map)
Sets the dictionary's "Doc" entry.- Parameters:
map
- Map of named "JavaScript" dictionaries.
-
-