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

DynaPDF Manual - Page 161

Previous Page 160   Index   Next Page 162

Function Reference
Page 161 of 750
ChangeAnnotName
Syntax:
SI32 pdfChangeAnnotName(
const PPDF* IPDF,
// Instance pointer
UI32 Handle,
// Annotation handle
const char* Name)
// Annotation name or NULL
This function changes or deletes the optional unique name of an annotation. The parameter Handle
must be a valid annotation handle. If the parameter Name contains an empty string or if it is set to
NULL, the name will be deleted. The annotation name must be a unique string so that the annotation
can be identified in JavaScript actions. The string could be a GUIID, a hash, or any other string that
uniquely identifies the annotation.
Remarks:
This function is available in an Ansi and Unicode compatible version.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
ChangeAnnotPos
Syntax:
SI32 pdfChangeAnnotPos(
const PPDF* IPDF, // Instance pointer
UI32 Handle,
// Annotation handle
double PosX,
// X-Coordinate of the annotation
double PosY,
// Y-Coordinate of the annotation
double Width,
// Width in unscaled units
double Height)
// Height in unscaled units
This function changes the position and size of an annotation. Annotations which contain a visible
appearance such as 3D annotations should be scaled without changing the annotation's aspect ratio.
Example:
TPDFRect bbox;
pdfGetAnnotBBox(pdf, annot, bbox);
double w = bbox.Right - bbox.Left;
double h = bbox.Top - bbox.Bottom;
// The annotation should be scaled to a width of 300 units.
// The scaled height can be calculated as follows:
h = pdfCalcWidthHeight(pdf, w, h, 300.0, 0.0);
pdfChangeAnnotPos(pdf, annot, 50.0, 50.0, 300.0, h);
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: CaretAnnot

Next topic: ChangeBookmark