.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

PdfDocument.OpenAction Property

Indicates an action to be performed when a document is opened.

Namespace: DevExpress.Pdf

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

Declaration

public PdfAction OpenAction { get; set; }

Property Value

Type Description
PdfAction

A PdfAction object that represents an action to be performed when a document is opened.

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);
}
See Also