DynaPDF Manual - Page 186
Previous Page 185 Index Next Page 187
Function Reference
Page 186 of 839
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);
Previous topic: CaretAnnot
Next topic: ChangeBookmark