Class PdfLoadedRichMediaAnnotation
Represents the loaded rich media annotation class.
Inheritance
System.Object
PdfLoadedRichMediaAnnotation
Implements
System.ComponentModel.INotifyPropertyChanged
Inherited Members
Namespace: Syncfusion.Pdf.Interactive
Assembly: Syncfusion.Pdf.Portable.dll
Syntax
public class PdfLoadedRichMediaAnnotation : PdfLoadedStyledAnnotation, IPdfWrapper, INotifyPropertyChanged
Examples
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedRichMediaAnnotation richMediaAnnotation = document.Pages[0].Annotations[0] as PdfLoadedRichMediaAnnotation;
//Sets the rich media annotation activation mode
//richMediaAnnotation.ActivationMode=PdfRichMediaActivationMode.PageOpen;
//Sets the rich media annotation presentation style
//richMediaAnnotation.PresentationStyle=PdfRichMediaPresentationStyle.Windowed;
//Save the document.
document.Save("RichMediaAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim richMediaAnnotation As PdfLoadedRichMediaAnnotation = document.Pages(0).Annotations(0) as PdfLoadedRichMediaAnnotation
'Sets the rich media annotation activation mode
richMediaAnnotation.ActivationMode=PdfRichMediaActivationMode.PageOpen
'Sets the rich media annotation presentation style
richMediaAnnotation.PresentationStyle=PdfRichMediaPresentationStyle.Windowed
'Save the document.
document.Save("RichMediaAnnotation.pdf")
'close the document.
document.Close(True)
Properties
ActivationMode
Gets or sets the loaded rich media activation mode
Declaration
public PdfRichMediaActivationMode ActivationMode { get; set; }
Property Value
Type |
---|
PdfRichMediaActivationMode |
Examples
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedRichMediaAnnotation richMediaAnnotation = document.Pages[0].Annotations[0] as PdfLoadedRichMediaAnnotation;
Gets and sets the rich media activate mode
richMediaAnnotation.ActivationMode=PdfRichMediaActivationMode.PageOpen;
//Save the document.
document.Save("RichMediaAnnotation.pdf");
Close the document.
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim richMediaAnnotation As PdfLoadedRichMediaAnnotation = document.Pages(0).Annotations(0) as PdfLoadedRichMediaAnnotation
'Gets and sets the rich media activate mode
richMediaAnnotation.ActivationMode=PdfRichMediaActivationMode.PageOpen
'Save the document.
document.Save("RichMediaAnnotation.pdf")
'Close the document.
document.Close(True)
Content
Get the loaded rich media content
Declaration
public PdfRichMediaContent Content { get; }
Property Value
Type |
---|
PdfRichMediaContent |
Examples
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedRichMediaAnnotation richMediaAnnotation = document.Pages[0].Annotations[0] as PdfLoadedRichMediaAnnotation;
//Gets the content
var content = richMediaAnnotation.Content.Data;
//Save the content data
File.WriteAllBytes("RichMediaContent.mp4",(content as MemoryStream).ToArray());
//Save the document.
document.Save("RichMediaAnnotation.pdf");
Close the document.
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim richMediaAnnotation As PdfLoadedRichMediaAnnotation = document.Pages(0).Annotations(0) as PdfLoadedRichMediaAnnotation
'Gets the content
var content = richMediaAnnotation.Content.Data
Save the content data
File.WriteAllBytes("RichMediaContent.mp4",(content as MemoryStream).ToArray())
'Save the document.
document.Save("RichMediaAnnotation.pdf")
Close the document.
document.Close(True)
PresentationStyle
Gets or sets the presentation style
Declaration
public PdfRichMediaPresentationStyle PresentationStyle { get; set; }
Property Value
Type |
---|
PdfRichMediaPresentationStyle |
Examples
//Load an existing document.
PdfLoadedDocument document = new PdfLoadedDocument(@"..\..\Annotations.pdf");
//Gets the annotation from loaded document.
PdfLoadedRichMediaAnnotation richMediaAnnotation = document.Pages[0].Annotations[0] as PdfLoadedRichMediaAnnotation;
Gets and sets the rich media presentation style
richMediaAnnotation.PresentationStyle=PdfRichMediaPresentationStyle.Windowed;
//Save the document.
document.Save("RichMediaAnnotation.pdf");
document.Close(true);
'Load an existing document.
Dim document As New PdfLoadedDocument("..\..\Annotations.pdf")
'Gets the annotation from loaded document.
Dim richMediaAnnotation As PdfLoadedRichMediaAnnotation = document.Pages(0).Annotations(0) as PdfLoadedRichMediaAnnotation
'Gets and sets the rich media presentation style
richMediaAnnotation.PresentationStyle=PdfRichMediaPresentationStyle.Windowed
'Save the document.
document.Save("RichMediaAnnotation.pdf")
'close the document.
document.Close(True)
Methods
Save()
Declaration
protected override void Save()
Overrides
Implements
System.ComponentModel.INotifyPropertyChanged