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

How can I create QR codes with a script in InDesign?

New Here ,
Jul 02, 2014 Jul 02, 2014

Copy link to clipboard

Copied

Hi there,

I cannot get an applescript running that creates various QR codes (VCards). I found the command "Create vCard QR Code" but now further documentation or script  example. Can anybody help?

Thanks in advance,

Martin

TOPICS
Scripting

Views

1.4K

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
New Here ,
Nov 08, 2018 Nov 08, 2018

Copy link to clipboard

Copied

The AppleScript implementation of QR codes in InDesign seems like a hacked-on afterthought. I tried the command like so:

set qr to Create Plain Text QR Code document 1 plain text "stuff" qr code swatch "Green"

That loaded the Place Gun, which is the least scriptable action you'd ever expect. Then I wondered if the vague direct object could be something besides a document, so I tried:

set qr to Create Plain Text QR Code text frame 1 of document 1 plain text "stuff" qr code swatch "Green"

That works, but it replaces the entire content of the text frame with the QR object. Trying to specify an insertion point only causes a crash, so InDesign is too dumb to do that. So I guess the thing to do is to first create a rectangle, then specify that as the direct object. What I can't figure out is how to get rid of the stupid blank margin is puts around the actual QR code. It seems to give it 11pt of space on all 4 sides if the target box is 100x100pt. So I guess you have to move and resize the resulting eps object to fit based on that knowledge and hope it's consistent from version to version.

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 ,
Nov 09, 2018 Nov 09, 2018

Copy link to clipboard

Copied

Steve, are you sure that "stupid blank margin" is greater than the required Quiet Zone? (Required per specifications: The Quiet Zone | qrworld )

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
New Here ,
Nov 09, 2018 Nov 09, 2018

Copy link to clipboard

Copied

LATEST

Yes, when there is no easy way to control it. There should at least be a boolean keyword and checkbox in the UI to let the user turn it off if they know what they're doing. But let's focus on the part where I supplied a valid answer to the question.

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