WooCommerce PDF Watermark

WooCommerce PDF Watermark allows you to stamp/watermark eBooks and other PDF downloadable files with custom text or images to prevent and identify unauthorized sharing.

You can also protect PDF files further by enabling copy, print and modification protection, as well as password-protecting your files.

Note: Enabling PDF Watermark on your download removes all links within the PDF file. If you would like to see links added as a feature, vote for it on the Ideas page.

1. Requirements

↑ Back to top
  • The hosting server must have FPDF installed
  • PDF Version should be 1.4 and under
  • PDF should contain no layers

Certain hosting environments use security settings that prevent PDF Watermark from working properly. If you encounter difficulty, manually upload your PDF file via FTP to your site’s root folder.

In order for the Watermark extension to function properly, the uploaded PDF files should be PDF version 1.4 and under and contain no layers. If you encounter errors when uploading a PDF for a product, try saving with a lower PDF version and ensure the document is flattened.

2. Installation

↑ Back to top
  1. Download the .zip file from your WooCommerce account.
  2. Go to: WordPress Admin > Plugins > Add New and Upload Plugin with the file you downloaded with Choose File.
  3. Install Now and Activate the extension.

More information at Install and Activate Plugins/Extensions.

3. Setup and Configuration

↑ Back to top

Global Setup

↑ Back to top

Global settings apply to all PDF downloads in your store, and you can disable or change some of these at the Product and Variation level.

What are Global Settings?

Global are the default settings which will be applied to all PDFs. Global settings apply to all PDF downloads in your store, and you can disable or change some of these at the Product and Variation level.

What is the difference between Global vs Product Specific Settings?

Global are the default settings that will be applied to all PDFs. Global settings apply to all PDF downloads in your store, and you can disable or change some of these at the Product and Variation level.

Product Specific WooCommerce PDF Watermark settings allow you to disable or override certain Global settings on a product and variation level, meaning you can have more control over what PDF files you want watermarked and even set different text or image watermarks for different products.

Go to WooCommerce > Settings > PDF Watermark.

WooCommerce PDF Watermark Global Settings
WooCommerce PDF Watermark Settings

What settings are available in the PDF Watermark Settings Page?
  • Watermark Type – The type of watermark you want to apply to PDF downloads, you can either choose an image watermark or a text watermark.
  • Watermark Image – The URL to a locally uploaded image to use as the watermark. You can use the WordPress Media Uploader to upload images and then simply copy the URL. Media > Add New in the WordPress admin area.
  • Watermark Text – The text to use for text-based watermarks, you can use a list of predefined tags to personalize the text based on the customer who is downloading the file. If the supplied tags is not sufficient, you can hook into the wc_pdf_watermark_parse_template_tags filter to define your tags.
  • Font – The font to use for text watermarks.
  • Font Size – The size of the font to use for text watermarks.
  • Font Style – Whether you want the text to be bold, italics or underlined.
  • Font Color – Color of the font to use for text watermarks.
  • Watermark Opacity – This controls the transparency of the watermark text or image, 0 = fully transparent, 1 = fully opaque.
  • Horizontal Position – Horizontal location where the watermark must be placed.
  • Vertical Position – Vertical position where the watermark must be placed.
  • Horizontal Offset – If you require extra padding to the left and right of your text or image you can specify that here, you can use positive and negative numbers.
  • Vertical Offset – If you require extra padding to the top and bottom of your text or image you can specify that here, you can use positive and negative numbers.
  • Display on pages – On what pages you would like the watermarks to display, you can choose between All, First, Last, and Alternate. Alternate will put it on every other page.

Note: Font size and offsets are all set in ‘pt’ unit.

Advanced Settings

↑ Back to top

Advanced settings allow you to add further protection by applying certain PDF protection standards to the documents.

WooCommerce PDF Watermark Advanced Settings
Advanced Protection Settings
  • Password Protection – Password-protest the PDF, so customers need to use the email on their order to open the files.
  • Copy Protection – Prohibit any form of copying from the PDF file.
  • Print Protection – Prohibit printing of PDF downloads.
  • Modification Protection – Prohibit the modification of any PDF downloads.
  • Annotation Protection – Prohibit any for of annotations on any of the PDF downloads.

Product/Variation Settings

↑ Back to top
What is the difference between Global vs Product Specific Settings?

Global are the default settings that will be applied to all PDFs. Global settings apply to all PDF downloads in your store, and you can disable or change some of these at the Product and Variation level.

Product Specific WooCommerce PDF Watermark settings allow you to disable or override certain Global settings on a product and variation level, meaning you can have more control over what PDF files you want watermarked and even set different text or image watermarks for different products.

Product and Variation specific settings are only available on downloadable products and variations.

WooCommerce PDF Watermark allows you to disable or override certain Global settings on a product and variation level, meaning you can have more control over what PDF files you want watermarked and even set different text or image watermarks for different products.

WooCommerce PDF Watermark Simple Product Settings
Simple Product Settings
WooCommerce PDF Watermark Variable Product Settings
Variable Product Settings
  • Disable – Whether or not this product should be watermarked
  • Override – Should this product be watermarked with custom watermark settings.
  • Watermark Type – The type of watermark to apply to this product.
  • Watermark Image – URL of the image to use as the watermark for this product.
  • Watermark Text – Text to use as the watermark for this product, you can use a list of predefined tags to personalize the text based on the customer who is downloading the file. If the supplied tags is not sufficient, you can hook into the wc_pdf_watermark_parse_template_tags filter to define your own tags.

4. Customization

↑ Back to top

WooCommerce PDF Watermark can be extended using hooks and filters, giving developers ultimate control to do almost anything they like with the extension without touching existing code.

Note: This is a Developer Level section. If you are unfamiliar with code and resolving potential conflicts, select a WooExpert or Developer for assistance. We are unable to provide support for customizations under our  Support Policy.

Adding more tags to text watermarks

↑ Back to top

The extension comes with tags that can be used to personalize text watermarks based on customer details. This is extendible, allowing you to add your own tags if you wish.

Below is an example of how to add more tags, namely how to add a {product_title} tag:

/*
* Snippet to add more tags to text watermarks.
* Code goes in the functions.php file in your theme.
*/
function wc_pdf_watermark_extend_template_tags( $parsed_text, $unparsed_text, $order, $product ) {
// Look for {product_title} in text and replace it with the product title
$parsed_text = str_replace( '{product_title}', $product->get_title(), $parsed_text );
return $parsed_text;
}
add_filter( 'woocommerce_pdf_watermark_parse_template_tags', 'wc_pdf_watermark_extend_template_tags', 10, 4 );

Supported tags

↑ Back to top
  • {first_name} – The billing first name
  • {last_name} – The billing last name
  • {email} – The billing email address
  • {order_number} – The order numbers
  • {order_date} – The order date
  • {site_name} – The name of your site as defined in the WordPress settings page
  • {site_url} – The URL of your site

Change password used for protecting PDF downloads

↑ Back to top

If you have password protection enabled on your PDF files, it will use the billing email of the customer as the password. However, you can change that password by using:

/*
* Snippet to change password used for protecting PDF download
* Code goes in the functions.php file in your theme.
*/
function wc_pdf_watermark_change_pdf_password( $order_id, $product_id ) {
// Use the order number for the password instead of the billing email
$order = wc_get_order( $order_id );
return $order->get_order_number();
}
add_filter( 'woocommerce_pdf_watermark_file_password', 'wc_pdf_watermark_change_pdf_password' );

Troubleshooting:

↑ Back to top
What PDF Versions are supported by the Plugin?

PDF files with PDF version 1.4 or lower.

Can I use this plugin if my site has PDFs which are newer than version 1.4?

For clients who want to support all PDF versions or newer types (Version 1.4+) you can use the plugin by converting your PDFs to version 1.4. There are many free services online to do this, and it will only need to be converted once and then uploaded to your store. Docupub.com PDF converter online is an example of a tool for converting PDF versions online and easily.

How to convert a PDF from one format to another?

For clients who want to support all PDF versions or newer types (Version 1.4+) you can use the plugin by converting your PDFs to version 1.4. There are many free services online to do this, and it will only need to be converted once and then uploaded to your store. Docupub.com PDF converter online is an example of a tool for converting PDF versions online and easily.

Can I use this plugin if my site has PDFs which are newer than version 1.4?

For clients who want to support all PDF versions or newer types (Version 1.4+) you can use the plugin by converting your PDFs to version 1.4. There are many free services online to do this, and it will only need to be converted once and then uploaded to your store. Docupub.com PDF converter online is an example of a tool for converting PDF versions online and easily.

How to convert a PDF from one format to another?

For clients who want to support all PDF versions or newer types (Version 1.4+) you can use the plugin by converting your PDFs to version 1.4. There are many free services online to do this, and it will only need to be converted once and then uploaded to your store. Docupub.com PDF converter online is an example of a tool for converting PDF versions online and easily.

Can the plugin support all PDF versions?

No, the plugin only allows your store to support and watermark PDF files with PDF version 1.4 or lower.

Why am I seeing this error: ‘Unable to create output file!

1. Unable to create output file Issue: PDF Watermark Corrupting site. Every time a customer (or myself) goes to download a product that they have purchased, we see the error ‘Unable to create output file!

The ‘Unable to create Output file!’ error is caused when the plugin is unable to create the PDF Watermarked version of your file. This is usually due to a non-supported PDF Type being used. Please review the plugin Requirements section above to test and ensure your PDF file type is supported.

Does the PDF Watermark Plugin Support EPUB?

EPUB functionality is not currently supported within the PDF Watermark Plugin. We are working on support for this soon.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.