🤓     🤩     🥶     🤩     🤓     50% off single licenses thru CYBER MONDAY - use code CYBRRR     🤓     🤩     🥶     🤩     🤓

New: PDF Ink Parser, Tighter Security, and Smoother Upgrades

cartoon graphic of someone opening a present (looks like piles of paper) with excited person in background

It’s been quiet here since June, but not for PDF Ink code. It’s actually been a really fun and exciting summer between our real-life adventures and our work! I hope it’s been fun for you, too.

Between version 1.6.4 and today’s 1.7.4, PDF Ink picked up a new PDF parser, a round of hardening against bad files, clearer licensing and update behavior, and a long list of workflow fixes. Here’s what matters most for your day-to-day work and for keeping your files safer.

Before you update: new minimum requirements

PDF Ink 1.7.4 requires PHP 8.0 and WordPress 7.0 or newer. Version 1.7.0 had already raised the PHP minimum to 7.4. Both older PHP versions are past the end of support. Check your PHP version in your hosting control panel before updating, and ask your host to upgrade if you’re behind. Given this summer’s PHP RCE vulnerability “excitement,” it’s unlikely your host didn’t update PHP for you.

For users with PDF Ink template overrides

Overriding a PDF Ink template involves replacing core PDF Ink files with some of your own code. It’s likely this isn’t you, but if it sounds familiar, keep reading this FYI. Version 1.7.4 corrects some output-escaping code in the plugin’s templates (esc_html_e and esc_attr_e were misused; a very minor issue). That bumps the template version number for the first time ever to v1.0.1. If you’ve copied PDF Ink templates into your theme to over-write them, compare your copies against the new ones.

Introducing a new PDF parser: CYNPDI

Version 1.7.0 introduced CYNPDI (“Canyon PDI”), our own PDF parser forked from TCPDI. CYNPDI handles PDF annotations better. This is helpful and possibly saves you money if the PDFs you watermark contain annotations, such as links and comments. As always, if you need the highest fidelity, the third-party parser options described in our licensing terms are still available.

Safer with corrupt or malicious files

PDF can be a complicated format. A corrupt or deliberately mis-crafted PDF can push a parser into deep recursion (a death spiral, so to speak). In version 1.7.0 PDF Ink catches more errors earlier, and stops instead of spiraling. In v1.7.4 the PDF Ink Sandbox catches an exception that used to occur when it mistook a bad file location (like a mis-typed URL) for a remote file, so you’ll no longer see a mysterious HTTP 500 error.

A more subtle, privacy-minded fix came in version 1.6.4: the Chrome browser ignores the <input> autocomplete=off hint in some cases, which might fill saved passwords into PDF Ink settings fields. We removed that possibility.

PDFs that used to trip us up

Real-world PDFs are often slightly off-spec, so after the parser work shipped, versions 1.7.2 and 1.7.3 made parsing more robust:

  • Cross-reference stream chains are traversed correctly again
  • Files whose startxref pointer lands one byte past the xref table now parse
  • End-of-file handling in the raw-object reader is restored

If a PDF failed to watermark for you before and it opens fine in your viewer, update PDF Ink and try it again.

Updates and licensing: safer and clearer

  • Plugins API fix. Updates are now shown with or without an active license key. Key holders have access to install them. The plugin’s update API is only called every 6 hours, and also any time you click the manual “Check again” link on the WP Updates page.
  • Offline sites keep their status. A site that can’t reach the license server no longer has its license status changed (1.7.0).
  • Clearer messages. When your license is inactive, PDF Ink now tells you auto-updates aren’t available instead of leaving you guessing (1.7.1).
  • Better update details. The WP Updates page now returns helpful information from the readme (1.7.4) if an update is available.
  • A weekday window for auto-updates. PDF Ink auto-updates are now only allowed Tuesday through Friday for valid license holders. If an update is skipped over a weekend, WordPress circles back to it later. The idea is that updates land when someone is around if anything needs attention. Yes, we had complaints from people who take their weekends very seriously (and we appreciate that)!

Everyday workflow improvements

  • Settings inheritance is easier to follow. Placeholders now show the fallback value a setting will use (1.7.3), merging of inherited settings from products and variations is improved (1.7.3), and “inherit” in placement content settings correctly inherits the parent’s content (1.6.4). The WaterWoo importer also handles per-product overrides that leave content empty (1.6.4).
  • Switching libraries no longer loses your place. Product variations settings are saved while you switch libraries, so the settings panel doesn’t vanish necessitating page re-load (1.7.3).
  • Sandbox URL clipboard button. Copy the Sandbox PDF URL in one click (1.7.0).
  • Unusual folder layouts work. File-path handling now copes with installs outside the standard content directory, non-ASCII file names, and non-traditional wp-content paths (1.7.0 and 1.7.1).
  • EPUB users get more control. PDF Ink warns you on save when EPUB-related XML may not be valid, and you can opt out of our CSS positioning and set your own (1.7.1).
  • Easier troubleshooting. PDF Ink debug logs now write at each handler step: parse, manipulate, and output (1.7.1). The background cleanup task also no longer fires debug messages on front-end requests.
  • WordPress 7.0 ready. We tested with WP 7.0 and fixed checkbox display in the newer admin themes (1.6.5 and 1.7.0).

Ready to update?

Update from your Plugins screen, or download the latest version from your account page. If something looks off after updating, please contact us and include the debug log (since they’re even more helpfully verbose now).

Thanks for using PDF Ink, and for the bug reports that make releases like these possible.