The Sandbox

PDF Ink allows for on-the-fly manual manipulation of PDFs at the bottom of the WordPress -> PDF Ink -> Sandbox settings page. PDF Ink Sandbox can be used to test the plugin's settings before going live, or for editing PDF files on the backend. The sandbox settings are separate from frontend settings to allow experimentation... or... you surprise us!

Sandbox Settings

The Sandbox settings include the same fields as the frontend settings settings, but also feature “Magic Tags.” The fact the sandbox is separate from the frontend, makes it a place to safely experiment with PDF manipulation, away from the view of your website users. Some users are not using e-commerce at all, and just need a web application for editing PDF files–that can be done in the Sandbox.

If you are collecting user data before download, you can use magic tags to add dynamic content to your PDFs. If, for example, a PDF needs to be created for an existing customer with an existing Order ID, the customer’s information (name, email, address, etc.) can be added to the PDF by just entering the Order ID. That said, even if you are not using e-commerce or collecting customer data, data can be manually entered in the Sandbox and applied to marks on your PDF files.

If you are looking for an even more customizable manner of editing PDF files on any PHP-based application, you can always call the PDF Ink libraries using only PHP (WordPress not required).

Furthermore, a REST API (for WordPress) will be added in PDF Ink version 2.0.

Magic Tags

Magic tags can be used to replace variables in your placement content during testing. If you have a valid order number for WooCommerce, Easy Digital Downloads, or Download Monitor, you can use that to mark a PDF with purchaser information. Fill in the settings you want, and the PDF will be stamped according to what you have entered in the magic tags settings!

Screenshot of PDF Ink magic tags settings, where you can enter information to be stamped on a PDF file.

Order Number

The Order number magic tag does two things at the same time. If you are using the [ORDERNUMBER] magic tag in your PDF stamp content, then the number will magically replace that tag on the PDF. At the same time, if you have left the First name, Last name, Business name, Email, Phone, and Date fields blank/empty but have entered a valid order number, then information from that order will replace [FIRSTNAME] [LASTNAME] [BUSINESSNAME] [EMAIL] [PHONE] and [DATE] magic tags in your content.

This is the Sandbox. The Sandbox has no access to live WooCommerce or other e-Commerce data. You have to feed it dummy data. So unless you fill out an order number or a business name in this section, do not expect [BUSINESSNAME] to be populated. The sandbox would either pull the business name from the Wildcard business name field, or from the Wildcard order number (an existing WooCommerce order ID).

Post ID

There is no [POSTID] or [POST-ID] tag in PDF Ink, so this setting is for function, not display. If you have a PDF in your shop with unique stamping settings (e.g. the stamping starts on a specific page and is a different font, with slightly different text) and want those settings to apply in the Sandbox, enter that product’s WordPress post ID here.

Wildcard

The wildcard magic tag is anything you want it to be, handy for if you want to drop [WILDCARD] in your content settings, leave it there, and then change it in the Magic Tags settings before using the sandbox. It can represent almost anything, but needs to have a value in the Magic Tag settings in order to function.

Playing with your Settings in the Sandbox

Near the bottom of the Sandbox Settings page, you will find the main Sandbox feature, highlighted in a rainbow-colored box. Here you can choose a file, choose which settings to use (frontend or sandbox), then manipulate that PDF.

The file can be any file on your server, and can even be a remotely-hosted file (although we don’t recommend that in production scenarios). Enter a file URL instead of clicking “Choose/Upload PDF File”, or use the WP Media Library. If no file is entered, that’s fine: a dummy file is used.

PDF Ink Sandbox - test PDF manipulation on-the-fly here

We strongly urge you to disable caching while testing. Also – disable browser caching for your domain (or use a private/incognito browser window). Cached settings can really put a damper on the fun of testing!