Data Merging Individual Records to Separate PDFs

One of the most common requests that I hear concerning Data Merge is “how do I break up the merge into separate PDFs for each record?” A post I wrote elsewhere shows several solutions for splitting a large PDF into smaller files (or single-page files) named either generically or based on the data supplied. These solutions are great, but are there any easier solutions you can employ without resorting to scripting?

Sadly, InDesign CC 2014 still does not provide an option to export a Data-Merged PDF directly to individual records. However, there are two script-free solutions to prepare uniquely named individual PDF records, provided you don’t mind merging to a new InDesign file first. Actually, this question was answered a while ago by Kelly Vaughn in this post. All I’ve done here is to apply the same technique that she used. The key to the solution is bookmarks.

Method 1: Using Bookmarks from a Table of Contents

In this example, we’ll create a set of business cards and the PDFs will be named exactly as the names on each business card.

1. Prepare the base file – the merge fields do not have to be on the master pages. Make sure that the names have a unique paragraph style – in this example the style is called “consultant”.

bu2pic1

2. Merge to a new InDesign file, making sure that the overset text warning reports no overset text.

bu2pic2

3. Once the new merged InDesign file is created, go to the Layout menu and select Table of Contents… Include the paragraph style consultant and be sure that the Create PDF Bookmarks checkbox is checked.

bu2pic3

4. Place the resulting TOC on the pasteboard. For our purposes, it will not matter that this table of contents is on the pasteboard and contains overset text. A glimpse at the Bookmarks panel reveals that the bookmarks have been made.

bu2pic4

5. Export the InDesign file to a PDF, with bookmarks turned on.

bu2pic5

6. Open the PDF in Adobe Acrobat. Go to the Bookmarks panel and make sure that the bookmarks have been created. If so, go to the Pages tools and select Split Document. In the new dialog box, check the radio button Top-level bookmarks and click the Output Options button. In this dialog box, choose a new folder to save the resulting PDFs (if necessary) and in the File Labeling portion of the dialog box, check the Use Bookmark Names for File Names radio button.

bu2pic6

After a moment or so, the file should be split into its appropriately named PDFs.

bu2pic7

Method 2: Using Bookmarks From Document Structure

Repeat steps 1 and 2 above to create the InDesign document containing the merged data.

3. Export to PDF ensuring that the Create Tagged PDF checkbox is checked.

bu2pic8

4. Once the PDF opens in Acrobat, go to the Bookmarks panel and select New Bookmarks from Structure… and in the new window, select the structure element “consultant” (the name of the paragraph style that will ultimately become the resulting filenames).

bu2pic9

5. The new bookmarks will appear nested in one bookmark called Untitled. Double-click this Untitled bookmark to reveal the other bookmarks. These bookmarks have to be top-level bookmarks for this trick to work, so unfurl the Untitled bookmark, shift-click to select all of the other bookmarks, then right-click and select cut. Click onto the Untitled bookmark, right-click Paste after Selected Bookmark. This will make all of the necessary bookmarks top-level. From here, just click on the Untitled bookmark, and right-click Delete.

bu2pic10

6. Repeat step 6 of the earlier solution to split the PDF into smaller files based on the names of the bookmarks.

Notes

This trick will not work if the merge contains bookmarks that have the same name. A workaround to this would be to create another text frame with a paragraph style that will be used to later map the bookmarks that contain the <<name>> field plus the special character Current Page Number. This text can be outside the trim area, so long as the text frame is touching the trim area. An example of the workaround in the pre-merged file and resulting PDF using the alternative bookmarking method is shown below.

bu2pic12

At the time of writing, I had been considering the use of a script to take a paragraph or character style to convert to bookmarks. Ukrainian scripter Kasyan Servetsky has a script that comes close, but unfortunately it only creates text anchors that are hidden, rather than bookmarks.

More Resources To Master Design + Data

CreativePro Week is the essential HOW-TO conference for creative professionals who design, create, or edit in Adobe InDesign, Photoshop, Illustrator, Acrobat, and Microsoft PowerPoint.

Featuring over 30 expert speakers and 75 sessions and tutorials, CreativePro Week offers five days of in-depth training and inspiration, all in one place. No matter your skill level, you’ll learn techniques and best practices you can start using immediately to improve your productivity.

LEARN MORE

As a member, you get a discount on your registration! See the Member Benefits page for your discount code.

Members get a special discount on registration! Sign up today.

Bookmark
Please login to bookmark Close

This article was last modified on August 31, 2023

Comments (21)

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Hopsa Rijnen
    March 23, 2018

    Hi there, hopefully someone will answer: I’m tryingf to the steps as explained above. Got rid of (invalid?) characters such as é and ‘
    No doubles, i’m sure.
    But i cannot click the radio button use bookmarks as filename….
    So disappointed, what could else be wrong? working in CC2018 off course.

    Greetz Hopsa

    1. Colin Flashman
      March 23, 2018

      The techniques in this article were superseded by a script written specifically for this purpose: https://colecandoo.com/2015/09/04/data-merge-from-indesign-to-unique-filenames-now-a-reality/

      1. Hopsa Rijnen
        March 27, 2018

        Thank you,Thank you,Thank you,Thank you,Thank you
        Did i say thank you? This is just what i needed!

  2. Osama Elsayed
    July 20, 2017

    can I control for single and multiple record per page, I mean I have title I want this title repeat once per page and another text repeat four time per page how I can do that any one can help me

  3. Paulo
    July 15, 2016

    Great tip! This saved me hours of a very tedious task!

    In Acrobat DC the split feature is hidden in “organize pages”. Be aware that the bookmarks cannot have invalid characters. Otherwise, it gives out a permissions related error.

  4. martin_beckley
    February 26, 2016

    Brilliant. I needed to mail merge a bunch of certificates and they wanted individually named PDFs as output. Doing the odd two or three is no big pain but it will definatly make things easier when I get a few hundred to process in one go.
    Thanks. :-)

  5. February 25, 2016

    Great idea. Need this trick this morning. but still, if there’s still like less than 3 steps method, will definitely be appreciated. script or anything.

    1. February 25, 2016
      1. Joe
        February 28, 2016

        Tried it. this is definitely the kind of script i’m looking for. Thank sa lot Colin..!!

      2. Joe
        February 25, 2016

        Thanks Colin! I’ll take a look on it in few secs. Really appreciate it. ^_^

  6. Darius
    January 15, 2016

    Of course Adobe had to stop a good thing and change things up. In the new version of Acrobat Pro, the “Use bookmark names for file names” is grayed out and I cannot find a way to make this work anymore. I used to use this feature of splitting the document and naming business card proofs by person’s first and last name all the time. Thanks Adobe.

    1. Patrick van Houten
      March 7, 2016

      You can do this by changing the split at to “bookmarks at top level” instead of choosing how many pages you want to split to. Then the option “Use bookmark names for file names” is available again.

  7. November 17, 2015

    Thank you! Save my life!!!

  8. July 22, 2015

    Thank you, brilliant advise! Best way I’ve found so far that does not require custom scripts.

  9. June 8, 2015

    Great tip! I will use it to generate different labels.

  10. chris
    April 15, 2015

    Brilliant! I needed this trick this morning and this saved me a ton of time. Thank You Good Sir!

  11. matt
    February 17, 2015

    what’s the best way if I want to print a new document for each record? Like for a mailer for example?

  12. Georg Adamsen
    September 7, 2014

    What a useful and time-saving trick. Thank you very much!

  13. August 25, 2014

    Quand je pense que je passais par les variantes de mises en pages pour pouvoir exporter les cartes désirées… Merci beaucoup! ;)

  14. Steve Werner
    August 18, 2014

    That’s brilliant! Congratulations for a great tip.

  15. Eugene Tyson
    August 18, 2014

    Mind=Blown! That’s a fantastic idea and very clever. I’m going to link this on the pasteboard beside the business cards right now!