Skip to main content
.NET Framework 4.5.2+

PdfJavaScriptAction Class

Represents a JavaScript action that executes a script that is written in the JavaScript programming language.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v22.1.Core.dll

Declaration

public class PdfJavaScriptAction :
    PdfAction

Remarks

The code sample below sends a PDF document on print when the document is opened:

using (PdfDocumentProcessor pdfDocumentProcessor = new PdfDocumentProcessor())
{
    pdfDocumentProcessor.LoadDocument("Documents//Invoice.pdf");
    pdfDocumentProcessor.Document.OpenAction = 
        new PdfJavaScriptAction("this.print({bUI: true,bSilent: false,bShrinkToFit: true});this.closeDoc();", 
        pdfDocumentProcessor.Document);
}

Inheritance

Object
DevExpress.Pdf.Native.PdfDocumentItem
DevExpress.Pdf.Native.PdfObject
PdfAction
PdfJavaScriptAction
See Also