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  


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.PlaceTemplateEx"; PDF; TemplateHandle; X; Y; W; H )


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


Returns OK or error message.


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, DynaPDF.ImportPageAsTemplate.
The function was specifically designed to work with templates which were created from imported pages. A PDF page is converted to a template if it was imported with DynaPDF.ImportPageAsTemplate outside of an open page.

The calculation of the width and height is the same as for images:

A template does not support a crop box or orientation angle. When placing a template on a page that was created from a PDF page, the coordinate origin must be adjusted according to the original media or crop box. In addition, the template must maybe be drawn into a clipping path (if the original page contained a crop box), and the template must maybe also be rotated so that the original orientation can be preserved.

All these considerations complicate the handling of imported templates. To make the usage of imported templates easier the function considers the coordinate origin, it draws the template automatically into a clipping rectangle if required, and it rotates the template according to the original page orientation.

The only thing that must be considered is that the original size of the template must be calculated from the crop box if present. In addition, the so computed width and height must be exchanged if the original page orientation was 90, -90, 270, or -270 degrees.

See also PlaceTemplateEx function in DynaPDF manual.

See also

Example Databases

DynaPDF.PlaceTemplate   -   DynaPDF.Print

Feedback: Report problem or ask question.

MBS FileMaker Plugins