Sie sind auf Seite 1von 12

Data Merging Individual Records to Separate PDFs - InDesignSecrets : InDesignSecrets Page 1 of 12

Thanks for coming to InDesignSecrets.com, the world's #1 resource for all things
InDesign!

Data Merging Individual Records to Separate PDFs


Colin Flashman August 18, 2014

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 wroteelsewhere
(http://colecandoo.com/2013/07/13/breaking-up-is-hard-to-do-indesign-files-into-individual-pdfs-that-is/) 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 dont mind merging to a new InDesign file first. Actually, this
question was answered a while ago by Kelly Vaughn in this post (http://indesignsecrets.com/use-
indesign-table-of-contents-to-make-pdf-bookmarks.php) .All Ive done hereis 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, well create a set of business cards and the PDFs willbe named exactly as the
names on eachbusiness 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.

https://indesignsecrets.com/data-merging-individual-records-separate-pdfs.php 01.03.2017
Data Merging Individual Records to Separate PDFs - InDesignSecrets : InDesignSecrets Page 2 of 12

(https://indesignsecrets.com/wp-content/uploads/2014/08/bu2pic11.png)

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

(https://indesignsecrets.com/wp-content/uploads/2014/08/bu2pic2.png)

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.

https://indesignsecrets.com/data-merging-individual-records-separate-pdfs.php 01.03.2017
Data Merging Individual Records to Separate PDFs - InDesignSecrets : InDesignSecrets Page 3 of 12

(https://indesignsecrets.com/wp-content/uploads/2014/08/bu2pic3.png)

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.

(https://indesignsecrets.com/wp-content/uploads/2014/08/bu2pic4.png)

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

https://indesignsecrets.com/data-merging-individual-records-separate-pdfs.php 01.03.2017
Data Merging Individual Records to Separate PDFs - InDesignSecrets : InDesignSecrets Page 4 of 12

(https://indesignsecrets.com/wp-content/uploads/2014/08/bu2pic5.png)

6. Open thePDF 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.

https://indesignsecrets.com/data-merging-individual-records-separate-pdfs.php 01.03.2017
Data Merging Individual Records to Separate PDFs - InDesignSecrets : InDesignSecrets Page 5 of 12

(https://indesignsecrets.com/wp-content/uploads/2014/08/bu2pic6.png)

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

(https://indesignsecrets.com/wp-content/uploads/2014/08/bu2pic7.png)

Method 2: Using Bookmarks From Document Structure

https://indesignsecrets.com/data-merging-individual-records-separate-pdfs.php 01.03.2017
Data Merging Individual Records to Separate PDFs - InDesignSecrets : InDesignSecrets Page 6 of 12

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.

(https://indesignsecrets.com/wp-content/uploads/2014/08/bu2pic8.png)

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).

https://indesignsecrets.com/data-merging-individual-records-separate-pdfs.php 01.03.2017
Data Merging Individual Records to Separate PDFs - InDesignSecrets : InDesignSecrets Page 7 of 12

(https://indesignsecrets.com/wp-content/uploads/2014/08/bu2pic9.png)

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.

https://indesignsecrets.com/data-merging-individual-records-separate-pdfs.php 01.03.2017
Data Merging Individual Records to Separate PDFs - InDesignSecrets : InDesignSecrets Page 8 of 12

(https://indesignsecrets.com/wp-

content/uploads/2014/08/bu2pic10.png)

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 textframewith 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 textcan be outside the trim area, so long as the text frameis 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.

https://indesignsecrets.com/data-merging-individual-records-separate-pdfs.php 01.03.2017
Data Merging Individual Records to Separate PDFs - InDesignSecrets : InDesignSecrets Page 9 of 12

(https://indesignsecrets.com/wp-content/uploads/2014/08/bu2pic12.png)

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
(http://kasyan.ho.com.ua/create_text_anchors.html) that comes close, but unfortunately it only creates text
anchors that are hidden, rather than bookmarks.

Bio (#ts-fab-bio-below-69944) Latest Posts (#ts-fab-latest-posts-below-69944)

Colin Flashman
A prepress operator and graphic designer for a South Australian commercial
printer, with close to 20 years of experience in the trade. He is also a regular
contributor to this site and InDesign Magazine, and hosts his own prepress blog
"Colecandoo".

https://indesignsecrets.com/data-merging-individual-records-separate-pdfs.php 01.03.2017
Data Merging Individual Records to Separate PDFs - InDesignSecrets : InDesignSecrets Page 10 of 12

17 Comments on Data Merging Individual Records to Separate PDFs

Mind=Blown! Thats a fantastic idea and very clever. Im going to link this on
the pasteboard beside the business cards right now!
Eugene Tyson

August 18, 2014 Reply


at 5:05 am

Thats brilliant! Congratulations for a great tip.

Steve Werner Reply


August 18, 2014
at 6:41 pm

Quand je pense que je passais par les variantes de mises en pages pour
pouvoir exporter les cartes dsires Merci beaucoup! ;)
Fabien PEREZ
August 25, 2014 Reply
at 2:22 pm

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

Georg Adamsen Reply


September 7, 2014

at 1:20 am

whats the best way if I want to print a new document for each record? Like
for a mailer for example?
matt

February 17, 2015 Reply


at 11:36 am

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

April 15, 2015 Reply


at 7:23 am

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

ReclameRuud Reply
June 8, 2015
at 7:17 am

https://indesignsecrets.com/data-merging-individual-records-separate-pdfs.php 01.03.2017
Data Merging Individual Records to Separate PDFs - InDesignSecrets : InDesignSecrets Page 11 of 12

Ann Wuyts Thank you, brilliant advise! Best way Ive found so far that does not require
July 22, 2015
custom scripts.
at 5:41 am
Reply

Thank you! Save my life!!!

Marco Reply
November 17, 2015

at 4:44 am

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
Darius

January 15, 2016 out and I cannot find a way to make this work anymore. I used to use this
at 9:34 am feature of splitting the document and naming business card proofs by
persons first and last name all the time. Thanks Adobe.

Reply

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
Patrick van Houten
March 7, 2016 option Use bookmark names for file names is available again.
at 3:34 am
Reply

Great idea. Need this trick this morning. but still, if theres still like less than
3 steps method, will definitely be appreciated. script or anything.
Joe
February 25, 2016 Reply
at 12:46 am

There is a script that I wrote that will now do this:


https://colecandoo.com/2015/09/04/data-merge-from-indesign-to-
Colin Flashman

February 25, 2016 unique-filenames-now-a-reality/


at 3:03 am
Reply

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

https://indesignsecrets.com/data-merging-individual-records-separate-pdfs.php 01.03.2017
Data Merging Individual Records to Separate PDFs - InDesignSecrets : InDesignSecrets Page 12 of 12

Joe

February 25, 2016


at 12:06 pm

Tried it. this is definitely the kind of script im looking for. Thank sa lot
Colin..!!
Joe
February 28, 2016

at 9:01 am

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
martin_beckley

February 26, 2016 pain but it will definatly make things easier when I get a few hundred to
at 8:15 am process in one go.
Thanks. :-)

Reply

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

Paulo In Acrobat DC the split feature is hidden in organize pages. Be aware that
July 15, 2016
the bookmarks cannot have invalid characters. Otherwise, it gives out a
at 5:09 pm
permissions related error.

Reply

https://indesignsecrets.com/data-merging-individual-records-separate-pdfs.php 01.03.2017

Das könnte Ihnen auch gefallen