Skip to main content

Image3D

Version: 12.0

cete.dynamicpdf.pageelements.image3d

Image3D​

Represents a 3D image.

public class Image3D : MultimediaAnnotation, IAnnotation, ISerializable
Public Class Image3D
Inherits MultimediaAnnotation
Implements IAnnotation, ISerializable

Inheritance: Object → PageElement → TaggablePageElement → MultimediaAnnotation → Image3D

Implements: IAnnotation, ISerializable

Licensing Info​

This class is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

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.

public Image3D(Byte[] data, float x, float y, float width, float height)
Public Sub New (data As Byte(), x As Single, y As Single, width As Single, height As Single)

Parameters​

Byte array containing the 3D image data.

X coordinate of the image.

Y coordinate of the image.

Width of the 3D image.

Height of the 3D image.

Licensing Info​

This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Image3D(Stream, Single, Single, Single, Single)​

Returns an Image3D of the correct type for the given stream data.

public Image3D(Stream stream, float x, float y, float width, float height)
Public Sub New (stream As Stream, x As Single, y As Single, width As Single, height As Single)

Parameters​

Stream object containing the 3D image data.

X coordinate of the image.

Y coordinate of the image.

Width of the 3D image.

Height of the 3D image.

Licensing Info​

This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Image3D(String, Single, Single, Single, Single)​

Returns an Image3D of the correct type for the given physical file path.

public Image3D(string filePath, float x, float y, float width, float height)
Public Sub New (filePath As String, x As Single, y As Single, width As Single, height As Single)

Parameters​

Physical file path of the 3D image.

X coordinate of the 3D image.

Y coordinate of the 3D image.

Width of the 3D image.

Height of the 3D image.

Licensing Info​

This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Properties​

AnimationStyle​

Gets or sets the animation style of the 3D image.

public Animation3DStyle AnimationStyle { get; set; }
Public Property AnimationStyle As Animation3DStyle

Property Value​

Animation3DStyle

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

BorderThickness​

Gets or sets the border thickness. (Inherited from MultimediaAnnotation)

public BorderThickness BorderThickness { get; set; }
Public Property BorderThickness As BorderThickness

Property Value​

BorderThickness

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Disable3D​

Gets or sets when to disable the content. (Inherited from MultimediaAnnotation)

public Disable3D Disable3D { get; set; }
Public Property Disable3D As Disable3D

Property Value​

Disable3D

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Enable3D​

Gets or sets when to enable the content. (Inherited from MultimediaAnnotation)

public Enable3D Enable3D { get; set; }
Public Property Enable3D As Enable3D

Property Value​

Enable3D

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Height​

Gets or sets the height of the 3D image.

public float Height { get; set; }
Public Property Height As Single

Property Value​

Single

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

ID​

Gets or sets the ID of the page element. (Inherited from PageElement)

public string ID { get; set; }
Public Property ID As String

Property Value​

String

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

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)

public bool IgnoreMargins { get; set; }
Public Property IgnoreMargins As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Examples​

The following example will place the Label in the top-left of the page with IgnoreMargin

using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;

public class Example
{
public static void CreatePDF(string outputPath)
{
// 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 an Label and place it in page top left with margin ignored
Label label = new Label("I am placed in Page top left with margin ignored", 0, 0, 160, 30);
label.RelativeTo = RelativeTo.TopLeft;
label.IgnoreMargin=true; page.Elements.Add(label);

// Save the PDF
document.Draw(outputPath);
}
}

OpenModelTree​

Gets or sets the boolean to open model tree of the 3D image.

public bool OpenModelTree { get; set; }
Public Property OpenModelTree As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

PlaybackWindow​

Gets or sets the boolean to play the content of the annotation in separate window. (Inherited from MultimediaAnnotation)

public bool PlaybackWindow { get; set; }
Public Property PlaybackWindow As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

PlaybackWindowHeight​

Gets or sets the height of the play back window. (Inherited from MultimediaAnnotation)

public float PlaybackWindowHeight { get; set; }
Public Property PlaybackWindowHeight As Single

Property Value​

Single

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

PlaybackWindowWidth​

Gets or sets the width of the play back window. (Inherited from MultimediaAnnotation)

public float PlaybackWindowWidth { get; set; }
Public Property PlaybackWindowWidth As Single

Property Value​

Single

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

PosterImage​

Gets or sets the poster, an image for the multimedia annotation. (Inherited from MultimediaAnnotation)

public ImageData PosterImage { get; set; }
Public Property PosterImage As ImageData

Property Value​

ImageData

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

RelativeTo​

Gets and sets placement of the page element on the page. (Inherited from PageElement)

public RelativeTo RelativeTo { get; set; }
Public Property RelativeTo As RelativeTo

Property Value​

RelativeTo

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Examples​

The following example will place the Label in the top-left of the page.

using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;

public class Example
{
public static void CreatePDF(string outputPath)
{
// 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 an Label and place it in page top left with margin
Label label = new Label("I am placed in Page top left with margin.", 0, 0, 160, 30);
label.RelativeTo = RelativeTo.TopLeft;
page.Elements.Add(label);

// Save the PDF
document.Draw(outputPath);
}
}

ShowToolbar​

Gets or sets the boolean to show tool bar of the 3D image.

public bool ShowToolbar { get; set; }
Public Property ShowToolbar As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Tag​

Gets or sets the tag of the taggable element. (Inherited from TaggablePageElement)

public Tag Tag { get; set; }
Public Property Tag As Tag

Property Value​

Tag

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

TagOrder​

Gets or sets the tag order of the taggable element. (Inherited from TaggablePageElement)

public int TagOrder { get; set; }
Public Property TagOrder As Int32

Property Value​

Int32

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

TransparentBackground​

Gets or sets the boolean for the transparent background. (Inherited from MultimediaAnnotation)

public bool TransparentBackground { get; set; }
Public Property TransparentBackground As Boolean

Property Value​

Boolean

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Views​

Gets the view list of the 3D image.

public Image3DViewList Views { get; }
Public Property Views As Image3DViewList

Property Value​

Image3DViewList

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Width​

Gets or sets the width of the 3D image.

public float Width { get; set; }
Public Property Width As Single

Property Value​

Single

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

X​

Gets or sets the X coordinate of the 3D image.

public float X { get; set; }
Public Property X As Single

Property Value​

Single

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Y​

Gets or sets the Y coordinate of the 3D image.

public float Y { get; set; }
Public Property Y As Single

Property Value​

Single

Licensing Info​

This property is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Methods​

Draw(PageWriter)​

Draws the 3D image to the given PageWriter object.

public void Draw(PageWriter writer)
Sub Draw(writer As PageWriter)

Parameters​

PageWriter object to receive the 3D image's output.

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

DrawAnnotation(DocumentWriter)​

Draws the 3D image to the given DocumentWriter object.

public void DrawAnnotation(DocumentWriter writer)
Sub DrawAnnotation(writer As DocumentWriter)

Parameters​

DocumentWriter object to receive the 3D image's output.

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Equals(Object)​

Determines whether the specified Object is equal to the current Object . (Inherited from Object)

public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean

Parameters​

The Object to compare with the current Object .

Returns​

true if the specified Object is equal to the current Object ; otherwise, false.

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

GetHashCode()​

Serves as a hash function for a particular type. (Inherited from Object)

public int GetHashCode()
Function GetHashCode() As Integer

Returns​

A hash code for the current Object .

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

GetType()​

Gets the Type of the current instance. (Inherited from Object)

public Type GetType()
Function GetType() As Type

Returns​

The Type instance that represents the exact runtime type of the current instance.

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

ToString()​

Returns a String that represents the current Object . (Inherited from Object)

public string ToString()
Function ToString() As String

Returns​

A String that represents the current Object .

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

See Also​

ceTe.DynamicPDF.PageElements