Process Plan: Use QR Codes to place icons and link annotations

As QR Codes are rather inconvenient  in digital publications, the Process Plan "Determine QR Code values and place icons + link for URL" can be used to optimise QR Codes for digital use. The Process Plan first identifies all QR Codes, decodes the destination URLs and then adds a link annotation (hyperlink) and an icon over each QR Code to indicate that the QR Codes are clickable.

You can download a zip package containing the Process Plan, a test file and a "click here" icon.

Erliest version with full support for “Determine QR code values and place icons + link for URL.kfpx” is pdfToolbox 14

Structure of the Process Plan

  1. Check "Find Barcodes": This Check identifies all QR Codes in a PDF document. If no QR Code is found, the Process Plan stops and reports "no QR code found".
  2. Variable step: Calculates the values for the QR Codes (destination URLs of the QR Codes and position data) so that they can be used in the next steps.
  3. Fixup "Place icon for QR Code": Uses the "place content" technology to place a custom icon over the QR Codes. All icons will be placed on a new Layer called "Link".
  4. Fixup "Place URL link for QR Code": Places the destination URLs on top of the QR Codes as a link annotation.
  5. Variable step: If there are more QR Codes to process, this step will go back to Setp 2.

Ask-at-runtime dialogues

When the Process Plan is executed, two Ask-at-runtime dialogues will appear:

  1. The first dialogue allows you to set the rendering resolution (the default of 160 ppi is suitable in most cases) for barcode detection. You can also enable the "Detect low quality barcodes" option (performance will be slower).
  2. In the next dialogue you have to specify an absolute path to the icon that will be placed on top of the QR Codes.

Result

The QR Code is now overlayed with the "click-here" icon and a link annotation with the destination URL of the QR Code. When you tap the icon, the linked website will be opend.