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.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4    Statistic  

DynaPDF.EditTemplate

Prepares a template for editing.

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

MBS( "DynaPDF.EditTemplate"; PDF; TemplateIndex )

Parameters

Parameter Description Example value
PDF The PDF reference returned from DynaPDF.New. $pdf
TemplateIndex Index of template. From 0 to DynaPDF.GetTemplateCount-1. 0

Result

Returns OK or error.

Description

Prepares a template for editing.
The parameter Index is the array index inside the page that contains the template. To get the number of templates used by a page call the function DynaPDF.GetTemplCount. 
The current graphics state is saved entirely before the template will be opened. This graphics state is restored when the template is closed with DynaPDF.EndTemplate. That means, the current font, line width, fill color and so on are all restored to its values before entering the template. 
DynaPDF.EndTemplate requires an open page that must be opened with DynaPDF.EditPage beforehand. After the changes are made the template must be closed with DynaPDF.EndTemplate.

DynaPDF.EditTemplate is mostly used to extract text strings from imported PDF files because imported pages are converted to templates by default. See DynaPDF.GetPagetext() for an example application.

See also EditTemplate function in DynaPDF manual.

See also


DynaPDF.EditPage   -   DynaPDF.EditTemplate2

Feedback: Report problem or ask question.




Links
MBS FileMaker blog