Category : WordPress Plugins

Comparing the Best PDF Watermarkers for WooCommerce

Let’s compare the two most well-known plugins available for WooCommerce PDF file download watermarking/passwording. As we go down the list between the two WordPress plugins, you will find there really is no competition: our plugin PDF Watermark for WooCommerce (AKA WaterWoo) is the most fully-featured, up-to-date, best-supported, and well-loved PDF manipulation (password & watermark) plugins for WordPress!

Full PDF barcode support for TCPDF Bridge

It’s pretty easy to create a QR code that opens a PDF. Google that and you’ll find a million results. But it’s a little trickier to add a QR code to an existing PDF. The TCPDF Bridge WordPress plugin can do that now! We’ve added settings to the TCPDF Bridge plugin settings panel to make adding different barcode types (including QR codes) to your PDFs, whether for retail, pharmacy, or industrial purposes. Since the plugin allows you to accept some user input before your PDF file is downloaded, you can even include that data in your barcode! Completely customized barcodes added on-the-fly to your PDFs, as they are downloaded… that’s pretty cool šŸ˜Ž Here are the types of barcodes supported by TCPDF Bridge: CODE 39. Also called Alpha39, Code 3 of 9, Code 3/9, Type 39, USS Code 39, or continue readingā€¦

Invisible Watermarks and Other Ways to Protect Your PDFs

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 sensitive or monetized information? The Portable Document Format (PDF) offers some security, which when stacked can be quite effective. These include: Watermarks. Adding content to a PDF, especially content customized to the end-user (such as their name and other personally-identifying information like phone/email, can not only personalize a PDF, but also thwart unauthorized sharing. Keep reading to find out how to make your watermarks most effective against PDF theft. Encryption. Arcfour RC4, and the superior 128-bit key or 256-bit AES encryption Passwording. User and owner passwords can be set. An owner password gives the holder full control over the PDF, including the ability to remove passwording entirely — share with caution! continue readingā€¦

Accessible PDF Stamping

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 does this mean? 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 I use for many of my 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 features in the stream are necessarily lost. Marking/passwording with TCPDI/TCPDF or FPDI/FPDF is lossy, no way around it. However, the SetaPDF library from SetaSign works differently by parsing continue readingā€¦

Different Watermark on First Page

Brought to you by a longtime user, Jake, is the following snippet, which allows for a different watermark on the first page than all other pages: function jakes_custom_overlay_function( $page, $watermark, $o_X_margin, $o_Y_margin, $cell_width ) { // Only do an overlay on the first page $start_page = empty( $watermark->settings[‘start_page’] ) ? 1 : intval( $watermark->settings[‘start_page’] ); if ( $page === $start_page ) { $ishtml = false; // If watermark has HTML Multicell needs HTML argument if ( $watermark->overlay != strip_tags( $watermark->overlay ) || strpos( $watermark->overlay, ‘opacity:’ ) !== false ) { $ishtml = true; } $watermark->pdf->MultiCell( $cell_width, 1, $watermark->overlay, 0, ”, false, 1, $o_X_margin, $o_Y_margin, true, 0, $ishtml, false, $watermark->size[‘h’], ‘T’, false ); } } add_action( ‘wwpdf_custom_overlay_function’, ‘jakes_custom_overlay_function’, 10, 5 ); WaterWoo loops through each PDF page with TCPDF to apply watermarks. What this PHP code says is that if inside continue readingā€¦

PDF “Security”

Lately folks have been raising the alarm that passwords and content can be removed from PDFs. Unfortunately, this just isn’t news. When was the Internet a safe place to store or share documents? What does a PDF have in common with NASA, the Pentagon, Nasdaq, and most credit card companies? They are all demonstrably hackable. And if a multi-billion dollar organization can be hacked, you bet your bottom dollar your PDF can be, too. You can also bet that a

WordPress.org plugins return

The Little Package free wordpress.org plugins are back up! The delay between when they were put back up and now should tell you just how buried I am. Thank you to my new friends who provided help with this – you know who you are! It turned out the funnel from wordpress.org to my paid plugin offerings is REAL, and when WordPress shut me down, my income came to a halt. Generally February-April are bad months for online sales anyway, but I wasn’t anticipating crickets! And so I got busy and coded like… my income depended on it. The new version of Gift Wrapper for WooCommerce especially is improved. I hope folks jump on into version 5.1 ASAP, since it includes security updates. Against my better judgement I kept up with the CTA inside WordPress admin, soliciting folks to upgrade, continue readingā€¦

Where are the WordPress.org free plugins?

I’m getting too many emails about this to answer them all, sorry. Hopefully I can answer you here. I write and maintain WordPress plugins for a living. For ~8 years I have also provided and supported free plugins on the side. I provide two plugins in the free (open-source) WordPress.org plugin repository, both of which are well-loved and rated. As you may have noticed, they were abruptly removed by WordPress on January 24th. It was a surprise to me, too! Frankly I have been feeling burned out on supporting free software, so maybe this is a chance for me to at least say my piece. One has to think abstractly for it to feel rewarding, as in “I know people aren’t saying anything, but I imagine these plugins make the world better and peoples’ days easier.” I also feel like continue readingā€¦

PDF Stamper improvements

Not only are we actively maintaining all our plugins, but we have been trickling out improvements… realized while we work on the successor to our PDF stamping plugins. For example, with version 1.2 of PDF Stamper (and v1.3 of EDDiStamper) there is better handling of PDF pages of varying size, in order to keep stamps inside the page boundaries, where you want them. These improvements occur as parent library improvements occur, and as we learn and grow! Oftentimes people wish to create their own dynamic shortcodes for stamping customer/user data on PDF files. We’ve made that easier with the filter hook ‘woostamper_filter_shortcodes.’ This hook allows you to adjust how stamping shortcodes (such as [FIRSTNAME], [EMAIL] etc) are parsed. Here is some example code showing how this filter might be used to prefer the WordPress user profile data over WooCommerce order continue readingā€¦

Creating your Own Watermarking Shortcodes for WooCommerce

You can add your own shortcodes to WaterWoo PDF Premium for on-the-fly customized watermarks. 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 shortcode: [TOTAL_PRICE] function fetch_woo_order_data_as_shortcode( $input, $order_id, $product_id ) { // first we need to get the order object from the order id // you can get a lot of info from the order object ( $order in this case) $order = wc_get_order( $order_id ); // now let’s get the order data from the order object $order_data = $order->get_data(); $order_total = $order_data[‘total’]; // BINGO! // there is a ton of other data you can get from the WC order object data, check out // https://stackoverflow.com/questions/39401393/how-to-get-woocommerce-order-details // and substitute in what you need into the code that follows below // if there isn’t a continue readingā€¦

Which PDF Watermarker for WordPress is Best for You?

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 three library sets: Option 1: TCPDF (using TCPDI as a parser) Option 2: FPDF (using FPDI as a parser) Option 3: SetaPDF Stamper The only watermarkers currently using Option 1 are WaterWoo for WooCommerce, EDDiMark for Easy Digital Downloads and WP TCPDF Bridge for WordPress general use. Watermarkers using Option 2 include WooCommerce PDF Watermark from WooCommerce, the Ignite WooCommerce PDF Watermark Stamper, and continue readingā€¦

Watermark Width on a PDF

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, I just included a new filter in WaterWoo instead. It’s called ‘wwpdf_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 on pages larger than A4. The code includes a fallback if it won’t work. add_filter( ‘wwpdf_cell_width’, ‘my_custom_cell_width_function’, 10, 2 ); function my_custom_cell_width_function( $cell_width, $page_size ) { continue readingā€¦

Sharing Passwords

That title probably caught your attention because… when do we ever share passwords? Actually, we do, a lot. Website administrators often have to share passwords with users and customers who have just been issued a password. Generally that is done automatically, without the administrator ever having any idea what password was shared. You know, for security. And this is something to think about for administrators who are passwording PDF files just before delivery. How will you let the end user know what the PDF password is? In case you’re stumped, here are some ideas for how to get that information across if you’re running a WooCommerce shop. The simple way WooCommerce has a setting for each product under the “Advanced” tab called “Purchase Note.” You can put details for the customer here and it will show on the order confirmation continue readingā€¦

Printing a barcode or QR Code on a PDF

If you are or even if you are not using WooCommerce or Easy Digital Downloads but are still programming in PHP, I am available to consult on your TCPDF barcoding project to get it running. Get in touch!   The WaterWoo PDF Premium and EDDiMark PDF plugins can add barcodes and QR codes to PDFs dynamically upon download request via WooCommerce or Easy Digital Downloads. This is because both WordPress plugins use TCPDF to write PDF content, and TCPDF allows for barcode creation. Though this blog post might also be helpful for someone just trying to figure out how to write a barcode with TCPDF and PHP, these instructions are more geared toward a WordPress developer wishing to add 1D or 2D barcodes to existing PDF files. For WaterWoo, use the ‘wwpdf_add_barcode’ filter hook in the plugin (located in classes/wwpdf-watermark.php). continue readingā€¦

Selling Customized Gift Certificates: A Case Study

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 making these purchases, when the Great Shutdown begins to heal, their community might look closer to how it did in 2019.

New Plugins!

This month there is loads more news than usual, and not much of it is easy to bear. Here in California we’ve been ordered to stay home now for more than a week. I’ve distracted myself by typing lots and lots code. It’s about time I addressed your ongoing request for a PDF watermarker that preserves internal links such as table of contents. For many of you with longer PDFs, these page indexes are crucial. While my proposed solution is more expensive and mildly more complicated to install than WaterWoo & EDDiMark, it offers improved PDF parsing/writing and heftier encryption, as well as backing by the PDF gurus at SetaSign. Bottom line: if it is essential your PDF keep its internal links, you want a -Stamper plugin, not WaterWoo or EDDiMark. Introducing PDF Stamper and EDDiStamper PDF Stamper for WooCommerce continue readingā€¦

Custom Fonts with WooStamper (SetaStamper)

The SetaPDF library which PDF Stamper is built on allows quite a bit of font customization to be done. More on SetaPDF and font manipulations. 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, subsetting 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 woostamper folder, so we’ve gone ahead and done that below. Arimo is a TrueType font which works for our purposes, so we have uploaded it to a folder “arimo.” Look at the function below continue readingā€¦

Little Package