DynaPDF Manual - Page 269

Previous Page 268   Index   Next Page 270

Function Reference
Page 269 of 777
pdfGetBBox(pdf, pbMediaBox, bbox);
SI32 vp = pdfCreateViewport(
pdf,
// Instance pointer
NULL,
// Optional viewport name
bbox.Left,
// Lowever left corner
bbox.Bottom,
// Lowever left corner
bbox.Right,
// Upper right corner
bbox.Top);
// Upper right corner
pdfCreateRectilinearMeasure(
pdf,
// Instance pointer
vp,
// Viewport handle
25.4/72.0,
// Conversion factor from 1/72 inch to mm
"inch to mm",
// Description of the measure dictionary
"mm",
// Unit label for the distance tool
"mm²");
// Unit label for the area tool
pdfEndPage(pdf);
pdfCloseFile(pdf);
pdfDeletePDF(pdf);
Remarks:
This function is implemented in an Ansi and Unicode compatible variant.
Return values:
If the function succeds the return value is a measure handle, a value greater or equal zero. If the
function fails the return value is a negative error code.
CreateResetAction
Syntax:
SI32 pdfCreateResetAction(
const PPDF* IPDF) // Instance pointer
A reset form action resets all or specific fields of an interactive form to their default values. If only a
few specific fields should be reset then add these fields with AddFieldToFormAction() to the action.
It is possible to exclude or include only specific fields when resetting the form. However, if no
specific fields are added to the action, all fields are reset to their default values, this is the normal
case.
Remarks:
Actions must be added to a PDF object with AddActionToObj().
Return values:
If the function succeeds the return value is the action handle, a value greater or equal zero. If the
function fails the return value is a negative error code.
 

Previous topic: CreateRectilinearMeasure

Next topic: CreateSeparationCS