Class
PdfDocumentJavaScript
OfficeIMO.Pdf
Explicit active-content operations for named document-level JavaScript.
Inheritance
- object
- PdfDocumentJavaScript
Usage
Explore 1 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 1
- Property PdfDocument.JavaScript
Methods
public PdfJavaScriptEditResult AddOrReplace(string name, string script) #Adds a named script or replaces the source of an existing script with the same name.
Parameters
- name string
- script string
Returns
PdfJavaScriptEditResultpublic PdfJavaScriptEditResult Clear() #Removes every named document-level script.
Returns
PdfJavaScriptEditResultpublic PdfJavaScriptEditResult Edit(Action<PdfJavaScriptEditSession> edit) #Applies 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>
Returns
PdfJavaScriptEditResultpublic IReadOnlyList<PdfJavaScript> List() #Lists named document-level scripts and their exact source text.
Returns
IReadOnlyList<PdfJavaScript>public PdfJavaScriptEditResult Remove(string name) #Removes a named script when it exists.
Parameters
- name string
Returns
PdfJavaScriptEditResult