DynaPDF Manual - Page 168

Previous Page 167   Index   Next Page 169

Function Reference
Page 168 of 839
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0. The one and
only reason why this function can fail is out of memory.
AutoTemplate
Syntax:
SI32 pdfAutoTemplate(
const PPDF* IPDF, // Instance pointer
UI32 Templ,
// Template handle
double PosX,
// X-Coordinate
double PosY,
// Y-Coordinate
double Width,
// Scaled with
double Height)
// Scaled height
Templates can be used on multiple pages, e.g. as background, custom logos and so on. To insert a
template automatically on newly created pages, use the function AutoTemplate().
The parameter Templ must be a valid template handle. The width and height can be calculated as
follows:
If Width or Height is -1 the function uses the original width or height from the template.
If Width or Height is 0, the missing value is calculated in relation to the given value of Height
or Width to preserve the template's aspect ratio. The resulting output is a template with exact
proportions relative to its original size.
If Width and Height is 0, the original size is used (same effect as -1).
A negative value of Width or Height mirrors the template on the x- and or y-axis.
Remarks:
The templates are inserted on new pages by using the function PlaceTemplate().
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: AttachImageBuffer (Rendering Engine)

Next topic: BeginClipPath (Obsolete), BeginContinueText