Class PdfAction
Represents base class for all action types.
Inheritance
System.Object
PdfAction
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Syncfusion.Pdf.Interactive
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public abstract class PdfAction : IPdfWrapper
Constructors
PdfAction()
Initializes a new instance of the PdfAction class.
Declaration
protected PdfAction()
Properties
Next
Gets or sets the next action to be performed after the action represented by this instance.
Declaration
public PdfAction Next { get; set; }
Property Value
Type | Description |
---|---|
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.
Declaration
protected virtual void Initialize()
See Also
Syncfusion.Pdf.IPdfWrapper