Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2   11.3   11.4    Statistic    FMM    Blog  

DynaPDF.EditTemplate

Prepares a template for editing.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 5.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.EditTemplate"; PDF; TemplateIndex )   More

Parameters

Parameter Description Example
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

Blog Entries

Created 16th May 2015, last changed 17th May 2015


DynaPDF.EditPage - DynaPDF.EditTemplate2

Feedback: Report problem or ask question.