Class Pdf3DViewCollection
Represents a collection of Pdf3DView objects.
Inheritance
System.Object
Pdf3DViewCollection
Namespace: Syncfusion.Pdf.Interactive
Assembly: Syncfusion.Pdf.NET.dll
Syntax
public class Pdf3DViewCollection : List<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");
//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()
Declaration
public Pdf3DViewCollection()
Properties
Item[Int32]
Gets or sets the Pdf3DView at the specified index.
Declaration
public Pdf3DView this[int index] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
Property Value
Type | Description |
---|---|
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.
Declaration
public int Add(Pdf3DView value)
Parameters
Type | Name | Description |
---|---|---|
Pdf3DView | value |
Returns
Type | Description |
---|---|
System.Int32 | 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.
Declaration
public bool Contains(Pdf3DView value)
Parameters
Type | Name | Description |
---|---|---|
Pdf3DView | value | The Pdf3DView. |
Returns
Type | Description |
---|---|
System.Boolean | if it contains the specified value, set to |
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.
Declaration
public int IndexOf(Pdf3DView value)
Parameters
Type | Name | Description |
---|---|---|
Pdf3DView | value |
Returns
Type | Description |
---|---|
System.Int32 | 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(Int32, Pdf3DView)
Inserts the view at specified index.
Declaration
public void Insert(int index, Pdf3DView value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index where to insert the element. |
Pdf3DView | value | 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.
Declaration
public void Remove(Pdf3DView value)
Parameters
Type | Name | Description |
---|---|---|
Pdf3DView | value | 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)