Skip to content
PDF Ink Watermark. Encrypt. Password.
Menu
  • Home
  • Docs
  • Blog
  • Contact
Download   Search Account
Download
Account

Blog

Stamping WooCommerce product variation on PDF

November 13th, 2023

Here is some PHP code for WordPress/WooCommerce which will make PDF Ink recognize TWO custom shortcodes in any watermark content: [VARIATION_DESC] and [VARIATION_NAME]. These translate to variation description and variation name, both aspects of a WooCommerce variable product. This code (everything above the dashed line) should get added anywhere in your functions.php file. If unsure where to put it, add it at the end of the file. You could also add the snippet using the WordPress plugin called “CODE SNIPPETS” (front and back end). This snippet development was sponsored by customer Michael. Thanks Michael! For reference (maybe for people migrating from WaterWoo to PDF Ink) here is a snippet which would have worked with WaterWoo:

Read more »

Magic Tags Snippets WooCommerce

Comparing the Best PDF Watermarkers for WooCommerce

October 27th, 2023

When choosing between WooCommerce PDF Watermark and PDF Ink for watermarking and passwording PDFs, both plugins offer essential features but differ significantly. PDF Ink provides greater flexibility with customizable watermarks, allowing HTML tags, custom fonts, and multiple watermark locations. It supports advanced encryption options like AES and offers robust file management, including recycling previously watermarked PDFs. In contrast, WooCommerce PDF Watermark has limitations, such as fewer customization options and higher pricing. Read the full comparison!

Read more »

SetaPDF-Stamper WooCommerce

Invisible Watermarks and Other Ways to Protect Your PDFs

April 26th, 2023

PDFs are a fantastic way to share documents – they preserve formatting, are widely compatible, and can even be compressed for easy transmission. But what if that PDF contains confidential, sensitive or monetized information? The Portable Document Format (PDF) offers some security, which when stacked can be quite effective. These include: Invisible Watermarks: A Non-Visual Deterrent A watermark (also called a stamp) is usually a semi-transparent image or text stamped onto the background of each page in a document. The watermark can be your company logo, a confidential notice, or even a name or # copies authorized, or a copyright notice. While watermarks can’t completely prevent copying, they do make unauthorized distribution visually unappealing. Watermarks […]

Read more »

Unique Stamp/Password For Each WooCommerce Product PDF

April 17th, 2023

A customer wrote with a neato request last month. If one WooCommerce product had several PDFs, and wasn’t a variable product, how could each PDF in the list be watermarked differently from the others? There is no setting for that inside PDF Ink because WooCommerce hasn’t exactly made that function easily possible, and also because it somehow hadn’t been requested until last month. That’s sort of amazing considering how long the plugin has been around! Anyway, it was a good request and so we added a filter hook called ‘pdfink_woo_filter_settings‘. (This hook replaces the ‘wwpdf_filter_settings_array’ in WaterWoo PDF Premium, with identical arguments.) Filtering Settings Because WooCommerce — unlike Easy Digital Downloads — doesn’t give a […]

Read more »

Snippets WooCommerce

Accessible PDF Stamping

March 23rd, 2023

Creating accessible PDFs is essential for ensuring that all users, including those with disabilities, can effectively interact with your documents. Unfortunately, many PDF manipulation plugins can inadvertently strip away accessibility features, leading to frustration for both creators and users. Unlike traditional libraries that may lose important features during processing, the SetaPDF library from SetaSign offers a robust solution by parsing PDF objects directly, allowing for on-the-fly error correction and preserving accessibility.

Read more »

How to get a WordPress Media (attachment) ID

February 25th, 2023

There are several ways to go about getting the attachment ID (of the ‘attachment’ WordPress post type, stored in the wp_posts WPDB (WordPress Database) table. Here are some of them: From the Media Library: Navigate to Dashboard -> Media. Here you will see your WordPress uploads (Media), either in grid view or list view. They’re both fine, it’s just a preference thing. Instructions for both are below. You can click the small icons to change the Media view from list to grid or vice versa. List View If in List view, navigate to the item by scrolling or using the search bar at the top right. Then hover over the title of that file, like […]

Read more »

Different Stamp on First Page of PDF

February 20th, 2023

Brought to you by a longtime user, Jake, is the following snippet, which allows for a different stamp on the first page than all other pages. This is a function for users of TCPDF. PDF Ink loops through each PDF page with TCPDF to apply watermarks. What this PHP code says is that if inside this loop, and we are on the first page (the page indicated as “start_page” in PDF Ink settings), apply the special stamp. For all other pages, business as usual (maybe a different stamp. The code needs to be cut and pasted into your WordPress child theme functions.php file, or maybe using the Code Snippets plugin if you are uncomfortable working […]

Read more »

Snippets

PDF Watermark Feature Requests

September 1st, 2022

Lately several customers have been reporting that the official WooCommerce “PDF Watermark for WooCommerce” plugin is broken, and they’re relieved to have found us. It’s a shame it broke for whatever reason. We are glad to have you here! Taking another look at the PDF Watermark for WooCommerce feature list and the two promised “coming soon” features they’ve had posted for over 5 years gets us wondering, though: why people pay more for less plugin features? And what is in a WordPress plugin name? Feature Comparisons Below follows a brief list of PDF watermarking plugin features where the two plugins differ vastly; our plugin blowing the competition out of the… galaxy. Set per document password […]

Read more »

SetaPDF-Stamper

Programmatically Add TCPDF Font

February 18th, 2021

If you’re not a developer and don’t know one or won’t hire one, you might want to stop reading here. 😜 Most PDF Ink users will not need this information, anyway. The filter “pdfink_filter_tcpdf_font_name” adds more granular control of font use during TCPDF manipulations. The font will be added to TCPDF using AddFont(). The $font value returned will be run in $tcpdf->SetFont(). See documentation on the TCPDF AddFont() method.

Read more »

Creating your Own Dynamic PDF Watermarks for WooCommerce

February 15th, 2021

There are quite a few built in shortcodes, but sometimes we just need something… special. You can add your own shortcodes to PDF Ink for on-the-fly customized watermarks on PDF pages. In this simple example we are going to create a shortcode to reflect a customer’s order total (price) in the watermark, when using a custom shortcode: [TOTAL_PRICE] Now when you use [TOTAL_PRICE] in your watermark, the PDF will show the total price of the WooCommerce order the PDF was purchased in. Perhaps this way you could print out the price on a gift certificate. More on how to create gift certificates using PDF Ink can be found here. Another Example In the following example […]

Read more »

Magic Tags Snippets WooCommerce

Which PDF Manipulation Library to Use?

December 10th, 2020

At the moment there are quite a few softwares (mostly paid) that allow you to manipulate PDF files as they are sold online. Some even allow you to add identifying customer data to the PDF in order to copyright, encrypt and password intellectual property. Currently the WordPress plugin scene includes three main routes for PDF manipulation. Risking simplifying things to a degree and possibly excluding outliers on the market, most products for WordPress will use these library set #4: Watermarkers using FPDI/FPDF (Option 4) include WooCommerce PDF Watermark from WooCommerce, the Ignite WooCommerce PDF Watermark Stamper, and Tips & Tricks’ WP PDF Stamper. Basically, all the competition uses the same library set. Some competitors have […]

Read more »

SetaPDF-Stamper

Watermark Width on a PDF

October 20th, 2020

A customer just brought up an interesting point: since the watermark width (“cell width” in TCPDF terms) is determined by the PDF page width, won’t a line of text be a “little short” (limited) if the watermark is rotated diagonally? Since it would take a lot of math with a few variables (page size, mainly) to determine the max cell width based on degree of rotation, we just included a new filter in PDF Ink instead. It’s called ‘pdfink_filter_cell_width’. (Hey, I like math but it’s still really smokey in California and getting hard to think.) The following code is a simple example of an attempt to override the cell width with 300mm, which should work […]

Read more »

Snippets

Communicating File Passwords to Customers: Best Practices for WooCommerce

July 7th, 2020

Clear communication about password-protected PDFs is crucial to avoid customer confusion. For WooCommerce shops, customize the Thank You page and order confirmation emails to inform customers of their PDF passwords. Use hooks to add messages indicating that passwords are their email addresses or phone numbers. Highlight this information with bold text or colors to ensure it stands out. Effective communication enhances the customer experience, reduces support inquiries, and builds trust, ultimately leading to repeat business and positive word-of-mouth for your shop.

Read more »

Snippets WooCommerce

Watermark WooCommerce PDFs with Custom Data

June 1st, 2020

If you would like to create a custom magic tag to display dynamic output, that can usually be done using filter hooks included in PDF Ink. The filter hook to use is ‘pdfink_filter_placement_content’ and the parameters it passes are $content, $key, $order_id and $product_id. $key refers to the placement: 0 is the first placement, 1 is the second, and if you have more, they’d be numbered 2, 3, 4 etc. PSST! The ‘pdfink_filter_placement_content‘ hook also works for Easy Digital Downloads and Download Monitor, with nearly identical parameters. Keep reading! Unless you are adding static content (such as the hour), or global data (such as the $_SERVER[‘REMOTE_ADDR’]), it’s necessary that you have collected and have reliable […]

Read more »

Magic Tags Snippets WooCommerce

Customized PDF Gift Certificates: A Case Study

May 1st, 2020

Many retailers — and most businesses for that matter — are scrambling to stay afloat during the Great Shutdown of 2020. Here we are no different. Aside from building and supporting WordPress plugins, Canyon Webworks also builds and services websites near and far. Clients want to know: when it’s impossible to have customers in the store and clients face-to-face, how can money be made? One fairly obvious, and earnest-enough, method is by selling your reputation on paper: gift certificates and gift vouchers. For many businesses there is a real opportunity for income here. And many (future) loyal customers understand that purchasing gift certificates is a way to support businesses right now. They know that by […]

Read more »

Custom Fonts with SetaSign-Stamper

March 21st, 2020

The SetaPDF Core library allows quite a bit of font customization to be done. Check out the official documentation on SetaPDF and fonts & encoding. For the meantime, a quick tutorial on how to get other fonts beyond the five packaged with the plugin (Times, Courier, Helvetica, Symbol & Zapf Dingbats). There are two methods: settings panel and programmatic. 1. Adding Fonts Via The Settings Panel Under the font selection in PDF Ink settings, you will see a link to add a custom font. Click it! This will take you to a font uploader screen. There is also a link called “Add Fonts” in the main WordPress sidebar menu. Upload your TTF file. Most TTFs […]

Read more »

SetaPDF-Stamper

How to Watermark your PDF with “Confidential” or “Do Not Distribute”

April 22nd, 2019

In today's fast-paced business world, protecting sensitive information is crucial. Adding legalese to your PDFs can safeguard your documents, and with PDF Ink, you can easily add watermarks like "confidential" or "do not distribute" during download. This process is quick and requires minimal effort, allowing for easy updates. Personalization options, such as custom headers, footers, and even coupon codes, enhance your PDFs further. With PDF Ink, you can ensure your EPUB and PDF documents are both secure and professional. Happy watermarking!

Read more »

Setting Phone Number as a PDF Password

March 19th, 2019

PDF Ink comes with the built-in ability to use a customer’s email as PDF password, but what if we want to use their phone number or an admin-chosen string instead? Here is some example code which will get that done. Make sure to test it, and customize ad-lib to suit your purposes. Of course if you want to set the password as the phone number, you will need to make the phone number field mandatory in your checkout. Phone as password is not a default setting in PDF Ink because WooCommerce carts do not require a phone number by default (it is optional). So make sure to make that field REQUIRED if you are going […]

Read more »

Brazil Shops can print CPF on a PDF

October 6th, 2018

Here is an example of adding new magic tags to PDF Ink for on-the-fly and totally-customized watermarks. A Brazilian customer using WooCommerce requested a magic tag to display the Cadastro de Pessoas Físicas (CPF) on PDFs. CPF is a taxpayer identification number all citizens of Brazil must use to shop online within Brasil. In order to collect CPF data from customers, our customer uses the Woocommerce Extra Checkout Fields for Brazil plugin.* We wrote the following code to programmatically create the magic tag [BILLING_CPF]. This magic tag will import any customer’s CPF number into their personalized PDF during stamping (when the customer clicks download). The “WooCommerce Extra Checkout” plugin mentioned above must be in use, […]

Read more »

Magic Tags Snippets WooCommerce

TCPDF Performance Tuning

April 26th, 2016

TCPDF is a third-party library which does its best to parse/understand and re-write your PDF with your desired changes (watermarks/encryption/etc), but it cannot possibly work on all PDFs and on all servers 100% of the time. Below are some suggestions on how to make your setup play nice with your server (part of a disk on a computer in a room somewhere in the world you probably have limited control over). Stay realistic, think carefully through the process, plan, and do your testing. Hosting Plans If you have large PDFs, complex watermarks (HTML, images, fonts, encryption) and/or heavy customer traffic, you may also want to upgrade your hosting so you can use more CPU if […]

Read more »

Page navigation
  • Page 1
  • Current Page 2
Sidebar

About Us

Based in the US desert Southwest, we've been building practical, functional PDF-wrangling plugins for WordPress since 2014. We know a thing or two about WordPress and PDFs and want to help you succeed! Learn more

Get PDF Ink

The most robust PDF watermark & password solution for WordPress & PHP, since 2014!

Download PDF Ink

∙ Easy to set up and use
∙ 30-day money back guarantee

Recent Posts

  • Pull Order Data from WooCommerce and Stamp Your PDFs – with VAT Info
  • Rewrite PDF Links on the Fly
  • Small‑Biz Perseverance v. Big‑Corp Muscle – A WordPress Plugin Battle
  • Stamp Sequential Order Number on PDF
  • Block AI from Scraping PDF Content
  • Add a Fun Barcode Shape to Your PDFs
  • PDF Reader & Writer – A Friendly Guide to Keeping Your PDFs Healthy
  • New: EPUB Watermarking!
  • Using Sample PDFs for Marketing & Search Engine Optimization
  • How to Keep Links in PDF Table of Contents

PDF Ink

Open-source PHP-based PDF manipulation for WordPress & beyond.
Adds watermarks, passwords and content to existing PDF files.
Proudly made with love since 2014.

Resources

FAQ

Demo

Documentation

Blog

Search

L'ink In

Get PDF Ink

Account

Contact

Terms & ConditionsPrivacy

® 2026 Canyon Webworks, LLC. All Rights Reserved.