Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 202

Previous Page 201   Index   Next Page 203

Function Reference
Page 202 of 750
Create3DAnnot
Syntax:
SI32 pdfCreate3DAnnot(
const PPDF* IPDF,
// Instance pointer
double PosX,
// X-Coordinate of the annotation
double PosY,
// Y-Coordinate of the annotation
double Width,
// Width of the annotation
double Height,
// Height of the Annotation
const char* Author,
// Optional author
const char* Name,
// Optional annotation name
const char* U3DFile, // Required U3D or PRC file
const char* Image)
// Optional image to display the closed annotation
The function creates a 3D annotation from a U3D or PRC file. The image is used to create the default
appearance of the annotation; it is shown when the annotation is deactivated or when viewing the
file with a viewer that does not support 3D annotations. If no image file is provided the background
is filled with the current field background color (see SetFieldBackColor()). Note that the default
background color is transparent, that means no background will be drawn if the color was not
changed beforehand.
The annotation’s name can be used to access the annotation from a JavaScript or JavaScript action.
The name must be unique if defined. Make sure that no other annotation exists with the same name.
Note that DynaPDF performs no duplicate check during creation of the annotation.
A 3D annotation requires usually at least a default view that defines the rendering mode and
lighting scheme to get suitable results (see Create3DView()). Without a view the viewer application
uses default settings to display the annotation.
Remarks:
3D annotations are supported since Acrobat 7 or Acrobat Reader 7. However, Acrobat Reader
versions prior 7.0.9 contain several bugs in the 3D rendering engine. These bugs were solved in
Acrobat Reader 7.0.9.
Return values:
If the function succeeds the return value is the annotation handle, a value greater or equal zero. If the
function fails the return value is a negative error code.
 

Previous topic: CopyChoiceValues

Next topic: Create3DGotoViewAction