DynaPDF Manual - Page 330

Previous Page 329   Index   Next Page 331

Function Reference
Page 330 of 839
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()
// so that all interactive features are also imported. However, the
// third page contains invalid contents that should be removed. The
// imported pages were converted to templates during import (it is also
// possible to import pages without conversion). The template handles
// of the imported pages are not known so that we use the indexes instead.
SI32 tmplCount = pdfGetTemplCount();
for (SI32 i = 0; i < tmplCount; i++)
SI32 pdfDeleteWatermark(
const PPDF* IPDF, // Instance pointer
SI32 PageNum,
// Page number or -1 for all pages
LBOOL InclAnnots) // Delete watermark annotations too?
The function can be used to delete watermarks from a single page or from the entire document if
PageNum is set to -1. If InclAnnots is true, watermark annotations will be deleted too, if any.
A watermark in PDF terms is a regular template that has a ADBE_CompoundType property of type
Watermark. Such templates can be created with the Watermark tool of Adobes Acrobat, or with
DynaPDF, for example. See MarkTemplateAsWatermark() for further information.
Return values:
If the function succeeds the return value is the number of deleted watermarks. Note that deleted
watermark annotations do not increment the return value. If the function fails, the return value is a
negative error code.

Previous topic: DeleteSeparationInfo, DeleteTemplate, DeleteTemplateEx

Next topic: DeleteXFAForm, DrawArc