• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Change part of link qr code

Explorer ,
Apr 02, 2024 Apr 02, 2024

Copy link to clipboard

Copied

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

TOPICS
Experiment , How to , Scripting

Views

881

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 02, 2024 Apr 02, 2024

Copy link to clipboard

Copied

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...


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 03, 2024 Apr 03, 2024

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 03, 2024 Apr 03, 2024

Copy link to clipboard

Copied

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.


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 03, 2024 Apr 03, 2024

Copy link to clipboard

Copied

@James Gifford—NitroPress 

 

Generated QR code is an EPS - that isn't even embeded - there is nothing in the Links panel...

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 03, 2024 Apr 03, 2024

Copy link to clipboard

Copied

They're EPS? Really?

 

What makes this confusing is that the generation/placement is interactive within ID. You can edit an existing code, and hover over one to get the raw content used, so there is SOME data stored SOMEWHERE... but in some fully encapsulated manner no other approach can reach.

 

A good feature, potentially great but desperately overdue for some TLC and expansion.


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 03, 2024 Apr 03, 2024

Copy link to clipboard

Copied

@James Gifford—NitroPress 

 

RobertTkaczyk_0-1712185277148.png

 

But like I've said - NOTHING in the Links panel - so it's must be embedded.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 04, 2024 Apr 04, 2024

Copy link to clipboard

Copied

"They're EPS? Really?"

They're EPS in that they are made of very simple Postscript objects. When a ID creates a QR code, it generates the code in a temporary PS-based file in InDesign's cache folder on your computer, silently embeds this code in the .indd file (meaning it won't show in the Links panel), then deletes the temp file from the cache folder. You can actually open an .indd file in a text editor and find it. It will look like this:

Screen Shot 2024-04-04 at 10.29.10 PM.png

In an .idml, The PS objects are converted to XML CDATA. Along with it is the URL, and although, you CAN change it, this will not update the graphic elements... that needs to be regenerated. Besides, ID doesn't like .idml files that have been externally messed with in the best of times.

 

Of course, none of this answers the scripting issue. 🙂

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2024 Apr 05, 2024

Copy link to clipboard

Copied

quote

Screen Shot 2024-04-04 at 10.29.10 PM.png🙂


By Brad @ Roaring Mouse

 

Bunch of squares.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2024 Apr 05, 2024

Copy link to clipboard

Copied

"...but desperately overdue for some TLC and expansion."

Yup. It would be nice to have a panel such as the Interactive > Hyperlinks panel that can manage QR code content without having to go to each individually and regenerate.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2024 Apr 05, 2024

Copy link to clipboard

Copied

It is an excellent tool, as good as any I know, with the advantage of being 100% local and secure and imposing no stealth tracking or redirection elements. But I'd like to see:

  • Default to vCard 3.0, with options for 2.1 (for some legacy needs) and 4.0.
  • Choice of error correction mode (there are four).
  • More interactive content editing, including streamlined mass creation using Data Merge or a specific process.
  • Auto set to high quality object display so that blurred/simplified codes aren't an issue.
  • And yeah, a central listing for duplication, mass update and management would be nice.

┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Apr 05, 2024 Apr 05, 2024

Copy link to clipboard

Copied

There are various create***QRCode() methods, so you'd only retrieve the old values from the snippet of the EPS.

No need to modify and re-place the snippet.

 

DirkBecker_0-1712344706782.png

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2024 Apr 05, 2024

Copy link to clipboard

Copied

It is not clear to me where this data is stored; I know that in prior conversations the idea of pulling up the data within ID has proven difficult. ID does store it somewhere, as it can be displayed with a hover tip or when opening the QR editing menu, but if it can be *usefully* accessed... that's semi-news to me.


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2024 Apr 05, 2024

Copy link to clipboard

Copied

"It is not clear to me where this data is stored"

Embedded Inside the .indd file itself (not at all accessible (but again, if you open the file in a text editor, you can "see" it right after the code for the QR code itself.)

When exported as as .idml, it can be found in the XML files located in the "Spreads" folder.

e.g.:

Screen Shot 2024-04-05 at 3.53.53 PM.png

 There's also a flag to not show the code in the Links panel: ShowInUI: false

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2024 Apr 05, 2024

Copy link to clipboard

Copied

Yeah, I assumed it was in the file somewhere, but unless I am misrecalling prior discussions it's not accessible in any useful way.. So... are there scripting hooks that can retrieve and/or rewrite it?


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 06, 2024 Apr 06, 2024

Copy link to clipboard

Copied

There are various create***QRCode() methods

 

Hi @Dirk Becker , There are the creation methods—an new QR code can be created on a page or a page item like a rectangle, but I don’t see any way of getting a collection or an array of QRcode objects via scrpting. I can get a collection of EPSs, which will include document generated QRCodes, but unless I’m missing something there is no way to determine if the EPS is a QRcode and change its properties.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Apr 07, 2024 Apr 07, 2024

Copy link to clipboard

Copied

LATEST

@rob day For retrieving the old value you have to go the unfortunate way via snippet.

@Stefan Rakete suggested "then find the URL in the XML and modify it by script" which could be read as within the snippet.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 04, 2024 Apr 04, 2024

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2024 Apr 05, 2024

Copy link to clipboard

Copied

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.


┋┊ InDesign to Kindle (& EPUB): A Professional Guide, v3.1 ┊ (Amazon) ┊┋

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 05, 2024 Apr 05, 2024

Copy link to clipboard

Copied

Indeed.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines