Quitter
  • Communauté internationale
    • Langue:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티

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

Explorateur ,
Apr 25, 2023 Apr 25, 2023

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>

SUJETS
Importation et exportation , Scripting , Type
5.4K
Traduire
Signaler
Directives de la communauté
Restez bienveillant et courtois, ne vous attribuez pas la paternité des créations d’autrui et assurez-vous de l’absence de doublons avant de poster du contenu. En savoir plus
community guidelines

correct answers 2 bonnes réponses

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

...
Traduire
LÉGENDE , 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);

 

 

Traduire
Community Expert ,
Apr 25, 2023 Apr 25, 2023

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

Traduire
Signaler
Directives de la communauté
Restez bienveillant et courtois, ne vous attribuez pas la paternité des créations d’autrui et assurez-vous de l’absence de doublons avant de poster du contenu. En savoir plus
community guidelines
LÉGENDE ,
Apr 26, 2023 Apr 26, 2023

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

 

Traduire
Signaler
Directives de la communauté
Restez bienveillant et courtois, ne vous attribuez pas la paternité des créations d’autrui et assurez-vous de l’absence de doublons avant de poster du contenu. En savoir plus
community guidelines
Community Expert ,
Apr 26, 2023 Apr 26, 2023

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.

Traduire
Signaler
Directives de la communauté
Restez bienveillant et courtois, ne vous attribuez pas la paternité des créations d’autrui et assurez-vous de l’absence de doublons avant de poster du contenu. En savoir plus
community guidelines
LÉGENDE ,
Apr 26, 2023 Apr 26, 2023
LA PLUS RÉCENTE

Significant how? 

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

 

Traduire
Signaler
Directives de la communauté
Restez bienveillant et courtois, ne vous attribuez pas la paternité des créations d’autrui et assurez-vous de l’absence de doublons avant de poster du contenu. En savoir plus
community guidelines