Class Pdf3DActivation
Represents the activation states for the 3D annotation.
Inheritance
Inherited Members
Namespace: Syncfusion.Pdf.Interactive
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public class Pdf3DActivation : IPdfWrapper
Remarks
This Pdf3DActivation class is used to set the activation states for the 3D annotation. Please refer the UG docuemntation link https://help.syncfusion.com/file-formats/pdf/working-with-annotations#d-annotation for more details.
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page.
PdfPage page = document.Pages.Add();
//Create a new rectangle.
RectangleF rectangle = new RectangleF(10, 40, 30, 30);
//Create a new Pdf3D Annotation.
Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
//Create a new Pdf3DActivation.
Pdf3DActivation activation = new Pdf3DActivation();
annotation.Activation = activation;
annotation.Activation.ActivationMode = Pdf3DActivationMode.ExplicitActivation;
page.Annotations.Add(annotation);
//Save the document to disk.
document.Save("Output.pdf");
//close the document.
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Create a new page.
Dim page As PdfPage = document.Pages.Add()
'Create a new rectangle.
Dim rectangle As New RectangleF(10, 40, 30, 30)
'Create a new Pdf3D Annotation.
Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
'Create a new Pdf3DActivation.
Dim activation As New Pdf3DActivation()
annotation.Activation = activation
annotation.Activation.ActivationMode = Pdf3DActivationMode.ExplicitActivation
page.Annotations.Add(annotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document.
document.Close(True)
Constructors
Pdf3DActivation()
Initializes the new instance of Pdf3DActivation class.
Declaration
public Pdf3DActivation()
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page.
PdfPage page = document.Pages.Add();
//Create a new rectangle.
RectangleF rectangle = new RectangleF(10, 40, 30, 30);
//Create a new Pdf3D Annotation.
Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
//Create a new Pdf3DActivation.
Pdf3DActivation activation = new Pdf3DActivation();
activation.ShowUI = false;
annotation.Activation = activation;
page.Annotations.Add(annotation);
//Save the document to disk.
document.Save("Output.pdf");
//close the document.
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Create a new page .
Dim page As PdfPage = document.Pages.Add()
'Create a new rectangle.
Dim rectangle As New RectangleF(10, 40, 30, 30)
'Create a new Pdf3D Annotation.
Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
'Create a new Pdf3DActivation.
Dim activation As New Pdf3DActivation()
activation.ShowUI = False
annotation.Activation = activation
page.Annotations.Add(annotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document.
document.Close(True)
See Also
Properties
ActivationMode
Gets or sets the activation mode for the annotation.
Declaration
public Pdf3DActivationMode ActivationMode { get; set; }
Property Value
Type | Description |
---|---|
Pdf3DActivationMode | Pdf3DActivationMode specifies the available modes for activating a 3D annotation. |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page.
PdfPage page = document.Pages.Add();
//Create a new rectangle.
RectangleF rectangle = new RectangleF(10, 40, 30, 30);
//Create a new Pdf3D Annotation.
Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
//Create a new Pdf3DActivation.
Pdf3DActivation activation = new Pdf3DActivation();
annotation.Activation = activation;
annotation.Activation.ActivationMode = Pdf3DActivationMode.ExplicitActivation;
page.Annotations.Add(annotation);
//Save the document to disk.
document.Save("Output.pdf");
//close the document.
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Create a new page.
Dim page As PdfPage = document.Pages.Add()
'Create a new rectangle.
Dim rectangle As New RectangleF(10, 40, 30, 30)
'Create a new Pdf3D Annotation.
Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
'Create a new Pdf3DActivation.
Dim activation As New Pdf3DActivation()
annotation.Activation = activation
annotation.Activation.ActivationMode = Pdf3DActivationMode.ExplicitActivation
page.Annotations.Add(annotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document.
document.Close(True)
See Also
ActivationState
Gets or sets the activation state for the annotation.
Declaration
public Pdf3DActivationState ActivationState { get; set; }
Property Value
Type | Description |
---|---|
Pdf3DActivationState | Pdf3DActivationState specifies an activation state of the 3D annotation. |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page.
PdfPage page = document.Pages.Add();
//Create a new rectangle.
RectangleF rectangle = new RectangleF(10, 40, 30, 30);
//Create a new Pdf3D Annotation.
Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @”Input.u3d");
//Create a new Pdf3DActivation.
Pdf3DActivation activation = new Pdf3DActivation();
annotation.Activation = activation;
annotation.Activation.ActivationState = Pdf3DActivationState.Live;
page.Annotations.Add(annotation);
//Save the document to disk.
document.Save("Output.pdf");
//close the document.
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Create a new page.
Dim page As PdfPage = document.Pages.Add()
'Create a new rectangle.
Dim rectangle As New RectangleF(10, 40, 30, 30)
'Create a new Pdf3D Annotation.
Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150),”Input.u3d")
'Create a new Pdf3DActivation.
Dim activation As New Pdf3DActivation()
annotation.Activation = activation
annotation.Activation.ActivationState = Pdf3DActivationState.Live
page.Annotations.Add(annotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document.
document.Close(True)
See Also
DeactivationMode
Gets or sets the deactivation mode for the annotation.
Declaration
public Pdf3DDeactivationMode DeactivationMode { get; set; }
Property Value
Type | Description |
---|---|
Pdf3DDeactivationMode | Pdf3DDeactivationMode specifies the available modes for deactivating a 3D annotation. |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page .
PdfPage page = document.Pages.Add();
//Create a new rectangle
RectangleF rectangle = new RectangleF(10, 40, 30, 30);
//Create a new Pdf3D Annotation.
Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
//Create a new Pdf3DActivation.
Pdf3DActivation activation = new Pdf3DActivation();
//Sets the DeactivationState.
activation.DeactivationMode = Pdf3DDeactivationMode.PageClose;
activation.ShowToolbar = false;
annotation.Activation = activation;
page.Annotations.Add(annotation);
//Save the document to disk.
document.Save("Output.pdf");
//close the document
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Create a new page .
Dim page As PdfPage = document.Pages.Add()
'Create a new rectangle
Dim rectangle As New RectangleF(10, 40, 30, 30)
'Create a new Pdf3D Annotation.
Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
'Create a new Pdf3DActivation.
Dim activation As New Pdf3DActivation()
'Sets the DeactivationState.
activation.DeactivationMode = Pdf3DDeactivationMode.PageClose
activation.ShowToolbar = False
annotation.Activation = activation
page.Annotations.Add(annotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document
document.Close(True)
DeactivationState
Gets or sets the deactivation state for the annotation.
Declaration
public Pdf3DDeactivationState DeactivationState { get; set; }
Property Value
Type | Description |
---|---|
Pdf3DDeactivationState | The Pdf3DActivationState specifies the Deactivate the states available in the 3DAnnoation. |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page.
PdfPage page = document.Pages.Add();
//Create a new rectangle.
RectangleF rectangle = new RectangleF(10, 40, 30, 30);
//Create a new Pdf3D Annotation.
Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
//Create a new Pdf3DActivation.
Pdf3DActivation activation = new Pdf3DActivation();
annotation.Activation = activation;
annotation.Activation.DeactivationState = Pdf3DDeactivationState.Uninstantiated;
page.Annotations.Add(annotation);
//Save the document to disk.
document.Save("Output.pdf");
//close the document.
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Create a new page.
Dim page As PdfPage = document.Pages.Add()
'Create a new rectangle.
Dim rectangle As New RectangleF(10, 40, 30, 30)
'Create a new Pdf3D Annotation.
Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
'Create a new Pdf3DActivation.
Dim activation As New Pdf3DActivation()
annotation.Activation = activation
annotation.Activation.DeactivationState = Pdf3DDeactivationState.Uninstantiated
page.Annotations.Add(annotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document.
document.Close(True)
See Also
ShowToolbar
Gets or sets a value indicating whether the toolbar should be displayed when the annotation is activated or not.
Declaration
public bool ShowToolbar { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | If true, a toolbar should be displayed by default when the annotation is activated and given focus. If false, a toolbar should not be displayed by default. |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page.
PdfPage page = document.Pages.Add();
//Create a new rectangle.
RectangleF rectangle = new RectangleF(10, 40, 30, 30);
//Create a new Pdf3D Annotation.
Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
//Create a new Pdf3DActivation
Pdf3DActivation activation = new Pdf3DActivation();
activation.ShowToolbar = false;
annotation.Activation = activation;
page.Annotations.Add(annotation);
//Save the document to disk.
document.Save("Output.pdf");
//close the document.
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Create a new page.
Dim page As PdfPage = document.Pages.Add()
'Create a new rectangle
Dim rectangle As New RectangleF(10, 40, 30, 30)
'Create a new Pdf3D Annotation.
Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
'Create a new Pdf3DActivation.
Dim activation As New Pdf3DActivation()
activation.ShowToolbar = False
annotation.Activation = activation
page.Annotations.Add(annotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document.
document.Close(True)
See Also
ShowUI
Gets or sets a value indicating whether the UI for managing the 3D artwork should be displayed when the annotation is activated.
Declaration
public bool ShowUI { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | If true, the user interface should be made visible when the annotation is activated. If false, the user interface should not be made visible by default. |
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page.
PdfPage page = document.Pages.Add();
//Create a new rectangle.
RectangleF rectangle = new RectangleF(10, 40, 30, 30);
//Create a new Pdf3D Annotation.
Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
//Create a new Pdf3DActivation.
Pdf3DActivation activation = new Pdf3DActivation();
activation.ShowUI = false;
annotation.Activation = activation;
page.Annotations.Add(annotation);
//Save the document to disk.
document.Save("Output.pdf");
//close the document.
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Create a new page.
Dim page As PdfPage = document.Pages.Add()
'Create a new rectangle.
Dim rectangle As New RectangleF(10, 40, 30, 30)
'Create a new Pdf3D Annotation.
Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
'Create a new Pdf3DActivation.
Dim activation As New Pdf3DActivation()
activation.ShowUI = False
annotation.Activation = activation
page.Annotations.Add(annotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document.
document.Close(True)
See Also
Methods
Initialize()
Initializes the instance.
Declaration
protected virtual void Initialize()
Save()
Saves an annotation.
Declaration
protected virtual void Save()