Class PdfLaunchAction
Represents an action which launches an application or opens or prints a document.
Inherited Members
Namespace: Syncfusion.Pdf.Interactive
Assembly: Syncfusion.Pdf.NET.dll
Syntax
public class PdfLaunchAction : PdfAction, IPdfWrapper
Remarks
This PdfLaunchAction class is used to allow the external file to execute. Please refer the UG docuemntation link https://help.syncfusion.com/file-formats/pdf/working-with-action#launch-action for more details.
Examples
//Create a new PDF document
PdfDocument document = new PdfDocument();
//Create and add new launch Action to the document
PdfLaunchAction action = new PdfLaunchAction("logo.png");
document.Actions.AfterOpen = action;
//Save the document
document.Save("LaunchAction.pdf");
document.Close(true);
'Create a new PDF document
Dim document As New PdfDocument()
'Create and add new launch Action to the document
Dim action As New PdfLaunchAction("logo.png")
document.Actions.AfterOpen = action
'Save the document
document.Save("LaunchAction.pdf")
document.Close(True)
Constructors
PdfLaunchAction(String)
Declaration
public PdfLaunchAction(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName |
Examples
//Create a new PDF document
PdfDocument document = new PdfDocument();
//Create and add new launch Action to the document
PdfLaunchAction action = new PdfLaunchAction("logo.png");
document.Actions.AfterOpen = action;
//Save the document
document.Save("LaunchAction.pdf");
document.Close(true);
'Create a new PDF document
Dim document As New PdfDocument()
'Create and add new launch Action to the document
Dim action As New PdfLaunchAction("logo.png")
document.Actions.AfterOpen = action
'Save the document
document.Save("LaunchAction.pdf")
document.Close(True)
See Also
PdfLaunchAction(String, PdfFilePathType)
Declaration
public PdfLaunchAction(string fileName, PdfFilePathType path)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | |
PdfFilePathType | path |
Examples
//Create a new PDF document
PdfDocument document = new PdfDocument();
//Create and add new launch Action to the document
PdfLaunchAction action = new PdfLaunchAction("../../Data/logo.png",PdfFilePathType.Absolute);
document.Actions.AfterOpen = action;
//Save the document
document.Save("LaunchAction.pdf");
document.Close(true);
'Create a new PDF document
Dim document As New PdfDocument()
'Create and add new launch Action to the document
Dim action As New PdfLaunchAction("../../Data/logo.png",PdfFilePathType.Absolute)
document.Actions.AfterOpen = action
'Save the document
document.Save("LaunchAction.pdf")
document.Close(True)
See Also
Properties
FileName
Declaration
public string FileName { get; set; }
Property Value
Type |
---|
System.String |
Examples
//Create a new PDF document
PdfDocument document = new PdfDocument();
//Create and add new launch Action to the document
PdfLaunchAction action = new PdfLaunchAction("logo.png");
//Get file name
string fileName = action.FileName;
document.Actions.AfterOpen = action;
//Save the document
document.Save("LaunchAction.pdf");
document.Close(true);
'Create a new PDF document
Dim document As New PdfDocument()
'Create and add new launch Action to the document
Dim action As New PdfLaunchAction("logo.png")
'Get file name
Dim fileName As String = action.FileName
document.Actions.AfterOpen = action
'Save the document
document.Save("LaunchAction.pdf")
document.Close(True)
See Also
Methods
Initialize()
Initializes instance.
Declaration
protected override void Initialize()