October 6, 2018 Updated: January 22, 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. This is simple PHP code. It can be edited ad lib to accomplish your particular goals. Add […]
Read more »
April 26, 2016 Updated: February 6, 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 […]