This article is for developers seeking help on how to add a watermark programmatically within a PDF. A watermark is a recognizable image or pattern, a common way to identify work and discourage its unauthorized use. A visible watermark can’t prevent unauthorized use. But it makes it more difficult for people who want to claim someone else’s photo or artwork as their own.
Step 2: Add Text Watermark. Click the Add Text button at the top of the PDF page. You should see a text watermark being added. Click on it to edit the text. Type 'Draft' or 'Classified' to try it out. Step 3: Change text size, rotation and location on page. Click and drag the text watermark to change the location on the PDF page. Downloads Click on a product name below to download it If your Operating System is 64 bit (x64) then you should download 64 bit version, if your computer is 32 bit (x86) then download 32 bit version.
In PDF, a watermark is text or an image that appears either in front of or behind existing document content, like a stamp. For example, you could apply a “Confidential” watermark to pages with sensitive information. You can add multiple watermarks to one or more PDFs, but it's necessary to add each watermark separately. You can specify the page or range of pages on which each watermark appears.
You can add watermark to a PDF through the user interface, or by using C++ code or JavaScript APIs.
Specify the watermark:
Note:
To update or remove watermark choose Document > Watermark > Update, or Document > Watermark > Remove.
There are two APIs that the Acrobat SDK offers for adding a watermark using C++
void PDDocAddWatermarkFromText (). This API adds a text-based watermark to a page range in the given document. The syntax of this API is as below:
void PDDocAddWatermarkFromText (
PDDoc pdDoc,
PDDocWatermarkTextParamsRec* pTextParams,
PDDocAddWatermarkParamsRec* pParams
);
The details of parameter are below:
void PDDocAddWatermarkFromPDPage (). This API adds a PDPage as a watermark to a page range in the given document. The syntax of this API is as below:
void PDDocAddWatermarkFromPDPage (
PDDoc pdDoc,
PDPage pdPage,
PDDocAddWatermarkParamsRec* pParams
);
The detail of parameters is as below:
To add watermark through JavaScript, Acrobat exposes two APIs as below:
For detailed explanation of all parameters, check out the API References available within the documentation folder of the Acrobat SDK.