DynaPDF.DeleteWatermark
-----------------------

Delete a watermark template.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [13.3](newinversion133.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.DeleteWatermark"; PDF; PageNum { ; InclAnnots } ) 

**MBS**( **"DynaPDF.DeleteWatermark";** /\* Delete a watermark template. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$PageNum**; /\* Page number or -1 for all pages.e.g. -1 \*/   
**$InclAnnots**) /\* Optional; Delete watermark annotations too?  
Pass 1 to delete annotations or 0 to not.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |  |
| PageNum | Page number or -1 for all pages. | -1 |  |
| InclAnnots | Delete watermark annotations too?   Pass 1 to delete annotations or 0 to not. | 1 | Optional |

### Result

Returns number or error.

### Description

Delete a watermark template.  
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 [DynaPDF.MarkTemplateAsWatermark](DynaPDFMarkTemplateAsWatermark.md)() for further information.  
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 an error.  
See also [DeleteWatermark](https://www.monkeybreadsoftware.com/DynaPDF-Manual/DeleteWatermark.shtml) function in DynaPDF manual.

### Examples

Delete watermark on page 5:

 Set Variable \[ $ResetAction ; Value:MBS ( "DynaPDF.DeleteWatermark"; $pdf ; 5 ) \]  
### See also

- [DynaPDF.DeleteBookmark](DynaPDFDeleteBookmark.md)
- [DynaPDF.MarkTemplateAsWatermark](DynaPDFMarkTemplateAsWatermark.md)
- [DynaPDF.New](DynaPDFNew.md)

### Release notes

- **Version 13.3**
    - Added [DynaPDF.AddDPartNode](https://www.mbsplugins.eu/DynaPDFAddDPartNode.shtml), [DynaPDF.CreateDPartRoot](https://www.mbsplugins.eu/DynaPDFCreateDPartRoot.shtml), [DynaPDF.DeleteWatermark](https://www.mbsplugins.eu/DynaPDFDeleteWatermark.shtml), [DynaPDF.GetLastTextOffset](https://www.mbsplugins.eu/DynaPDFGetLastTextOffset.shtml), [DynaPDF.HaveDPartRoot](https://www.mbsplugins.eu/DynaPDFHaveDPartRoot.shtml), [DynaPDF.MarkTemplateAsWatermark](https://www.mbsplugins.eu/DynaPDFMarkTemplateAsWatermark.shtml) and [DynaPDF.OpenTagEx](https://www.mbsplugins.eu/DynaPDFOpenTagEx.shtml) functions.

### Blog Entries

- [New in MBS FileMaker Plugin 13.3](https://www.mbsplugins.de/archive/2023-07-25/New_in_MBS_FileMaker_Plugin_13/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 13.3pr2](https://www.mbsplugins.de/archive/2023-06-13/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

Created 13th June 2023 , last changed 27th August 2023

  
[DynaPDF.DeleteTemplateEx](DynaPDFDeleteTemplateEx.md) - [DynaPDF.DeleteXFAForm](DynaPDFDeleteXFAForm.md)

[HTML Version](DynaPDFDeleteWatermark.shtml)