Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5   7.6    Statistic  

DynaPDF.PlaceTemplate

The function places a template on a page, another open template, or pattern.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
DynaPDF 3.3 Yes Yes Yes Yes Yes

MBS( "DynaPDF.PlaceTemplate"; PDF; TemplateHandle; X; Y; W; H )

Parameters

Parameter Description Example value
PDF The PDF reference returned from DynaPDF.New. $pdf
TemplateHandle The handle value returned from DynaPDF.ImportPageAsTemplate function. $template
X The x coordinate. $x
Y The y coordinate. Please notice that PDF coordinates start at bottom of page except you change that with DynaPDF.SetPageCoords functions. $y
W The width of the destination rectangle. $w
H The height of the destination rectangle. $h

Result

Returns OK or error message.

Description

The function places a template on a page, another open template, or pattern.
The parameter TemplateHandle must be a valid template handle that was returned by DynaPDF.BeginTemplate or DynaPDF.ImportPageAsTemplate.
Templates can be used multiple times on different pages or positions and with different sizes. Unlike images, a template can be scaled without losing quality as far as the template contains vector graphics and text objects only.
The calculation of the width and height is the same as for images:



Imported pages can contain non-normalized bounding boxes and the page can be rotated. The coordinate origin, crop box, and rotation angle of a page must be considered when placing a template on a page because templates do not support features like a crop box or individual orientation angles. The required calculations to find the correct coordinate origin and to de- rotate a template are relatively complex. Therefore, DynaPDF provides the function DynaPDF.PlaceTemplateEx which considers the, coordinate origin, orientation angle, and crop box automatically. DynaPDF.PlaceTemplateEx greatly simplifies the handling of templates. If possible, this function should be used when working with imported pages.

Remarks: A template is invisible as long it was not placed on a page, template, or pattern. Templates should not be used inside of patterns because this requires usually too much rendering time.

See also PlaceTemplate function in DynaPDF manual.

See also

Example Databases


DynaPDF.ParseContent   -   DynaPDF.PlaceTemplateEx

Feedback: Report problem or ask question.




Links
MBS FileMaker Plugins