Table of Contents

Class PdfAction

Namespace
Syncfusion.Pdf.Interactive
Assembly
Syncfusion.Pdf.Portable.dll

Represents base class for all action types.

public abstract class PdfAction
Inheritance
PdfAction
Derived
Inherited Members

Constructors

PdfAction()

Initializes a new instance of the PdfAction class.

protected PdfAction()
See Also

Properties

Next

Gets or sets the next action to be performed after the action represented by this instance.

public PdfAction Next { get; set; }

Property Value

PdfAction

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 sound action.
 PdfSoundAction soundAction = new PdfSoundAction(@"startup.wav");
 soundAction.Sound.Bits = 16;
 soundAction.Sound.Channels = PdfSoundChannels.Stereo;
 soundAction.Sound.Encoding = PdfSoundEncoding.Signed;
 soundAction.Volume = 0.9f;
 soundAction.Mix = true;
 //Create a new PdfUriAction.
 PdfUriAction uriAction = new PdfUriAction("http://www.google.com");
 //Set the next action to the soundAction.
 soundAction.Next = uriAction;
 //Set the action.
 document.Actions.AfterOpen = soundAction;
 //Save document to disk.
 document.Save("output.pdf");
 //close the document.
 document.Close(true);
'Create a new PDF document.
Dim document As 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 sound action.
Dim soundAction As New PdfSoundAction("startup.wav")
soundAction.Sound.Bits = 16
soundAction.Sound.Channels = PdfSoundChannels.Stereo
soundAction.Sound.Encoding = PdfSoundEncoding.Signed
soundAction.Volume = 0.9F
soundAction.Mix = True
'Create a new PdfUriAction.
Dim uriAction As New PdfUriAction("http://www.google.com")
'Set the next action to the soundAction.
soundAction.[Next] = uriAction
'Set the action.
document.Actions.AfterOpen = soundAction
'Save document to disk.
document.Save("output.pdf")
'close the document.
document.Close(True)
See Also

Methods

Initialize()

Initializes an instance.

protected virtual void Initialize()
See Also

See Also