Programmatically Add TCPDF Font February 18, 2021 Updated: August 11, 2025 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 15, 2021 Updated: August 15, 2025 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 […] Read more » Magic Tags Snippets WooCommerce
Which PDF Manipulation Library to Use? December 10, 2020 Updated: June 17, 2025 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 […] Read more » SetaPDF-Stamper
Watermark Width on a PDF October 20, 2020 Updated: June 12, 2025 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 […] Read more » Snippets
Communicating File Passwords to Customers: Best Practices for WooCommerce July 7, 2020 Updated: August 23, 2025 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
Custom Magic Tags for Watermarked WooCommerce PDFs June 1, 2020 Updated: August 23, 2025 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 […] Read more » Magic Tags Snippets WooCommerce
Customized PDF Gift Certificates: A Case Study May 1, 2020 Updated: June 19, 2025 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, Little Package 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 […] Read more »
Custom Fonts with SetaSign-Stamper March 21, 2020 Updated: June 17, 2025 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 […] Read more » SetaPDF-Stamper
How to Watermark your PDF with “Confidential” or “Do Not Distribute” April 22, 2019 Updated: August 25, 2025 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 »
Phone Number as PDF Password March 19, 2019 Updated: August 22, 2025 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 […] Read more »
Brazil Shops can add CPF to a PDF October 6, 2018 Updated: August 15, 2025 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 […] Read more » Magic Tags Snippets WooCommerce
TCPDF Performance Tuning April 26, 2016 Updated: August 30, 2025 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 […] Read more »