Search K
Appearance
Appearance
Add or remove watermarks in any PDF without writing a line of code.
Both text and image watermarks are supported, plus optional layer creation/deletion and page-range targeting — all powered by iText 7.
TaskType
PdfWatermark
| PackageAutomation.Core.Tasks
Label | Type | Required | Description |
---|---|---|---|
Local File Full Path | text | ✔ | Absolute path of the PDF to modify. The file is overwritten in-place. |
Mode | picklist | ✔ | Insert Text · Insert Image · Delete |
Input | Type | Default | Description |
---|---|---|---|
Layer Name | text | (blank) | Put watermark on this layer. Blank ⇒ merge into page content. |
Text Location | picklist | Center | Anchor: Center , Top Left , Top Right , Bottom Left , Bottom Right . |
Transparency | text | 30 | 0 = fully transparent, 100 = opaque. |
Page Range | text | 1- | Pages to process – e.g. 1 , 2-5 , 1,3,7- . |
Input | Default | Description |
---|---|---|
Watermark Text | CONFIDENTIAL | Text string. |
Text Angle | 45 | Clockwise degrees. |
Text Color (Hex) | #FF0000 | Any hex code. |
Font Size | 24 | Points. |
Font Name | Helvetica | Helvetica , Courier , Times , Arial (uses system font). |
Input | Default | Description |
---|---|---|
Image URL or Base64 | (blank) | Path, URL or base64 string of the image. |
Image Scale Percent | 100 | Resize relative to original (50 = half-size). |
Input | Type | Description |
---|---|---|
Layers to Delete | list | Names of layers to remove (e.g. ["WatermarkLayer"] ). |
Name | Content |
---|---|
WatermarkedPdf | Path to the overwritten PDF (same as input). |
Task Status / Message | Success / fail info. |
Mode Insert Text
Local File Full Path C:\Docs\products.pdf
Watermark Text CONFIDENTIAL
Text Angle 45
Transparency 40
Text Color (Hex) #D00000
Font Size 32
Mode Insert Image
Local File Full Path C:\Docs\handbook.pdf
Image URL or Base64 C:\Assets\logo.png
Image Scale Percent 30
Text Location Bottom Right
Page Range 1-3
Transparency 20
Layer Name LogoLayer
Mode Delete
Local File Full Path C:\Docs\quote.pdf
Layers to Delete ["WatermarkLayer","LogoLayer"]
Fonts – Helvetica, Courier, Times are embedded; Arial is loaded from the OS fonts folder. Supply a custom .ttf via its full path if needed.
Page Range – empty end (3-) means to last page.
Layering – leaving Layer Name blank merges watermark into /Contents (non-toggleable). Provide a name if you need to hide/show or delete later.
Image rotation – currently fixed; rotate beforehand if required.
Large PDFs are processed via a temp file then copied over the original.
Encrypted PDFs must allow modification (reader uses SetUnethicalReading(true)).