pdfWatermarkAnnot
Create a Watermark annotation on the current open page.
int32_t __stdcall pdfWatermarkAnnot(PPDF IPDF, double PosX, double PosY, double Width, double Height);
function pdfWatermarkAnnot(const IPDF: PPDF; PosX, PosY, Width, Height: Double): Integer; stdcall;
Purpose. Create a Watermark annotation on the current open page.
Description. Watermark annotations have no interactive elements, so viewers do not let users select or edit their contents — useful for stamps that must stay put. The annotation is created without an appearance: call pdfCreateAnnotAP to create an appearance template, draw text/images/vector graphics into it, and close it with pdfEndTemplate. The annotation can be shared across pages with pdfAddAnnotToPage, and is removed by pdfDeleteWatermark when InclAnnots is true.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
PosX, PosY, Width, Height | Annotation rectangle on the current page. |
Return value. The annotation handle (>= 1) on success; a negative value on error.
C# (P/Invoke)
public static extern int pdfWatermarkAnnot(IntPtr IPDF, double PosX, double PosY, double Width, double Height);
Core
pdfWatermarkAnnot
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.