Table of Contents

Class PdfLoadedRichMediaAnnotation

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

Represents the loaded rich media annotation class.

public class PdfLoadedRichMediaAnnotation : PdfLoadedStyledAnnotation, INotifyPropertyChanged
Inheritance
PdfLoadedRichMediaAnnotation
Implements
Inherited Members

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

public PdfRichMediaActivationMode ActivationMode { get; set; }

Property Value

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

public PdfRichMediaContent Content { get; }

Property Value

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

public PdfRichMediaPresentationStyle PresentationStyle { get; set; }

Property Value

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()

Saves an annotation.

protected override void Save()