Creating QR Codes in JavaScript

A new feature in InDesign CC is the ability to create and place QR codes. Here, I show how to do this using JavaScript.

The following APIs are available:

  • createHyperlinkQRCode: for creating a QR code for a hyperlink).
  • createEmailQRCode: for creating a QR code for an email address.
  • createPlainTextQRCode: for creating a QR code for arbritary text.
  • createTextMsgQRCode: for creating a QR code for an SMS message.
  • createVCardQRCode: for creating a QR code for a vcard.

Here’s a nice easy sample:

Result:

QRCodeImage

If a mobile app was used to scan this QR code it would take the user straight to www.adobe.com (although app behaviour does differ).

For more examples, see AddQRCodes.jsx in the Scripting SDK.

2 Responses to Creating QR Codes in JavaScript

  1. Pingback: Create a QR Code with Javascript | TeechMi.com

  2. Pingback: This Week in InDesign Articles, Number 109 | InDesignSecrets