[Scripting] Edit QR Code
It would be good if we could read the contents of an Indesign-generated QR Code via script.
Currently it is possible to read the contents by exporting the QRCode graphic as a snippet and reading the XML. We see this:
<PlainTextQRCode Self="ueb" PlainText="https://adobe.com">
<Properties>
<QrCodeSwatch type="string">Black</QrCodeSwatch>
</Properties>
</PlainTextQRCode>
but this is an obscure and time consuming approach and it would be sensible to be able to derive the "https://adobe.com" value directly via the scripting API, and ideally change it—causing the QR Code to regenerate.
I'm not sure how best to implement... maybe a new method: Graphic.getQRCodePlainTextContents() and Graphic.setQRCodePlainTextContents(myString) etc.
-
m1b commented
Yes Paul, that would definitely be the way to go, especially as it would then make it easy for Adobe to add more properties and methods, such as error-correction level and various visual options such as those offered by many other QR Code generators.
-
Paul Reznick commented
I would suggest a QRCode Object type, just as there is for HyperLinks. Store all document QR codes using either an Array or Collection as other InDesign objects are.
-
Uwe Laubender commented
Thanks m1b,
for all who want to go into details see:How to find and edit QR Codes using scripting
Ken Webster, Jan 16, 2025My comment there:
https://community.adobe.com/t5/indesign-discussions/how-to-find-and-edit-qr-codes-using-scripting/m-p/15107395#M607263Thanks,
Uwe Laubender
( Adobe Community Expert )