Table of Contents

Class Pdf3DActivation

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

Represents the activation states for the 3D annotation.

public class Pdf3DActivation
Inheritance
Pdf3DActivation
Inherited Members

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)

Remarks

This Pdf3DActivation class is used to set the activation states for the 3D annotation. Please refer the UG docuemntation link for more details.

Constructors

Pdf3DActivation()

Initializes the new instance of Pdf3DActivation class.

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.

public Pdf3DActivationMode ActivationMode { get; set; }

Property Value

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.

public Pdf3DActivationState ActivationState { get; set; }

Property Value

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.

public Pdf3DDeactivationMode DeactivationMode { get; set; }

Property Value

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)
See Also

DeactivationState

Gets or sets the deactivation state for the annotation.

public Pdf3DDeactivationState DeactivationState { get; set; }

Property Value

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.

public bool ShowToolbar { get; set; }

Property Value

bool

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.

public bool ShowUI { get; set; }

Property Value

bool

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.

protected virtual void Initialize()
See Also

Save()

Saves an annotation.

protected virtual void Save()
See Also

See Also