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

Is it possible to generate QR codes in InDesign using Current Page Number?

Explorer ,
Apr 25, 2023 Apr 25, 2023

Copy link to clipboard

Copied

Rather than generate numbers in Excel and export them as CSV files, I wanted to see if I could remove a step of the process for creating QR codes out of InDesign.

 

I was hoping to re-number pages and add prefixes to the page numbers, so for example, I could have "AAA080501". I would setup a text page on the master page with a marker for 'Current Page Number'. I would then add 999 pages to my document so that the page numbers would span from AAA080501 to AAA08150. But how can I get the in-built QR code generator to read from the Current Page Number marker on the master page to generate a code?

 

So I tried another method: using the inbuilt QR code generator under the Object menu, but there is no option to place in a special chatacter marker for current page number.

 

I asked ChatGPT if it was possible, and it gave me comprehensive instructions on how to do it, but it added fictional options which aren't available in InDesign, although the AI does understand what it is that I'm trying to achieve.

 

Is it possible?

 

<Title renamed by moderator>

TOPICS
Import and export , Scripting , Type

Views

2.3K

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

correct answers 2 Correct answers

Community Expert , Apr 25, 2023 Apr 25, 2023

Hi @Perthdave74, here is one approach:

1. Set up a document (see example document attached) with a section suffix of AAA, and numbering style of 01,02,03, and page starting at 80150. Make sure that the prefix is included in the name (checkbox).

2. Put a QRCode (generate a plain-text QRCode in Indesign and use it as a dummy)

3. Put a Script Label on the QRCode's frame (see Window > Utility > Script Label menu). The label must match the label in the script—I used "PageNumberQRCode", but you can ch

...

Votes

Translate

Translate
Community Expert , Apr 25, 2023 Apr 25, 2023

Modify line:

 

qrCodeFrame.allGraphics[0].createPlainTextQRCode(page.name);

 

 

By adding:

 

qrCodeFrame.allGraphics[0].createPlainTextQRCode(page.name + 'P' );

 

 

Or do you mean contents of the variable P - not the letter 'P' ?

 

Then you would have to declare it, set some value and:

 

var P = 'my extra code';
qrCodeFrame.allGraphics[0].createPlainTextQRCode(page.name + P);

 

 

Votes

Translate

Translate
Community Expert ,
Apr 25, 2023 Apr 25, 2023

Copy link to clipboard

Copied

That's right. That's what David is doing.

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 26, 2023 Apr 26, 2023

Copy link to clipboard

Copied

Then why the need for the page name / number - if it can be incorporated in Excel? 

 

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 26, 2023 Apr 26, 2023

Copy link to clipboard

Copied

The page numbers are significant to David's project. He's just using Excel > Indesign Data Merge as a convenient way of generating the QR codes quickly.

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 26, 2023 Apr 26, 2023

Copy link to clipboard

Copied

LATEST

Significant how? 

For  me - he is just having one QR code per page - so this can be done in Excel?

 

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