Different Stamp on First Page February 20, 2023 Updated: March 20, 2025 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 […] Read more » Snippets
PDF Watermark Feature Requests September 1, 2022 Updated: January 24, 2025 Lately several customers have been reporting that the competitor’s WooCommerce PDF Watermark plugin is broken, and they’re relieved to have found us. It’s a shame it broke for whatever reason, and we are glad to have you here! Today I took a look at the Woo PDF Watermark feature request list, and it gets me wondering: why people pay more for less plugin? Set per document password PDF Ink has always allowed users to set unique watermarking properties for individual WooCommerce products. Even more, it allows users to set watermarking properties for variations of products. So each PDF can have a different password. Each PDF can have a different watermark. […] Read more »
Programmatically Add TCPDF Font February 18, 2021 Updated: January 22, 2025 If you’re not a developer and don’t know one or won’t hire one, you might want to stop reading here. 😜 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: March 20, 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
Which PDF Manipulation Library to Use? December 10, 2020 Updated: March 20, 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 »
Watermark Width on a PDF October 20, 2020 Updated: March 20, 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 PDF Passwords to Customers: Best Practices for WooCommerce July 7, 2020 Updated: April 3, 2025 A few emails came in recently asking about how to let customers know their PDFs are password-protected. We definitely want to avoid any confusion or frustration caused by customers receiving passworded PDFs and not knowing what their password is. When it comes to sharing passwords, especially for PDF files, clear communication is essential. Website administrators often share passwords automatically with users and customers, but this can lead to confusion if the password is not clearly and repeatedly communicated. If the message is sent once, it is highly likely the customer will miss it. Who reads anymore these days, right? (It’s amazing you’re even reading this!) One person in particular wanted […] Read more »
Custom Magic Tags for Watermarked WooCommerce PDFs June 1, 2020 Updated: March 20, 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
Customized PDF Gift Certificates: A Case Study May 1, 2020 Updated: March 20, 2025 I’m not sure about you, but we here have definitely been weaving in and out of Space Madness lately. Never seen Ren & Stimpy’s Space Madness? Oh no! Check it out. Lately I especially relate to the gravity free bath soap scene… Back to Reality… Most retailers — and all 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 […] Read more »
Custom Fonts with SetaSign-Stamper March 21, 2020 Updated: March 20, 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 three packaged with the plugin (Times, Courier, and Helvetica). Start by finding a TrueType font (.ttf) file which suits your needs. Try to keep the file size small, sub-setting if necessary so that your server isn’t bogged down managing a large font file while trying to manipulate your PDF. Upload the file to your wp-content/uploads directory, somewhere it won’t get overwritten. It makes sense to use the pdf-ink folder, so we’ve […] Read more »
Brazil Shops can add CPF to a PDF October 6, 2018 Updated: March 20, 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 creat the magic tag [BILLING_CPF] to import any customer’s CPF number into their personalized PDF. The plugin mentioned above must be in use, or this code will need to be modified to […] Read more » Magic Tags Snippets
TCPDF Performance Tuning April 26, 2016 Updated: March 20, 2025 Make sure to test your watermarking thoroughly before going live! TCPDF is a fallible 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. Stay realistic, think carefully through the process, plan, and do your testing. PHP Version You should be running at least PHP version 7.2 for the plugin to work, but higher that for it to work WELL. WordPress recommends you run PHP version 7.4 or higher, but even that is old PHP! PDF Ink is PHP version 8.3+ compatible, so don’t hesitate to upgrade […] Read more »