Skip to main content
Known Participant
April 2, 2024
Question

Change part of link qr code

  • April 2, 2024
  • 2 replies
  • 1830 views

Hi, guys! Can someone help me?
Is it possible to change the part of URL of many QR codes applied to a document with script (java) ?
In the same document, I have several qr codes applied, such as:
https:\\teste1.com/aaa
https:\\teste1.com/abc
https:\\teste1.com/axx
(...) Its exemples.
Can I change just "teste1" to another url, exemple:
https:\\teste_new.com/aaa
https:\\teste_new.com/abc
https:\\teste_new.com/axx

This topic has been closed for replies.

2 replies

Brad @ Roaring Mouse
Community Expert
Community Expert
April 5, 2024

If you find you need to change the info in a QR code, even on a semi-regular basis, you might consider going to a Dynamic QR code model instead of use ID and static codes. This is really good for vCard QR codes for business cards, for example

James Gifford—NitroPress
Legend
April 5, 2024

The only 'dynamic' model that works at all is a fixed URL encoded into the QR code, pointed to active redirection of some kind that can be changed. I don't know any way to make data-content codes 'dynamic.' But the OP is looking at a URL solution, so all that's needed is a stable redirection platform, which can be a company web server.

Brad @ Roaring Mouse
Community Expert
Community Expert
April 5, 2024

Indeed.

James Gifford—NitroPress
Legend
April 2, 2024

You might want to change your post title to include "using scripting" or such, to catch the eye of the script gurus here.

 

I have QR code expertise, but this is basically a straightforward scripting question, so...

Stefan Rakete
Inspiring
April 3, 2024

There is no way to access the InDesign generated QR Code by scripting. There is a cumbersome way to export the QR Code as snippet and then find the URL in the XML and modify it by script.

James Gifford—NitroPress
Legend
April 3, 2024

So as in nearly every other instance of "ID-generated QR Code" the real answer is "re-generate it."

 

Which I believe can be done with scripting, and with various implementations of data merge.