Unique Stamp/Password For Each WooCommerce Product PDF April 17, 2023 Updated: March 20, 2025 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 […] Read more » Snippets
Accessible PDF Stamping March 23, 2023 Updated: June 12, 2025 Many people and organizations put the extra care into their PDF documents to ensure they are usable by ALL humans, not just people with good vision and keyboard/mouse dexterity. What makes a PDF accessible? It is often imperative documents be accessible due to accessibility codes and laws. So it must be very frustrating to have accessibility features removed by a PDF manipulation plugin! Unfortunately, the open-source PDF manipulation libraries used by many plugins does not allow for robust or reliable PDF manipulation. Namely, TCPDI/TCPDF depends on being fed a syntactically correct PDF, and then because of the way objects are read flat into PHP memory during the process, certain PDF […] Read more »
How to get a WordPress Media (attachment) ID February 25, 2023 Updated: March 17, 2025 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 […] Read more »
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: June 12, 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: June 12, 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: 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 PDF Passwords to Customers: Best Practices for WooCommerce July 7, 2020 Updated: June 12, 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 »