Generate QRCodes in Adobe Illustrator and Indesign via ExtendScript.
//@include 'QRCode.js'
var qr = new QRCode({
text: 'The quick brown fox jumps over the lazy dog.',
container: doc,
position: [0, 0], // [left, top], measured in points
width: 72, // measured in points, includes outer border
margin: 4, // outer border, measured in "squares"
joinSquares: true, // whether to unite the squares into compound path
});
If any of these scripts will help you, please consider supporting me:
To install this script, first download this repository (zipped):
Expand the zipped file and move the downloaded scripts to Illustrator's scripts folder.
See How To Install Scripts in Adobe Illustrator.
Why would you do this? Indesign has native functions to generate QR Codes already!
Two reasons:
-
You have more control over the QR Code, eg. type and error correction level, even shape of squares if you edit the drawSquare functions.
-
A forum user discovered a bug where the create QR Code methods crashed Indesign when called from within an event handler. I remembered I had written this port for Illustrator and it wasn't much extra work to write some functions to draw into Indesign.