Table of Contents

Class Pdf3DViewCollection

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

Represents a collection of Pdf3DView objects.

public class Pdf3DViewCollection : List<Pdf3DView>, IList<Pdf3DView>, ICollection<Pdf3DView>, IList, ICollection, IReadOnlyList<Pdf3DView>, IReadOnlyCollection<Pdf3DView>, IEnumerable<Pdf3DView>, IEnumerable
Inheritance
Pdf3DViewCollection
Implements
Inherited Members

Examples

//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page .
PdfPage page = document.Pages.Add();
//Create a new Pdf3DAnnotation.
Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
//Creates a new Pdf3DView
Pdf3DView defaultView = new Pdf3DView();
defaultView.ExternalName="Near View";
defaultView.CameraToWorldMatrix=new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
defaultView.CenterOfOrbit=131.695f;
annotation.Views.Add(defaultView);
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 Pdf3DAnnotation.
Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
'Creates a new Pdf3DView
Dim defaultView As New Pdf3DView()
defaultView.ExternalName="Near View"
defaultView.CameraToWorldMatrix = New Single() { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f }
defaultView.CenterOfOrbit=131.695f
annotation.Views.Add(defaultView)
page.Annotations.Add(annotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document
document.Close(True)

Constructors

Pdf3DViewCollection()

public Pdf3DViewCollection()
See Also

Properties

this[int]

Gets or sets the Pdf3DView at the specified index.

public Pdf3DView this[int index] { get; set; }

Parameters

index int

Property Value

Pdf3DView

Pdf3DView

Examples

//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page .
PdfPage page = document.Pages.Add();
//Create a new Pdf3DAnnotation.
Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
//Create a Pdf3DView
Pdf3DView defaultView = new Pdf3DView();
defaultView.ExternalName="Near View";
defaultView.CameraToWorldMatrix= new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
defaultView.CenterOfOrbit = 131.695f;
annotation.Views.Add(defaultView);
page.Annotations.Add(annotation);
Pdf3DView view=annotation.Views[0] as Pdf3DView;
//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 Pdf3DAnnotation.
Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
'Create a Pdf3DView
Dim defaultView As New Pdf3DView()
defaultView.ExternalName="Near View"
defaultView.CameraToWorldMatrix= New Single() { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f }
defaultView.CenterOfOrbit = 131.695f
annotation.Views.Add(defaultView)
page.Annotations.Add(annotation)
Dim view As Pdf3DView=TryCast(annotation.Views(0), Pdf3DView)
'Save the document to disk.
document.Save("Output.pdf")
'close the document
document.Close(True)
See Also

Methods

Add(Pdf3DView)

Adds the specified 3d view into collection.

public int Add(Pdf3DView value)

Parameters

value Pdf3DView

Returns

int

The index of the Pdf3DView added to the collection.

Examples

//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page .
PdfPage page = document.Pages.Add();
//Create a new Pdf3DAnnotation.
Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
//Creates a new Pdf3DView
Pdf3DView defaultView = new Pdf3DView();
defaultView.ExternalName="Near View";
defaultView.CameraToWorldMatrix=new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
defaultView.CenterOfOrbit=131.695f;
annotation.Views.Add(defaultView);
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 Pdf3DAnnotation.
Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
'Creates a new Pdf3DView
Dim defaultView As New Pdf3DView()
defaultView.ExternalName="Near View"
defaultView.CameraToWorldMatrix = New Single() { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f }
defaultView.CenterOfOrbit=131.695f
annotation.Views.Add(defaultView)
page.Annotations.Add(annotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document
document.Close(True)
See Also

Contains(Pdf3DView)

Determines whether the specified view is in collection.

public bool Contains(Pdf3DView value)

Parameters

value Pdf3DView

The Pdf3DView.

Returns

bool

if it contains the specified value, set to true.

Examples

//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page .
PdfPage page = document.Pages.Add();
//Create a new Pdf3DAnnotation.
Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
//Create the view
Pdf3DView defaultView = new Pdf3DView();
defaultView.ExternalName="Near View";
defaultView.CameraToWorldMatrix=new Single() { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
defaultView.CenterOfOrbit=131.695f;
annotation.Views.Add(defaultView);
//check the specified view exists in the list or not
bool exist=annotation.Views.Contains(defaultView);
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 Pdf3DAnnotation.
Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
'Create the view
Dim defaultView As New Pdf3DView()
defaultView.ExternalName="Near View"
defaultView.CameraToWorldMatrix = New Single() With { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f }
defaultView.CenterOfOrbit=131.695f
annotation.Views.Add(defaultView)
'check the specified view exists in the list or not
Dim exist As Boolean=annotation.Views.Contains(defaultView)
page.Annotations.Add(annotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document
document.Close(True)
See Also

IndexOf(Pdf3DView)

search and find the Pdf3DView object.

public int IndexOf(Pdf3DView value)

Parameters

value Pdf3DView

Pdf3DView

Returns

int

Pdf3DView

Examples

//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page .
PdfPage page = document.Pages.Add();
//Create a new Pdf3DAnnotation.
Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
//Create the view
Pdf3DView defaultView = new Pdf3DView();
defaultView.ExternalName = "Near View";
defaultView.CameraToWorldMatrix = new Single() { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
defaultView.CenterOfOrbit = 131.695f;
annotation.Views.Add(defaultView);
//Get the index of specified view
int index = annotation.Views.IndexOf(defaultView);
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 Pdf3DAnnotation.
Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
'Create the view
Dim defaultView As New Pdf3DView()
defaultView.ExternalName = "Near View"
defaultView.CameraToWorldMatrix = New Single() With { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f }
defaultView.CenterOfOrbit = 131.695f
annotation.Views.Add(defaultView)
'Get the index of specified view
Dim index As Integer = annotation.Views.IndexOf(defaultView)
page.Annotations.Add(annotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document
document.Close(True)
See Also

Insert(int, Pdf3DView)

Inserts the view at specified index.

public void Insert(int index, Pdf3DView value)

Parameters

index int

The index where to insert the element.

value Pdf3DView

The view to be inserted in the collection..

Examples

//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page .
PdfPage page = document.Pages.Add();
//Create a new Pdf3DAnnotation.
Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
//Create the view
Pdf3DView defaultView = new Pdf3DView();
defaultView.ExternalName = "Near View";
defaultView.CameraToWorldMatrix = new Single() { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
defaultView.CenterOfOrbit = 131.695f;
//Insert the view at specified index
annotation.Views.Insert(1,defaultView);
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 Pdf3DAnnotation.
Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
'Create the view
Dim defaultView As New Pdf3DView()
defaultView.ExternalName = "Near View"
defaultView.CameraToWorldMatrix = New Single() With { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f }
defaultView.CenterOfOrbit = 131.695f
'Insert the view at specified index
annotation.Views.Insert(1,defaultView)
page.Annotations.Add(annotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document
document.Close(True)
See Also

Remove(Pdf3DView)

Removes the specified value from the collection.

public void Remove(Pdf3DView value)

Parameters

value Pdf3DView

The Pdf3DView object.

Examples

//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page .
PdfPage page = document.Pages.Add();
//Create a new Pdf3DAnnotation.
Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
//Create the view
Pdf3DView defaultView = new Pdf3DView();
defaultView.ExternalName = "Near View";
defaultView.CameraToWorldMatrix = new Single() { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
defaultView.CenterOfOrbit = 131.695f;
annotation.Views.Add(defaultView);
//Remove the specified view
annotation.Views.Remove(defaultView);
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 Pdf3DAnnotation.
Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
'Create the view
Dim defaultView As New Pdf3DView()
defaultView.ExternalName = "Near View"
defaultView.CameraToWorldMatrix = New Single() With { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f }
defaultView.CenterOfOrbit = 131.695f
annotation.Views.Add(defaultView)
'Remove the specified view
annotation.Views.Remove(defaultView)
page.Annotations.Add(annotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document.
document.Close(True)
See Also

See Also