Package com.evopdf

# Class PdfActionJavaScript

java.lang.Object
com.evopdf.PdfAction
com.evopdf.PdfActionJavaScript

public class PdfActionJavaScript extends PdfAction
Represents a JavaScript action in the PDF document

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PdfActionJavaScript(String javaScript)`
  Creates a JavaScript action based on a JavaScript string

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `javaScriptCode()`
  Gets the JavaScript code executed by this action
  `void`
  `setJavaScriptCode(String javaScriptCode)`
  Sets the JavaScript code executed by this action

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### PdfActionJavaScript

    public PdfActionJavaScript(String javaScript) throws Exception
    Creates a JavaScript action based on a JavaScript string
    Parameters:
      `javaScript` - the JavaScript code
    Throws:
      `Exception` - an exception is thrown if the JavaScript code is null

- ## Method Details

  - ### javaScriptCode

    public String javaScriptCode()
    Gets the JavaScript code executed by this action
    Returns:
      the JavaScript code executed by this action

  - ### setJavaScriptCode

    public void setJavaScriptCode(String javaScriptCode)
    Sets the JavaScript code executed by this action
    Parameters:
      `javaScriptCode` - the JavaScript code executed by this action