Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a text document/csv with 100 unique codes that should be used for a gift card.

For the gift card, I need to provide 100 PDF's each with the unique code.

Is it possible to do this using Illustrator or InDesign? I'm thinking of making a textbox that can contain the code, but I don't know how to make 100 PDF's with the codes.


share|improve this question

If you have uniqe code (and more variable data like QR-codes and so on):

Make textbox with code in your PDF, make it Variable and name Data Set, save Variable library. Edit XML file in your text/XML editor, copy and paste <v:sampleDataSet dataSetName="YourUniCode">. Fill corresponding fields.

You may have to create first file with codes and then use Find & Replace in your editor to surround code with XML tags. Then copypaste results in XML file.

Load your XML file (Variable library) into Illustrator.

Use script to export each dataset in separate PDF.

I have simple script on GitHub, you can adjust it to your specific needs.

If you have linear codes from n to m (1 to 100) you can import your PDF into template page to InDesign, make your text box with page number, make 100 pages and print it.

share|improve this answer

I have never done this myself but there are some excellent answers on this previous question:

Insert a variable on many pages in Adobe InDesign to fill in when printing PDF

share|improve this answer
up vote 0 down vote accepted

I just used InDesign's "Data Merge" function. Works perfect from CSV!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.