File Formats

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Enum PdfFilePathType

    Show / Hide Table of Contents

    Enum PdfFilePathType

    Specifies the file path type.

    Namespace: Syncfusion.Pdf.Interactive
    Assembly: Syncfusion.Pdf.Base.dll
    Syntax
    public enum PdfFilePathType
    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Creates a new page and adds it as the last page of the document
    PdfPage page = document.Pages.Add();
    //Create a new PdfButtonField.
    PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
    //Set the bounds to submitButton.
    submitButton.Bounds = new RectangleF(25, 160, 100, 20);
    //Set the submit button text.
    submitButton.Text = "Launch";
    //Create a new PdfLaunchAction and set the PdfFilePathType.
    PdfLaunchAction launchAction = new PdfLaunchAction(@"..\..\Data\Sample.txt",PdfFilePathType.Absolute);
    //Set the actions to submit button.
    submitButton.Actions.GotFocus = launchAction;
    //Save document to disk.
    document.Save("ActionDestination.pdf");
    document.Close(true);
    'Create a new PDF document.
    Dim document As PdfDocument = New PdfDocument()
    'Creates a new page and adds it as the last page of the document
    Dim page As PdfPage = document.Pages.Add()
    'Create a new PdfButtonField.
    Dim submitButton As PdfButtonField  = New PdfButtonField(page, "submitButton")
    'Set the bounds to submit button.
    submitButton.Bounds = New RectangleF(25, 160, 100, 20)
    'Set the submit button text.
    submitButton.Text = "Launch"
    'Create a new PdfLaunchAction and set the PdfFilePathType.
    Dim launchAction As PdfLaunchAction  = new PdfLaunchAction(@"..\..\Data\Sample.txt",PdfFilePathType.Absolute)
    'Set the actions to submit button.
    submitButton.Actions.GotFocus = launchAction
    'Save document to disk.
    document.Save("ActionDestination.pdf")
    document.Close(True)

    Fields

    Name Description
    Absolute

    Specifies the location, including the domain name.

    Relative

    Specifies the file location with out including the domain name.

    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved