Contents

Vectors, Logos and Things That Get Printed

Lesson 53 of 73. Sign in to keep your place.

Module 6 · Documents that survive a late change

Five hundred different cards from one template

9 min read

Five hundred cards, four stepsClean the CSVOne header row, nomerged cells, UTF-8Find the longestSort each field bylength, design to thatMergeFields into frames,then create thedocumentProof sixChosen records, not askim of all of themNearly every merge failure is a data failure, which is why two of the four steps happen in thespreadsheet. Nobody checks 500 records, so the proof is six chosen ones: first, last, longest,shortest, one with an odd character, one at random.
Nearly every merge failure is a data failure, which is why two of the four steps happen in the spreadsheet. Nobody checks 500 records, so the proof is six chosen ones: first, last, longest, shortest, one with an odd character, one at random.

Figure

The work nobody advertises

Five hundred visiting cards with different names. Three hundred certificates. Price labels for every item in a shop. Name badges for a conference. Numbered raffle tickets. Barcode or QR labels for a warehouse.

This is variable data printing, it is well paid, it is repeatable, and remarkably few designers offer it. The whole skill is setting up a template once and pointing it at a spreadsheet.

Prepare the data first

Most merge failures are data failures, so clean the CSV before you open the layout.

  1. One header row, with short names and no spaces: name, designation, mobile, email, photo.
  2. No merged cells, no blank rows, no totals row at the bottom.
  3. Consistent case and spacing. Run a trim on every field; trailing spaces produce mysterious alignment.
  4. Encoding: UTF-8. If the data has any Indic script, a name with an accent, or a rupee sign, a file saved as Latin-1 will arrive as mojibake. In LibreOffice, Save As ▸ Text CSV ▸ tick Edit filter settings and choose UTF-8.
  5. Image fields hold a file path, and InDesign requires the header to begin with @ (@photo) with the paths either absolute or relative to the data file.
  6. Look at the longest record. Sort by the length of each field and design the template around the longest name, not the first one.

Doing it in each program

InDesign: Window ▸ Utilities ▸ Data Merge. Select the data source, place the field placeholders into the frames, then Create Merged Document. Options that matter: Records per Document Page (one card per page, or a grid of ten on an A4 sheet), Multiple Record Layout with spacing, and Preview before merging, which is how you catch overflow.

CorelDRAW: File ▸ Print Merge. It is good, it handles a grid of cards on a sheet, and it is why so many Indian print shops do this work in CorelDRAW rather than anything else.

Scribus: the ScribusGenerator Python script, free on GitHub. Put %VAR_name% placeholders in the text, run the script against a CSV, and it produces one output file per record or a combined document. Less polished than the commercial tools and entirely capable.

Free, no layout application at all: generate HTML from the CSV with a short script and render with WeasyPrint. For a thousand labels this is faster than any GUI, and the template is a text file you can version.

Overflow is the failure mode

A template that fits “Anil Kumar” will not fit “Lakshmi Narayanan Venkataraman”. The merged document will either overset that record silently or push text outside the frame.

Three defences:

  • Design to the longest record, found by sorting the data.
  • Set the frame to auto-size where the application supports it, or set a minimum type size and allow the style to shrink by a defined amount.
  • Check the merged output, not the template. Which is the next section.

QR codes and barcodes per record

A QR code per row is the most common request after names.

  • InDesign has a built-in QR code generator (Object ▸ Generate QR Code) but it does not read from a data field, so the practical route is to generate the images first and merge them as an @image field.
  • Generate them free with the Python qrcode library or qrencode on the command line, writing one SVG per row named after a key in the data:
Bash
while IFS=, read -r id url; do qrencode -t SVG -o "qr/$id.svg" "$url"; done < links.csv
  • Barcodes: zint is free, handles EAN, Code 128, DataMatrix and the rest, and outputs vector. Get the check digit right; a barcode with a wrong check digit scans as nothing.
  • Always test a printed sample with a real scanner before running 5,000. Quiet zone, contrast and minimum module size all matter, and a QR code printed too small or over a pattern will not read.

Proof the merge by sampling

Nobody checks 500 merged records. Check these six:

  1. The first record.
  2. The last record.
  3. The longest name.
  4. The shortest name.
  5. Any record with an unusual character: an apostrophe, a hyphen, a non-Latin script.
  6. One at random from the middle.

If all six are right, the merge is almost certainly right. If any is wrong, the fault is systematic and you have found it before printing.

Pricing it

Charge for the setup, not for the records. The template is two to four hours; the merge itself takes minutes. A client comparing you against “someone who types 500 cards” is comparing against three days of labour, and the honest pitch is that you are faster, cheaper and will not make a typo on card 312.

Every lesson here is open. Your progress is recorded once you pass the Editing an Image exam.

Check your understanding

A merge of 500 name badges produces correct output except that about thirty records show their names as strings of question marks and boxes. The template is fine and those thirty names are all in Devanagari. What is the most likely cause?

Pick the one you would defend. Your answer stays private.

Next lesson · 8 minPage counts, creep and the spine

Stuck on something?Ask Nazia, your AI tutor

How to cite: Addaly (2026) ‘Five hundred different cards from one template’, in Vectors, Logos and Things That Get Printed. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/vector-and-print/data-merge-and-variable-data (Accessed: 13 October 2026).