Skip to main content
Participant
April 6, 2023
Question

Indesing data merge with plain text qr code

  • April 6, 2023
  • 3 replies
  • 2704 views

Hello everyone,
I have to create a data merge document including a plain text qrcode.
My source is a CSV file from libreoffice.
The trouble comes when I try to insert a line feed or a carriage return.
Using excel formula CHAR(10) or CHAR(13) does not work, because the rendering return just the first line of the text.
Is there a way to fix the issue?
Thanks

3 replies

Participant
November 2, 2025

How can i fit it

 

Community Expert
April 13, 2023

Here is what I have used for datamerge and plain text QR codes. \n is used to separate lines of a vcard.

N:Smith;John\nFN:John Smith\nORG:Company\nTITLE:Engineer\nTEL;CELL:+1234567890

James Gifford—NitroPress
Legend
April 13, 2023

That should work, and it should be possible to include '\n' fields in the Excel data. OTOH, any kind of export of control or escape characters can be exasperating. 🙂

 

I may have misunderstood the OP. If the problem is to separate the vCard fields, this solution should work. If the issue is trying to put line breaks in long text fields... this may or may not work as intended.

 

Robert at ID-Tasker
Legend
February 25, 2025

Exposing the actual code in the code, as it were, instead of "interpreting" it into a readable display. You have that for the ID side, but it would be preferable to read it back from actual codes for that last lick of accurate representation. I dislike processes that mask key elements, even if in the name of convenience.


@James Gifford—NitroPress 

 

Few months ago, on another thread, you've tested reading raw data - with a dedicated app? Or it was someone else?

 

James Gifford—NitroPress
Legend
April 6, 2023

Most QR code guidelines say to simply use a line return or paragraph character; most code readers respect them for multi-line display. (Some do not, though.) Check the text that is actually being passed to the QR code field. It must be an actual ASCII 10 or 13 character, not the Excel code string or anything like it.

 

You may find some or all of this helpful: https://nitrosyncretic.com/DPR/dpr_qrcodes.php.

 

Participant
April 6, 2023

I know but I have to do a data merge, so the text comes from excel, and even though I see the text in excel properly edited and rendered,  the final qrcode output shows just the first line in indesign (and into any qr code reader).

James Gifford—NitroPress
Legend
April 6, 2023

Obviously ID is reading that Excel code as an "end of record" mark.

 

Try entering an ASCII code/character instead. Excel lets me type in both Alt-10 and Alt-13, and that character may be recognized as a return/line end in the merge. (ETA: I am not sure of the exact format InDesign is reading; you might try alternate codes such as /r and /n, or the HTML code %0D.)

 

The only other solution I can think of is to remove all such return characters and let the reader do the text wrapping in each field.