Image3D
Represents a 3D image.
public class Image3D : MultimediaAnnotation, IAnnotation, ISerializable
Public Class Image3D
Inherits MultimediaAnnotation
Implements IAnnotation, ISerializable
Inheritance: ObjectPageElementTaggablePageElementMultimediaAnnotationImage3D
Implements: IAnnotation, ISerializable
Licensing Info
This class is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF Ultimate Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF Core Suite selected.
- A DynamicPDF Core Suite for .NET v12.X Developer License.
Examples
The following example will place an 3D image on the page.Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document
' Create a Page and add it to the document
Dim MyPage As Page = New Page
MyDocument.Pages.Add(MyPage)
' Create a 3D image
Dim MyImage3D As Image3D = New Image3D(imageFilePath, 0, 0, 500, 500)
Dim array() As Single = {-0.382683F, 0.92388F, -0.0000000616624F, 0.18024F, 0.0746579F, 0.980785F, 0.906127F, 0.37533F, -0.19509F, -8.84868F, -4.0174F, 1.99746F}
MyImage3D.Views.Default.TransformationMatrix = array
MyImage3D.Views.Default.CenterOfOrbit = 9.76537F
' Add the 3D image to the page
MyPage.Elements.Add(MyImage3D)
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;
public class Example
{
public static void CreatePDF(string outputPath, string imageFilePath)
{
// Create a PDF Document
Document document = new Document();
// Create a Page and add it to the document
Page page = new Page();
document.Pages.Add(page);
// Create a 3D image
Image3D image3D = new Image3D(imageFilePath, 0, 0, 500, 500);
float[] array = new float[] { -0.382683f, 0.92388f, -0.0000000616624f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -8.84868f, -4.0174f, 1.99746f };
image3D.Views.Default.TransformationMatrix = array;
image3D.Views.Default.CenterOfOrbit = 9.76537f;
// Add the 3D image to the page
page.Elements.Add(image3D);
// Save the PDF
document.Draw(outputPath);
}
}
Remarks
This class can be used to place 3D images on a page.
Constructors
Image3D(Byte[], Single, Single, Single, Single) | Returns an Image3D of the correct type for the given byte array data. |
Image3D(Stream, Single, Single, Single, Single) | Returns an Image3D of the correct type for the given stream data. |
Image3D(String, Single, Single, Single, Single) | Returns an Image3D of the correct type for the given physical file path. |
Properties
AnimationStyle | Gets or sets the animation style of the 3D image. |
BorderThickness | Gets or sets the border thickness. (Inherited from MultimediaAnnotation) |
Disable3D | Gets or sets when to disable the content. (Inherited from MultimediaAnnotation) |
Enable3D | Gets or sets when to enable the content. (Inherited from MultimediaAnnotation) |
Height | Gets or sets the height of the 3D image. |
ID | Gets or sets the ID of the page element. (Inherited from PageElement) |
IgnoreMargins | Gets or sets ignore margin property. Setting false will consider the margin while placing the page element based on the RelativeTo property. (Inherited from PageElement) |
OpenModelTree | Gets or sets the boolean to open model tree of the 3D image. |
PlaybackWindow | Gets or sets the boolean to play the content of the annotation in separate window. (Inherited from MultimediaAnnotation) |
PlaybackWindowHeight | Gets or sets the height of the play back window. (Inherited from MultimediaAnnotation) |
PlaybackWindowWidth | Gets or sets the width of the play back window. (Inherited from MultimediaAnnotation) |
PosterImage | Gets or sets the poster, an image for the multimedia annotation. (Inherited from MultimediaAnnotation) |
RelativeTo | Gets and sets placement of the page element on the page. (Inherited from PageElement) |
ShowToolbar | Gets or sets the boolean to show tool bar of the 3D image. |
Tag | Gets or sets the tag of the taggable element. (Inherited from TaggablePageElement) |
TagOrder | Gets or sets the tag order of the taggable element. (Inherited from TaggablePageElement) |
TransparentBackground | Gets or sets the boolean for the transparent background. (Inherited from MultimediaAnnotation) |
Views | Gets the view list of the 3D image. |
Width | Gets or sets the width of the 3D image. |
X | Gets or sets the X coordinate of the 3D image. |
Y | Gets or sets the Y coordinate of the 3D image. |
Methods
Draw(PageWriter) | Draws the 3D image to the given PageWriter object. |
DrawAnnotation(DocumentWriter) | Draws the 3D image to the given DocumentWriter object. |
Equals(Object) | Determines whether the specified Object is equal to the current Object . (Inherited from Object) |
GetHashCode() | Serves as a hash function for a particular type. (Inherited from Object) |
GetType() | Gets the Type of the current instance. (Inherited from Object) |
ToString() | Returns a String that represents the current Object . (Inherited from Object) |