Class FDFJavaScript

java.lang.Object
org.apache.pdfbox.pdmodel.fdf.FDFJavaScript
All Implemented Interfaces:
COSObjectable

public class FDFJavaScript extends Object implements COSObjectable
This represents an FDF JavaScript dictionary that is part of the FDF document.
Author:
Ben Litchfield
  • Constructor Details

    • FDFJavaScript

      public FDFJavaScript()
      Default constructor.
    • FDFJavaScript

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

    • getCOSObject

      public COSDictionary 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.
    • getBefore

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

      public void setBefore(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 String getAfter()
      This will get the javascript that is executed after the import.
      Returns:
      Some javascript code.
    • setAfter

      public void setAfter(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 Map<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(Map<String,PDActionJavaScript> map)
      Sets the dictionary's "Doc" entry.
      Parameters:
      map - Map of named "JavaScript" dictionaries.