Hello, I am laying out labels using InDesign, the labels have a lot# that often changes (in it's own text field). I would like this lot # to be the text that comes up when the QR code is scanned. I can manually input the text into the QR code text box. I would rather have the QR code change when the text is changed though. If anyone knows of a way to write it so that the QR code always shows what is in the specified text box, it would be amazing. Thank you for your time.
Off hand, you could do this with Data Merge. Have a field for the text, and a duplicate field that creates the QR code.
This would not be a dynamic document, but it would be easier than hand-entering the text.
Thank you SJRiegel,
That would save some time. An ideal situation would be that the text field could be updated in the PDF using acrobat (for ease of use and time) or InDesign. I am also open to using illustrator or other abode products, if that helps. I have not fully explored the illustrator plug-ins for QR codes.
Does the lot# need to be a QR code? If not, barcodes like 39 and 128 could be generated with a font, and then you could have a dynamic situation where entering data once and populate in many.
You could also look at a paid solution like BarcodeMaker from Teacup Software. They offer a free trial and good documentation.
Your problem seems quite solvable via scripting. Do you have any experience with scripting? Let me know if you'd like some help. Or maybe post an example of a page of labels and we could see what could be done.
Thank you so much, I was also thinking there may be an easy scripting or coding answer, I am just not familiar with scripting and have not been have not been able to solve the issue with my research so far. I am including an image, at this point I am just trying to figure out a good procedure before handing off the project to my companies pre-press department.
At the very base level, I am just looking for one 5 digit number ( lot number field, highlighted in image) to translate to the QR code. I was also thinking of setting up the labels with a master page that has lot# and QR code. The child pages would have each individual size for the product. Either scenario though, it's really just one place in the document (QR code), that I am hoping to translate one number to (lot #). Please let me know if I can provide more information or images.
Hi @Sean22153274qbmh, I've written a script that I think may solve this problem quite well. See instructions in script listing, and let me know what you think.
Just to clarify, line 29 is:
Last line should be enclosed in parentheses, and to be safe end in a semicolon):
Thanks I tried adding a set of parenthesis, but I'm still getting the same error. I tried with Brackets as well, not sure why it is not liking this last line. I'm very much a beginner at scripting though
You said line 29 was:
It should be:
No surrounding parentheses.
Hi @Sean22153274qbmh, I'm wondering if there's been a slight change to the script between encoding on this web page, displaying in your web browser and copy/pasting into Notepad, etc. I've sent you a private message with a direct link to the script. Please try that first, just to rule out that possibility.
Thank you for the help everyone, especially Mark. This is my first post so hopefully this is an okay way to end it. I was initially thinking their may be a way to type some simple text or one line of code into the QR code menu in InDesign. With the scripting I am still new to it. Throughout exploring InDesign further, I found some other ways to automate our label creation. Inputting the same number in two fields no longer seems like such a burden and I got the okay from management to proceed in this fashion. I did try out the new code to no avail, I got the same message about the last line. But I think that could be due to my inexperience with scripts. I'm going to mark this as complete because I feel like the question has been answered. Linking text fields can be done, but requires the use of additional scripts.
Glad you have a way forward! I'm sorry to hear you didn't get the script to work though, and I'm curious to know what happened. Do you mind telling me what version of Indesign are you using? And operating system? The error message you saw doesn't shed any light for me.
Sorry for the delay. I was off of work most of the last week. I am running InDesign 2022, connected to the creative cloud. Windows 10 for the operating system.
Thanks for replying. I tested only on Mac OS Indesign 2022 and I don't have access to a Windows 10 installation.
Can anyone else reading this try script on Windows 10? I have had another forum user report a similar error on a different script on Windows and I'd love to get to the bottom of it.