Copy link to clipboard
Copied
I am looking for a way to create a QR Code that links to the file path/location of the current file and puts this QR Code in the bottom right corner the artboard. I have searched for plugins and scripts that will do this, but to no avail.
Hi @JosephD333, I have adapted Kazuhiko Arase's QRCode.js for use with Illustrator. You can download the script files.
First you must put "QRCode.js" in the same folder as the following script, and try this:
//@include 'QRCode.js'
/**
* Draws a QRCode containing the document's URI.
* @author m1b
*/
(function () {
var doc = app.activeDocument;
// this URI might not be best for your situation
var docURI = 'file://' + encodeURI(doc.fullName.fsName);
// draw the QRCode
v
...
Copy link to clipboard
Copied
You need this for printing?
There has recently been a thread about that exact issue.
Copy link to clipboard
Copied
I hadn't seen this one! I do need it for printing and we use Thrive so I will check this out! Thanks.
Copy link to clipboard
Copied
Hi @JosephD333, I have adapted Kazuhiko Arase's QRCode.js for use with Illustrator. You can download the script files.
First you must put "QRCode.js" in the same folder as the following script, and try this:
//@include 'QRCode.js'
/**
* Draws a QRCode containing the document's URI.
* @author m1b
*/
(function () {
var doc = app.activeDocument;
// this URI might not be best for your situation
var docURI = 'file://' + encodeURI(doc.fullName.fsName);
// draw the QRCode
var qr = new QRCode({
text: docURI,
doc: doc,
left: 0, // points
top: 0, // points
width: 100, // points
});
})();
Notice for your case the variable "docURI". I have made a file URI that works for me on MacOS. You might need to construct it differently for your specific needs. You also need to set the position and width to suit your artwork. You can also pass it colors and adjust QR code settings.
- Mark