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:
9.5
10.0
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
Statistic
FMM
Blog
Adds a watermark to a page.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
PDFKit | 2.7 | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
A PDF reference from PDFKit.Open. | |||
PageNumber | The page number of the page to modify. | 0 | |
Image | The image to be used for watermark. Should be a PNG with mask for best results. Pass a container value. | $image | |
Transparency | The transparency level. From 0.0 (opaque) to 1.0 (full transparency). | 0.5 | |
X | X coordinate. If zero, the plugin will center the image. If negative, this value is the distance from right side. | 0 | |
Y | Y coordinate. As with all PDF coordinates, the 0 coordinate is on the bottom of the page. If zero, the plugin will center the image. If negative, this value is the distance from top side. | 0 | |
W | Desired width. If value is zero or not provided, the plugin will use the image width. | 0 | Optional |
H | Desired height. If value is zero or not provided, the plugin will use the image height. | 0 | Optional |
Background | Whether to put image in foreground or background. Default is foreground. Can be 1 for background or 0 for foreground. Does not work if existing page clears background with background color! | 0 | Optional |
DeltaX | Additional positioning offset to be added after the calculations for above are done. | 0 | Optional |
DeltaY | Additional positioning offset to be added after the calculations for above are done. | 0 | Optional |
Returns OK or error message.
Watermark with an image over full page:
MBS("PDFKit.Watermark"; $pdf; 0; Watermark PDF Page::WatermarkImage; 0; 0; 0; 0; 0)
Created 18th August 2014, last changed 28th November 2019
PDFKit.SetPrintSetting - PDFKit.WriteToPath
Feedback: Report problem or ask question.