SetaPDF_Core_Document_Action_JavaScript Class representing a JavaScript action

File: /SetaPDF v2/Core/Document/Action/JavaScript.php

Execute a JavaScript script. See PDF 32000-1:2008 - 12.6.4.16

Class hierarchy

Summary

Properties

$_actionDictionary


Static Methods


Methods

addNext()

Add an additional action to the next value of this action.

Parameters
$next : SetaPDF_Core_Type_Dictionary|SetaPDF_Core_Document_Action
 
Exceptions

Throws SetaPDF_Core_Type_Exception

getActionDictionary()

getIndirectObject()

Get the indirect object of this annotation or creates it in the specific document context.

Parameters
$document : SetaPDF_Core_Document

The document instance

getJavaScript()

public SetaPDF_Core_Document_Action_JavaScript::getJavaScript (
[ string $encodig = 'UTF-8' ]
): string

Get the JavaScript code.

Parameters
$encodig : string

The expected encoding of the JavaScript code.

getPdfValue()

Get the PDF value of this action.

getType()

public SetaPDF_Core_Document_Action::getType (
void
): string

Get the action type specified in the S key.

setIndirectObject()

Set the indirect object of this annotation.

Parameters
$indirectReference : SetaPDF_Core_Type_IndirectObjectInterface
 

setJavaScript()

public SetaPDF_Core_Document_Action_JavaScript::setJavaScript (
string $javaScript
): void

Set the JavaScript code.

Parameters
$javaScript : string

JavaScript in either PDFDocEncoding or UTF-16BE including BOM.