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.
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.
Let’s look at how easy is to use watermarks and backgrounds with Foxit PhantomPDF Mac. Add a watermark. To add a watermark to your PDF, go to the “Edit” tab. Next, select “Watermark” and choose “Add”. Then, ensure that the text option is checked and insert the text you want to use as the watermark in the blank box. Step3: Watermark for pdf file: Add image watermarks to PDF file, Click Add File button, choose your PDF file and watermarks templates. Click Output Preview button, see if this image watermarking effect is ok.
Specify the watermark:
- To reuse a watermark and watermark options that you saved in an earlier session, select it from the Saved Settings menu.
- To create a text watermark, select Text, and type the text in the box. Adjust the text formatting options as needed.
- To use an image as a watermark, select File. Then click Browse and select the image file. If the file has multiple pages with images, specify the Page Number you want.
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:
- PdDoc is the document onto which watermark will be added.
- TextParams is the structure describing the text-based watermark to be added.
- pParams is the structure specifying how the watermark should be added to the document.
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:
- pdDoc is the document onto which watermark will be added.
- pdPage is the page to be added as a watermark.
- pParams is the structure specifying how the watermark should be added to the document.Step text
To add watermark through JavaScript, Acrobat exposes two APIs as below:
- addWatermarkFromText(). This API adds the given text as a watermark to the specified pages in the document. For example, code below adds “Confidential” as a watermark to the center of all pages of the current document: this.addWatermarkFromText(“Confidential”, 0, font.Helv, 24, color.red);
- addWatermarkFromFile(): This API adds a page as a watermark to the specified pages in the document. For example, code below adds first page of watermark.pdf as a watermark to the center of all pages of the current document: this.addWatermarkFromFile(“/C/temp/watermark.pdf”);
For detailed explanation of all parameters, check out the API References available within the documentation folder of the Acrobat SDK.
How to watermark for PDF - add image watermark on PDF with Star PDF watermark for Mac
Add Watermark To Pdf In Preview For Mac 2016
Did you see a PDF file with image watermark? Such as company logo or a special symbolized image. Also want to add watermark to PDF file on Mac OS X? Yes! Now let’s add image watermark for pdf file to protect your PDF file copyright! All of your PDF files with image watermark only belong to you, so nobody can steal your file. How to watermark a pdf on mac? Hard and trouble? It’s very easy to add image to pdf file with Star PDF Watermark software.
Free Pdf Watermark
Star PDF Watermark for Mac is a batch PDF stamp tool for Mac, you can fast add watermark to PDF file. With the PDF watermarking software free version, you could add TEXT watermark for your PDF files, With the PDF watermark software purchased version, you can add not only TEXT watermark, but also IMAGE watermark on your PDF files. With the batch PDF Stamp tool, You could build your company brand, by having your company logo on all your PDF files, and you can add image watermark for PDF files with Position, Rotation and Transparency.
How to watermark for PDF file on Mac with Star PDF watermark software? It’s fast and easy. Now let’s add image to PDF files together.
Add Watermark To Pdf In Preview For Macbook Pro
Step 1: Launch Star PDF watermark software and create a new image template(watermarks Demo). You can create all kinds of watermarks demo.
Add Watermark Free App
Step 2: Click “Browes” button, then choose your image watermark(your logo or other photo),then Edit your image watermarks demo,
see the following pictures,
Add Watermark To Pdf In Preview For Mac 2017
Location: here you can put image watermarking in suitable place, such as Center Center, Top left, or rotate the image watermarking to good place, or adjust transparency and rotation the photo watermark.
Step3: Watermark for pdf file: Add image watermarks to PDF file, Click Add File button, choose your PDF file and watermarks templates. Click Output Preview button, see if this image watermarking effect is ok. If ok, click Processing button, then add image to pdf file successful!
You can also watermark for pdf file by adding text and image watermark both, you can add 1 image watermark and 1 text watermark together. Easy to use star PDF watermark software right? Now free download star PDF watermark for Mac software to protect your PDF files!