Data Merging to specific pages

I was recently faced with the following brief:

I have a database that need to be run through the Data Merge to Single Record script. Some of them need only page 1 and some need page 2. Is there a way to add another column in the database and let InDesign know if it should export page 1 or 2? 

My original thoughts were that this could not be done, but then I realised there is a new feature added in Adobe InDesign CC 2018.1 to the PDF export: Create Separate PDF Files.

mergemerge001

I decided to create a new PDF export style and ensured that the Create Separate PDF Files checkbox was turned on, and make sure that the numbering is based on page numbers.

mergemerge002

Wondering if this would work, I created the following scenario – thank you graphics to be emailed to contributors to this site, based upon three available contribution values. The InDesign file is 3 pages long, has two different page sizes, and is linked to a Data Merge of 1,000 records that has – among its fields – a field called “Variable” that has one of 3 values in the field – 5, 10 or 25. Page 1 is the five dollar campaign, page 2 is the ten dollar campaign, and page 3 is the twenty five dollar campaign.

mergemergesplash

For the sake of this demonstration, I’m going to try with records 1-25. Running the Data Merge to Single Record script available from the downloads or scripts pages of this site, I make sure that the variable field is part of the filename, but ensure that it is the last part of the filename:

mergemerge003

I let the script run, and then once complete, the Results folder appears as follows:

mergemerge004

So right now, there are myriad folders and files, so this looks like a complete mess and failure. However, using the search function at the top right of the finder window, I’m able to find what I’m after. I’d like to find all of the five dollar PDFs first, so I type in 5_01.pdf into the search field, ensuring I’m searching on the Result folder. Why 5_01.pdf? Well, the 5 was the variable in the variable field, and 01 was the page number associated in the InDesign file to the five dollar campaign.

mergemerge005

So this found 11 records. I’ll move those records into a folder elsewhere and look for the other PDFs in a similar fashion: 10_02.pdf and 25_03.pdf

I now have all the records required, and can remove the remaining records from the Results folder, so that’s great for creating single page PDFs by using one InDesign file for multiple campaigns.

Modifying the technique for JPG or PNG

If I want the files as JPG or PNG instead, I could use the Data Merge to Single Record script and merge to InDesign files without splitting the files into single records, and then use Peter Kahrel’s Batch Convert script to export to JPG or PNG.

It is then possible to perform a similar search that was used to separate the earlier campaigns.

Doing the modified technique in less steps

Or, if you want to run one script instead of two, perhaps consider having a look at the Data Merge to Single Records PRO version:

mergemerge010

Run the script and then perform the search that was used to separate the earlier campaigns.

If you’re interested in the Data Merge to Single Records PRO version, please contact me via the contact page.

Advertisements

About colmin8r
A prepress operator since 1997 specialising in Adobe InDesign.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: