Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 290

Previous Page 289   Index   Next Page 291

Function Reference
Page 290 of 750
The function deleted the separation of the current open page or of all pages if the parameter AllPages
is set to true.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
DeleteTemplate
Syntax:
SI32 pdfDeleteTemplate(
const PPDF* IPDF, // Instance pointer
UI32 Handle)
// Template handle
This function deletes a template. The parameter Handle must be a valid template handle. A template
is not physically deleted by this function, only the content stream is cleared. Templates can be
references in other content stream so that it is quite complex to delete a template physically at
runtime. However, this behaviour is maybe changed in a future version of DynaPDF.
Imported PDF pages are converted to templates by default. The handles of such templates are often
not known, however, it is possibly to delete them by using the function DeleteTemplateEx().
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
DeleteTemplateEx
Syntax:
SI32 pdfDeleteTemplateEx(
const PPDF* IPDF, // Instance pointer
UI32 Index)
// Index of the template inside the page's array
This function deletes a template by using an index instead of a template handle. The parameter Index
represents an index into the array of templates used by the current open page. The number of
templates used by a page is returned by the function GetTemplCount().
It is not easy to identify a specific template, all templates used by a page can be deleted easily, but it
is much more complex to delete a specific template if the page contains more than one.
However, if a template contains text, then the functions EditTemplate() and GetPageText() can be
used to identify a template, but in most cases it is easier to delete a template and check the file with
Acrobat or Reader to determine whether it was the right one.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
Example (C++):
// In this example, we have a document with 10 imported pages.
// The entire document was imported with the function ImportPDFFile()
 

Previous topic: DeleteSeparationInfo

Next topic: DrawArc