API Reference
Class
PdfDocumentJavaScript
Explicit active-content operations for named document-level JavaScript.
Inheritance
- Object
- PdfDocumentJavaScript
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Property PdfDocument.JavaScript
Methods
public PdfJavaScriptEditResult AddOrReplace(String name, String script) #Returns:
PdfJavaScriptEditResultAdds a named script or replaces the source of an existing script with the same name.
Parameters
- name System.String
- script System.String
public PdfJavaScriptEditResult Clear() #Returns:
PdfJavaScriptEditResultRemoves every named document-level script.
public PdfJavaScriptEditResult Edit(Action<PdfJavaScriptEditSession> edit) #Returns:
PdfJavaScriptEditResultApplies a transactional named-script collection edit. JavaScript is active content and may execute in capable PDF viewers. The default sanitization policy removes authored scripts unless JavaScript is explicitly allowed.
Parameters
- edit System.Action{OfficeIMO.Pdf.PdfJavaScriptEditSession}
public IReadOnlyList<PdfJavaScript> List() #Returns:
IReadOnlyList<PdfJavaScript>Lists named document-level scripts and their exact source text.
public PdfJavaScriptEditResult Remove(String name) #Returns:
PdfJavaScriptEditResultRemoves a named script when it exists.
Parameters
- name System.String
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object