惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
F
Full Disclosure
Martin Fowler
Martin Fowler
The GitHub Blog
The GitHub Blog
L
LangChain Blog
T
The Blog of Author Tim Ferriss
D
DataBreaches.Net
GbyAI
GbyAI
Y
Y Combinator Blog
博客园 - Franky
WordPress大学
WordPress大学
Apple Machine Learning Research
Apple Machine Learning Research
A
About on SuperTechFans
Blog — PlanetScale
Blog — PlanetScale
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
G
Google Developers Blog
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
博客园 - 三生石上(FineUI控件)
IT之家
IT之家
Jina AI
Jina AI
N
Netflix TechBlog - Medium
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
酷 壳 – CoolShell
酷 壳 – CoolShell
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 聂微东
腾讯CDC
H
Help Net Security
H
Heimdal Security Blog
J
Java Code Geeks
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
The Exploit Database - CXSecurity.com
The Register - Security
The Register - Security
大猫的无限游戏
大猫的无限游戏
T
Threatpost
B
Blog RSS Feed
T
Threat Research - Cisco Blogs
Microsoft Security Blog
Microsoft Security Blog
S
Securelist
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog
量子位
AWS News Blog
AWS News Blog
Project Zero
Project Zero
P
Proofpoint News Feed
Cisco Talos Blog
Cisco Talos Blog
Spread Privacy
Spread Privacy
S
Schneier on Security

Inside Nutrient

A guide to the invisible work behind documents Introducing Nutrient Documents for Salesforce: Native document generation and signing Document AI vs. traditional OCR: Choosing between OCR, AI, and hybrid pipelines PDF SDK compliance and security evaluation checklist for enterprise teams (2026) Invariant Corp replaces paper processes with Nutrient Workflow and scales without limits What is process mapping? A complete guide Nutrient vs. Conga Composer for Salesforce document generation (2026) Document routing: How to automate document distribution The CTO’s AI playbook: Why accountability architecture beats orchestration Compliance workflow automation: Why built-in compliance is table stakes Workflow diagrams: Examples, symbols, and how to build one that actually runs Digital forms: Replace paper forms with automated workflows Approval workflow software: How to automate approvals Why document-centric automation is different The CEO’s AI playbook: Why decision architecture beats model selection Nutrient SDK product updates for Q1 2026 PDF redaction verification: How to prove sensitive data is permanently removed What is a VPAT? The complete guide to accessibility conformance reports What is PDF/UA? The accessible PDF standard explained Salesforce eSignatures: Generate, sign, and track documents in one flow Online document viewer: Options, tradeoffs, and how to embed one Document viewer for web apps: React, Vue, Angular (2026) Best document viewers in 2026: A buyer’s guide How to edit a PDF in Python: Add text, images, and annotations Nutrient advances Workflow platform with agentic AI for enterprise-grade speed and consistency in document-heavy operations How to create a Salesforce quote template from opportunity data The business case for accessibility: Five ways it drives enterprise value Python PDF library comparison (2026): 7 libraries for developers Why your AI agent hallucinates PDF table data PDF.js limitations: When to upgrade to a commercial PDF SDK How Subject scaled 5× with Nutrient’s PDF SDK without rebuilding its document layer I replaced our sales training with an AI coach that runs in Slack — here’s what broke Redirecting to: https://securitybuzz.com/cybersecurity-news/why-enterprise-permissions-are-ais-most-dangerous-inheritance/ Nutrient .NET SDK vs. iText Core: Complete comparison for .NET developers DocuVieware: Support’s most frequently asked setup questions Introducing Nutrient Workflow How to convert PDF to Word in C# (.NET) When email and spreadsheets stop working: Work order approval workflows for field teams on the move Compliance with confidence: Why document-centric automation is the foundation of your mission Nutrient expands AI Assistant, automating multistep document workflows inside any application What is document generation? A developer’s guide to PDF generation Document Converter data flow and how real-time watermarks skip the queue PDF/UA compliance guide: Requirements, standards, and best practices Computers still can’t understand you How Athena Intelligence built AI agents for regulated enterprises with Nutrient’s document infrastructure How to convert HTML to PDF (2026): 4 methods from browser print to SDK How to build a document extraction pipeline with Nutrient Vision API OCR vs. intelligent document processing: Choosing the right document extraction engine Beyond OCR: How document intelligence eliminates manual processing in regulated industries Nutrient vs. IronPDF: Complete comparison for .NET developers Nutrient vs. Aspose.PDF: Complete comparison for .NET developers Redirecting to: https://fortune.com/2026/02/19/openclaw-who-is-peter-steinberger-openai-sam-altman-anthropic-moltbook/ Lufthansa Systems uses Nutrient to deliver reliable, scalable PDF rendering for pilots worldwide Nutrient vs. Syncfusion: Complete comparison for .NET developers React’s useTransition: The hook you’re probably using wrong First City Monument Bank streamlines banking processes with Nutrient Workflow Redirecting to: https://www.sdcexec.com/warehousing/automation/article/22957364/nutrient-workflow-automation-the-missing-link-in-supply-chain-efficiency The complete guide to digital signatures: PAdES, CAdES, and XAdES explained Nutrient Python SDK: Production-grade document processing for Python Introducing agentic document editing for web applications with AI Assistant Nutrient vs. QuestPDF: Complete comparison for .NET developers How we fixed the GdPicture license expiration (and what to do if you’re affected) Red team security testing with agentic AI The future of healthcare document automation Best healthcare workflow software compared Nutrient SDK product updates for Q4 2025 How Harvey scaled legal document workflows 50 percent MoM without rebuilding infrastructure HIPAA-compliant document management in hospitals How we optimized rendering performance while handling thousands of annotations in React — Part 2 Automated PII removal with Nutrient API Redirecting to: https://www.devopsdigest.com/2026-low-code-no-code-predictions Redirecting to: https://www.kmworld.com/Articles/Editorial/ViewPoints/Leaders-predict-AI-to-continue-permeating-all-aspects-of-KM-in-2026-172594.aspx What are deep agents and how do they solve complex problems? Whipping up document magic: Your easy-bake recipe for Vue and Nutrient Web SDK 🧁 What I’ve learned about product iteration planning while building SDKs Passwordless document signing: Three-layer security guide New zip folder functionality streamlines file management in Document Automation Server The keyboard shortcuts playbook: Taking control of keyboard events in Nutrient Web SDK From experienced engineer to AI beginner: My unexpected journey AI-assisted manual testing: Handling Safari’s PDF rendering and UI quirks How to keep a 20-year-old SDK up to date How we optimized rendering performance while handling thousands of annotations in React — Part 1 Nutrient announces new executive hires to accelerate next phase of growth High performance UI using web workers Automate document conversion at scale with Python and Nutrient DCS From curiosity to PLG (and AI): My journey to understanding product-led growth Prost to progress: One year as Nutrient Pigeon usage at Nutrient: Bridging native SDKs to Flutter Modernizing CI build servers: How to migrate from Chef to Ansible Unix man pages: AI-friendly documentation since 1971 Consistent hashing for even load distribution Best AI redaction APIs: Complete comparison guide for 2025 Why AI document redaction matters for modern security From coding to coordinating: How AI transformed my workflow What is intelligent document processing (IDP)? A complete guide Enterprise PDF SDKs: Best PSPDFKit (now Nutrient) alternatives Nutrient SDK product updates for Q3 2025 GdPicture support best practices Redacting sensitive data with Nutrient AI redaction API How AI is transforming the customer experience at Nutrient: From instant answers to intelligent support
How to add watermarks to PDFs: A complete guide for developers
Hulya Masharipov · 2025-01-23 · via Inside Nutrient

Updated: December 10, 2025

Table of contents

    Add text or image watermarks to PDFs for security, branding, or compliance. This guide covers implementation across Web, iOS, Android, and server-side platforms using Nutrient SDK.

    How to add watermarks to PDFs: A complete guide for developers

    TL;DR

    Add watermarks to PDFs using Nutrient SDK. This guide covers text and image watermarks, static vs. dynamic options, and code examples for Document Engine, Web SDK, iOS, and Android.

    Watermarks protect sensitive documents, reinforce branding, and help with compliance. This guide shows you how to add watermarks to PDFs using Nutrient PDF SDK across web, mobile, and server-side platforms.

    What is a watermark?

    A watermark is a piece of text, an image, or data added to a document, photo, or even a banknote to prevent unauthorized copying or misuse. It can be obvious, like a logo or stamp, or hidden within the content as invisible data.

    Watermarks help protect content, but they only work if they’re difficult to remove — otherwise, they don’t serve much of a purpose.

    Understanding document watermarking

    Document watermarking embeds a recognizable mark — visible or invisible — on a document to indicate ownership or provide additional context. Visible watermarks, such as logos or text, are directly noticeable, while invisible watermarks are hidden and can only be detected with special tools.

    Common use cases for watermarking

    Watermarking addresses a range of business and security needs across industries, including:

    • Copyright protection — Prevent unauthorized distribution or plagiarism.
    • Branding — Add company logos or taglines to reinforce identity.
    • Tracking and auditing — Identify document leaks or unauthorized sharing with dynamic information (e.g. Opened by [User] on [Date] from IP [Address]).
    • Metadata and labeling — Display associated metadata such as author, project name, due date, or compliance labels.
    • Status indicators — Mark documents with statuses like Draft, Final, or Confidential.
    • Security and compliance — Overlay user IDs, timestamps, or other details to ensure document security.
    • Legal and policy notices — Insert legal disclaimers, copyright messages, or corporate policies.
    • Machine-readable data — Embed barcodes or QR codes with our barcode scanner SDK for automated processing.

    Why use watermarks on PDFs?

    Watermarks provide practical benefits for security, branding, and compliance. Here’s how they protect your documents and support business requirements.

    1. Security

    Watermarks deter unauthorized distribution. When sharing contracts, reports, or invoices, a watermark:

    • Identifies document ownership
    • Discourages copying or redistribution
    • Helps meet regulatory requirements

    2. Branding

    Add logos or taglines directly to documents for consistent branding across all outputs.

    3. Compliance

    Industries like healthcare, finance, and legal services often require document labeling. Watermarks satisfy these requirements.

    Types of watermarks: Static vs. dynamic

    • Static watermarks — Same on every document (e.g. company logo, CONFIDENTIAL stamp). Applied uniformly.
    • Dynamic watermarks — Generated per document with variable data like usernames, timestamps, or document IDs. Useful for tracking who accessed what.

    How to add watermarks with Nutrient SDK

    Nutrient PDF SDK supports text and image watermarks across all platforms:

    • Customizable — Control position, opacity, rotation, and text styling
    • Cross-platform — Web, iOS, Android, and server-side (Document Engine)
    • Performant — Handles large-scale document processing

    Adding watermarks on different platforms

    The following sections provide platform-specific implementation guides with code examples for Document Engine, Web SDK, iOS, Android, and Document Converter.

    1. Document Engine

    Nutrient Document Engine makes it easy to watermark documents using the watermark action. You can specify options that describe the look and position of a watermark, including both text and image annotations.

    Follow these steps to watermark documents with Document Engine.

    Steps to add watermarks

    1. Set up Document Engine

      Ensure Document Engine is running and ready to accept requests.

    2. Use multipart POST requests

      Send requests to the /api/build endpoint with detailed instructions. For more information, refer to A brief tour of multipart requests.

    3. Flatten the annotations

      After applying the watermark, flatten the document’s annotations to make the watermark irremovable.

    Examples

    These examples demonstrate common watermarking scenarios using Document Engine.

    Watermarking a file on disk

    To add a TOP SECRET text watermark, use the following code:

    curl -X POST http://localhost:5000/api/build \

    -H "Authorization: Token token=<API token>" \

    -F document=@/path/to/example-document.pdf \

    -F instructions='{

    "parts": [

    {

    "file": "document",

    "actions": [

    {

    "type": "watermark",

    "text": "TOP SECRET",

    "width": 100,

    "height": 200

    },

    {

    "type": "flatten"

    }

    ]

    }

    ]

    }' \

    -o result.pdf

    This request attaches an input file and specifies watermarking actions to apply.

    Adding image and text watermarks

    Here’s an example of combining an image watermark on the first page of a document and a text watermark on the last page:

    curl -X POST http://localhost:5000/api/build \

    -H "Authorization: Token token=<API token>" \

    -F document=@/path/to/example-document.pdf \

    -F image-local=@/path/to/image-watermark.png \

    -F instructions='{

    "parts": [

    {

    "file": "document",

    "pages": {

    "start": 0,

    "end": 0

    },

    "actions": {

    "type": "watermark",

    "image": "image-local",

    "width": 100

    }

    },

    {

    "file": "document",

    "pages": {

    "start": 3,

    "end": 3

    },

    "actions": {

    "type": "watermark",

    "text": "TOP SECRET",

    "width": 100,

    "height": 200

    }

    }

    ],

    "actions": [

    {

    "type": "flatten"

    }

    ]

    }' \

    -o result.pdf

    Watermarking a file from a URL

    You can also use URLs to specify both the document and the image for the watermark:

    curl -X POST http://localhost:5000/api/build \

    -H "Authorization: Token token=<API token>" \

    -F instructions='{

    "parts": [

    {

    "file": {

    "url": "https://www.nutrient.io/downloads/examples/paper.pdf"

    },

    "pages": {

    "start": 0,

    "end": 0

    },

    "actions": {

    "type": "watermark",

    "image": {

    "url": "https://image-url.com/path-to-image-on-internet.png"

    },

    "width": 100

    }

    }

    ],

    "actions": [

    {

    "type": "flatten"

    }

    ]

    }' \

    -o result.pdf

    When specifying URLs, ensure the image URL includes the MIME type, such as png.

    2. Nutrient DWS API — PDF watermark API

    Nutrient DWS API lets you add custom watermarks to PDF documents via an easy-to-use HTTP service.

    Benefits

    • Secure — Data isn’t stored, and all interactions are encrypted (SOC 2 compliant).
    • Simple — Quick integration with well-documented APIs.
    • Flexible — More than 30 tools for document conversion and manipulation.
    • Affordable — Pay based on credits, with transparent pricing.

    Get started

    1. Sign up for a free account(opens in a new tab) and get 50 credits.
    2. Upload files by placing your document.pdf and logo.png files in your project.
    3. Use the provided sample code in your preferred language.
    4. Download result.pdf and check for the watermark.

    Example with Node.js

    const axios = require("axios");

    const FormData = require("form-data");

    const fs = require("fs");

    const formData = new FormData();

    formData.append(

    "instructions",

    JSON.stringify({

    parts: [{ file: "document" }],

    actions: [{ type: "watermark", image: "logo", width: "25%" }],

    }),

    );

    formData.append("document", fs.createReadStream("document.pdf"));

    formData.append("logo", fs.createReadStream("logo.png"));

    (async () => {

    try {

    const response = await axios.post(

    "https://api.nutrient.io/build",

    formData,

    {

    headers: formData.getHeaders({

    Authorization: "Bearer your_api_key",

    }),

    responseType: "stream",

    },

    );

    response.data.pipe(fs.createWriteStream("result.pdf"));

    } catch (e) {

    const errorString = await streamToString(e.response.data);

    console.log(errorString);

    }

    })();

    function streamToString(stream) {

    const chunks = [];

    return new Promise((resolve, reject) => {

    stream.on("data", (chunk) => chunks.push(Buffer.from(chunk)));

    stream.on("end", () => resolve(Buffer.concat(chunks).toString("utf8")));

    stream.on("error", reject);

    });

    }

    The code uses Node.js to add a watermark to a PDF by sending a request to Nutrient DWS API with a PDF and image file, along with your API key for authentication. The watermarked PDF is saved as result.pdf after the request is processed.

    3. Web SDK

    Nutrient Web SDK allows you to add watermarks to PDFs displayed in the browser, which is useful for preventing screenshots by overlaying user-specific information, such as a username. To achieve this, use the renderPageCallback option in the pspdfkit#load() method, where you can draw the watermark on each page using the Canvas API, as shown in the example below:

    PSPDFKit.load({

    document: document,

    renderPageCallback: function (ctx, pageIndex, pageSize) {

    ctx.beginPath();

    ctx.moveTo(0, 0);

    ctx.lineTo(pageSize.width, pageSize.height);

    ctx.stroke();

    ctx.font = "30px Comic Sans MS";

    ctx.fillStyle = "red";

    ctx.textAlign = "center";

    ctx.fillText(

    `Generated for John Doe. Page ${pageIndex + 1}`,

    pageSize.width / 2,

    pageSize.height / 2,

    );

    },

    });

    This watermark only appears during viewing in the browser and doesn’t alter the original PDF document.

    4. Android SDK — Secure your PDFs with custom watermarks

    To add custom, non-removable watermarks to PDFs, use Nutrient Android SDK’s PdfDrawable API. This method allows you to overlay user-specific watermarks (e.g. name, timestamp) to discourage unauthorized sharing or screenshots. You can provide a PdfDrawableProvider that will be registered with the PdfFragment to apply the watermark, including on page thumbnails. Here’s an example of how to set this up in your PdfActivity:

    class WatermarkExampleActivity : PdfActivity() {

    private val customTestDrawableProvider: PdfDrawableProvider = object : PdfDrawableProvider() {

    override fun getDrawablesForPage(context: Context, document: PdfDocument, @IntRange(from = 0) pageIndex: Int): List<PdfDrawable> {

    return listOf(WatermarkDrawable("Watermark", PointF(350f, 350f)))

    }

    }

    override fun onCreate(savedInstanceState: Bundle?) {

    super.onCreate(savedInstanceState)

    requirePdfFragment().addDrawableProvider(customTestDrawableProvider)

    pspdfKitViews.thumbnailBarView?.addDrawableProvider(customTestDrawableProvider)

    }

    }

    The WatermarkDrawable class handles content and positioning. The watermark appears onscreen but doesn’t modify the PDF file.

    Explore the Android demo:

    5. iOS SDK

    Nutrient iOS SDK allows you to add a permanent watermark to all pages of a document using the Processor API. The following example shows how to apply a watermark to every page:

    let configuration = Processor.Configuration(document: document)!

    configuration.drawOnAllCurrentPages { context, pageIndex, pageRect, renderOptions in

    let text = "Watermark on Page \(pageIndex + 1)"

    context.translateBy(x: 0, y: pageRect.size.height / 2)

    context.rotate(by: -.pi / 4)

    let attributes: [NSAttributedString.Key: Any] = [

    .font: UIFont.boldSystemFont(ofSize: 30),

    .foregroundColor: UIColor.red.withAlphaComponent(0.5)

    ]

    text.draw(with: pageRect, options: .usesLineFragmentOrigin, attributes: attributes, context: nil)

    }

    let processor = Processor(configuration: configuration, securityOptions: documentSecurityOptions)

    try processor.write(toFileURL: processedDocumentURL)

    This method creates a new PDF with the watermark applied to all pages, which will remain even in other PDF viewers.

    For a temporary watermark that won’t be saved to disk, use the following:

    let renderBlock: PSPDFRenderDrawBlock = { context, pageIndex, pageRect, renderOptions in

    let text = "Temporary Watermark on Page \(pageIndex + 1)"

    context.translateBy(x: 0, y: pageRect.size.height / 2)

    context.rotate(by: -.pi / 4)

    let attributes: [NSAttributedString.Key: Any] = [

    .font: UIFont.boldSystemFont(ofSize: 30),

    .foregroundColor: UIColor.red.withAlphaComponent(0.5)

    ]

    text.draw(with: pageRect, options: .usesLineFragmentOrigin, attributes: attributes, context: nil)

    }

    document.updateRenderOptions(for: .page) {

    $0.drawBlock = renderBlock

    }

    This approach adds a watermark for display, but it won’t be saved in the document. For more details, refer to DrawOnPagesExample.swift(opens in a new tab) in the Nutrient Catalog.

    Explore our iOS demo:

    6. Advanced watermarking solutions with Nutrient Document Converter

    Nutrient Document Converter provides powerful watermarking capabilities for SharePoint, Power Automate, and Document Converter Services. These features ensure document security, enhance compliance, and support branding by adding dynamic, customizable watermarks to a wide variety of file types.

    Watermarking in SharePoint

    Add watermarks directly to your documents in SharePoint Online and on-premises environments using the following solutions.

    Automate the addition of watermarks such as text, images, barcodes, or QR codes. Place watermarks behind or in front of document content, and apply them to specific pages or page ranges.

    Integrate watermarking into advanced workflows using Nintex for SharePoint. Apply elements like shapes, text, or logos as watermarks, and manage multiple watermark actions with the composite watermark feature.

    Apply watermarks directly from the SharePoint interface for documents or list item attachments. Options include:

    • Dynamic watermarks — Custom user-specific watermarks that display when a document is opened.
    • Page-specific placement — Apply watermarks to odd/even pages, page intervals, or specific orientations (portrait or landscape).

    Watermarking with Power Automate

    Document Converter integrates seamlessly with Power Automate to enable watermarking within automated workflows.

    • Dynamic watermark content:

    Automatically include dates, times, user details, or metadata from connected systems.

    • Flexible options:

    Add text, images, barcodes, or shapes as watermarks, and control placement on single or multiple pages.

    • Custom automation:

    Easily configure workflows to apply watermarks dynamically during document processing, ensuring consistency and compliance.

    PDF watermark API for developers

    For custom solutions, Nutrient offers a robust PDF watermark API that allows developers to embed watermarks programmatically.

    • Dynamic customization:

    Add metadata, page numbers, user-specific data, and branding elements such as company logos or legal disclaimers.

    • Advanced features:
      • Place watermarks on specific pages (e.g. odd, even, intervals, portrait, or landscape).
      • Insert a variety of elements like text, QR codes, images, and barcodes.
      • Add machine-readable data for auditing or compliance.
    • Developer integration:

    Access sample code in C#, Java, .NET Core, PHP, and JavaScript to simplify implementation.

    Contact our Sales team for more information on Nutrient’s low-code solutions for watermarking.

    Comparison of Nutrient products

    ProductIdeal forKey strengths
    Document EngineAdvanced editing needsFull control, robust customization
    PDF watermark APIServer-side applicationsScalable, fine-grained control
    Web SDKBrowser-based solutionsLightweight, easy integration
    Android SDKMobile Android appsSeamless app integration
    iOS SDKMobile iOS appsOptimized for Apple devices
    Document ConverterNon-technical teamsQuick setup, low-code environment

    Get started with watermarks

    FAQ

    Use Nutrient SDK’s watermark API. You can add text or image watermarks with custom positioning, opacity, and rotation. See the code examples above for Document Engine, Web SDK, iOS, and Android.

    Yes. Nutrient SDK supports text watermarks (e.g. CONFIDENTIAL, usernames, timestamps) and image watermarks (e.g. logos, stamps). You can combine both on the same document.

    Static watermarks are the same on every document (e.g. a company logo). Dynamic watermarks include variable data like usernames, timestamps, or document IDs, which are useful for tracking and security.

    Yes. Nutrient SDK supports watermarks on iOS and Android. The watermark appears during viewing but doesn’t modify the original PDF unless you flatten it.

    Use the “flatten” action after applying the watermark. This burns the watermark into the PDF so it can’t be removed, even in other PDF viewers.

    Explore related topics

    Try for free Ready to get started?

    Related SDK articles

    Explore more