officefileapi-devexpress-dot-pdf-dot-pdfdocument-52fc4680.md
Indicates an action to be performed when a document is opened.
Namespace : DevExpress.Pdf
Assembly : DevExpress.Pdf.v25.2.Core.dll
NuGet Package : DevExpress.Pdf.Core
public PdfAction OpenAction { get; set; }
Public Property OpenAction As PdfAction
| Type | Description |
|---|---|
| PdfAction |
A PdfAction object that represents an action to be performed when a document is opened.
|
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
[PdfDocument Class](/OfficeFileAPI/DevExpress.Pdf.PdfDocument)
[PdfDocument Members](/OfficeFileAPI/DevExpress.Pdf.PdfDocument._members)
[DevExpress.Pdf Namespace](/OfficeFileAPI/DevExpress.Pdf)