To be, or CSV, that is the delimiter

From time to time I receive emails requesting support for some of the scripts that I offer through the site. Since InDesign began to support semicolon separated text files for data merge, one particular issue began to receive more requests than normal.

The emails were consistent in nature – users had downloaded the data merge single or pro script and ran the script on files they had prepared. Instead of users being able to select from the fields to the left, all of the fields appeared in one line.

This behaviour usually occurs when the script runs a data merge database that had a CSV extension, but was actually separated by semicolons rather than commas. I’d explain this back to the user and ask them to try a different CSV export from Excel, or use my preferred file export of UTF-16 text from Excel.

However, many users who had exported from Excel to CSV said that this did not change the issue and the problem persisted. Usually the problem was that – despite choosing CSV from Excel’s export options, the software was still using semicolons as a delimiter rather than commas. Luckily, exporting to UTF-16 text usually resolved the issue.

On that note, I was uncomfortable with this issue and tried to replicate an Excel export from CSV that would use semicolons as delimiters rather than commas, but I couldn’t replicate this behaviour. But then I stumbled across the following article.

In short, the article says that Excel uses the user’s locale to determine what delimiter to use for CSV files. In short, if you use a comma to separate a dollar value from cents rather than a full-stop, then a CSV will likely export with semicolon delimiters rather than commas.

Adjusting this setting is not so simple, especially for Mac users like me – the adjustment is to change a system preference that uses the appropriate currency format, but that changes lots of other related information, so this isn’t an option.

Ultimately, if you are using the data merge to single record script, and are doing so with data exported from Excel, I highly recommend that you do so with a UTF-16 Unicode Text format.

I’ll admit this was a phenomenon I was unfamiliar with, and somewhat frustrated that a file format that itself stands for comma separated variables – isn’t actually separated by commas but is in fact separated by semicolons… depending on what system locale your computer is set to and that Microsoft Excel obeys.

Data Merge “Did You Know” Part Two

This is the second article in the Data Merge “Did You Know” series. If you’ve not read the first article, be sure to do so here. Carrying on from the first article, let’s dive into more lesser-known Data Merge behaviours of Adobe InDesign.

Data is there… even if the link is missing

If you ever have to share a Data Merge file with anyone else but do not want to share the data with them but instead only give them the base InDesign file, note that simply removing the link doesn’t remove the data.

In Part One, I wrote that InDesign doesn’t package the source file of a Data Merge… but that doesn’t mean the data isn’t there. Take this example of a packaged InDesign file used for a Data Merge. While opening the document, there is a missing link warning.

Once the document opens, I can then see in the links panel that there is a warning next to this text file that was used as the source.

If I right click on the link, I can’t unembed the text file as it simply isn’t linked

However, if I go to the Data Merge panel and check the preview box, I can see the records that were in the unlinked text file.

If the file didn’t have fields added to the page, I can also add those fields to the page and check the preview button on and the data will appear for these records.

It also merges correctly to PDF and InDesign files.

Be aware of this if you ever have to package a Data Merge file to others whom you do not wish to provide unredacted data.

Merge fields can be removed via the hyperlinks panel

A Creative Pro article referred to this as “ghost hyperlinks” but it is a great way of solving issues where a newly provided data merge source file can’t be previewed because of a mismatch of source names.

By opening the Hyperlinks panel, it is possible to see the fields that InDesign is using for the data merge as they are within this panel, though they aren’t obvious at first glance.

If one of the hyperlinks is double clicked, it will reveal the field that is being referred to.

From here, a hyperlink can removed, thereby replacing the field codes in the document back to regular text.

Shift clicking during the import does not show options

If the show import options checkbox is toggled off when placing an image, it is possible to perform a “one-time” request to show the import options without clicking on the checkbox. This is done by holding shift and then clicking Open.

But this doesn’t work with Data Merge. A similar option is available when selecting a data source, though holding shift and clicking Open will simply open the document – the Show Import Options checkbox has to be checked if it needs to appear. Hopefully this is a bug that is eventually fixed.

Put linked images in the same folder as the source text file…

While it is possible to add images to a data merge project by supplying its link in the source file, I so often see users put the complete file path of the link being used in the field.

If the images are filed in the same location as the text file, the only item that needs to be added here is the name of the file.

However, this means the links need to be in the same folder as the source text file.

…or use relative syntax as well

It is also possible to use syntax that is relative to the folder where the database is. Take the following folder structure.

To link to these images, the database needs to use syntax for the previous folder and then folders above. That will look like this

..: is syntax for go back a folder, whereas / plus the folder’s name is syntax to look into that particular folder.

I hope you found this short series useful, and if you have any Data Merge “did you know” tips, please feel free to submit them either in the comments, or contact me via my contact page.

Data Merge “Did you know” Part One

Regulars to the site will know that many of my articles relate to InDesign’s Data Merge feature. Given the amount of tutorials already available online elsewhere concerning basic tutorials for Data Merge, the Colecandoo site focuses more on articles about Data Merge in relation to scripts, GREP styles, or advanced techniques.

But there is a middle-ground that hasn’t been covered in many Data Merge tutorials, nor here on Colecandoo, so over the next two articles, I will attempt to bridge that gap and highlight some lesser known issues that can become a problem if users aren’t initially aware of them.

Can’t package the data or links used in the data

When InDesign packages an INDD file, it will save a copy of the file and copy any links used in the document into a Links folder, and any fonts used (within licensing restrictions) to a Document fonts folder.

However, this does not extend to the source data of a Data Merge file, nor any links that the source data may refer to.

PDF made from merge is different to regular PDF

I have written about this before but ultimately when exporting a PDF directly from Data Merge, it makes a variety of PDF that is similar but not the same as a usual PDF, as the following options cannot be chosen.

  • The ability to merge to an interactive PDF
  • The page range (not the record range)
  • Spreads
  • Create Tagged PDF
  • Create Acrobat Layers
  • Hyperlinks

I’ve speculated why this might be the case in this article but until this addressed, it is a consideration to be aware of.

Headers with the same name

If the headers in a database are exactly the same name, InDesign’s Data Merge will add a sequential number after the first instance of the field name to make a distinction between the field names.

Colons can cause weird issues in the header

This featured briefly in my creative pro article “Troubleshooting data merge errors” but in short, colons used in field names can cause one of two dialog boxes when used in particular circumstances. Thankfully, if a colon appears at the start or end (or both) of a field name, the data will import without any issues, but if a colon is within the field, then a dialog box with the words “Generic extended parser error” appears.

If there are two or more colons in the field name (neither at the start or end of a field name), a dialog box that says “not well formed” appears.

UTF-16 is the format built for Data Merge

InDesign’s Data Merge is designed with UTF-16 text in mind. However, CSV and TXT files exported from programs such as Microsoft Excel usually export to UTF-8.

This is usually fine for most circumstance in English, but can cause problems when:

  • using an alphabet other than the Roman alphabet;
  • the data contains punctuation or characters that may not be available via UTF-8

Excel does have an option to export to UTF-16 and it is worth using. The option is here when exporting via Excel:

In part two of this Did You Know series, we will look at other lesser known phenomenon, such as:

  • Data is there even if link is missing
  • Merge fields can be removed via the hyperlinks panel
  • Shift clicking during the import does not show options
  • The benefits of linked images in the same folder as the source text file

If you have any lesser-known Data Merge behaviours that you think would easily make this list, please feel free to mention them in the comments.

Data Merge to Single Records Pro: Now Available

Since 2016, Colecandoo has provided the free version of the Data Merge to Single Records script for Adobe InDesign – a script that allows single records to be exported from Data Merge with unique filenames available from the Data Merge database itself. This improves Adobe InDesign’s default – naming each file Untitled-N and is only available for InDesign files, not PDFs.

On that note, the PRO version of this script is now available!

This script improves upon the free original by:

  • Exporting to various additional file formats, such as interactive PDF, EPS, PNG, JPG, direct to print, or PDF via InDesign first;
  • Add a primary key to either the start or the end of a filename;
  • When exporting to certain file formats – the ability to run a user-selected additional script before the export.

The script can be purchased for A$15 from the Buy Now button below.


The original Data Merge to Single Records script offered by Colecandoo remains free and can be downloaded from the scripts page.

Referencing pages of a multi-page PDF file during data merge… workaround

At the time of writing, there are three multi-page/artboard file formats that Adobe InDesign can import when placing a file via the File/Place function. These formats are:

  • PDF
  • Adobe Illustrator
  • Adobe InDesign

(While it is possible to create many artboards in Adobe Photoshop, it is not possible to import a specific Photoshop artboard into Adobe InDesign… – at the time of writing that is – but that is another article!)

When placing one of these three formats, it is possible to control several import functions using the show import dialog box, such as:

  • Which page (or pages) to import;
  • How the pages should be cropped;
  • Whether or not to place the pages with a transparent background; and
  • What layers to show and their visibility;

However, when importing these file types as variable images during a data merge, these options are unavailable and replaced with the following:

  • Only the first absolute page of the file is imported (not always the page numbered 1 as the first page can also be – for example – in roman numerals or start at a page other than one); and
  • Page cropping, transparency and layer visibility is determined by the same variables as the last file of that type to be placed into the artwork.

For now, there is no workaround to control the latter issues during a data merge, other than to be familiar with this behaviour and plan the merge accordingly. There is a workaround for importing pages beyond the first page of a PDF file… but not an Illustrator or InDesign file.

Workaround: Split the PDF

The term “workaround” is used loosely in this context. Unfortunately, the solution is to break the PDFs into single page records. This can be done within Acrobat using the split button from the organise pages panel.

This feature also allows multiple files to be split at once.

By default, the resulting files will maintain the same filename with the addition of _Partx prior to the filename, with x representing the absolute page number.

Otherwise, I’ve prepared an action that you can download here that will save the PDFs to the Documents folder of the machine running the action.

(Yes, I’m also aware that there are quite literally hundreds of websites out there that will split multi-page PDFs to single PDFs for free. However, the methods outlined above will do so without involving a third party).

The next part of the workaround involves the data itself, and I’ll be using Microsoft Excel to create formulas to make the numbering for the resulting pages. All variable images being referenced will also be in the same folder as the data file, meaning only the filename is required and not the full path and the filename.

For data where the page number is known

Add a column to the database that references the absolute PDF page number that needs to be imported.

Absolute vs Section numbers abridged:

Absolute numbers refers to a page number based on the total count of pages in the document, while section numbers refers to the page number that was applied using page numbering in the application that made the PDF.

For example, take a PDF that contains 20 pages with the first six pages being in roman numerals, and the remainder being in decimal numbers. These two different styles of numbering are section numbers, while absolute page numbers refer to the total count of pages. To reference page iv of the PDF, the absolute page number to reference is 4. To reference page 5 of the PDF, the absolute page number reference is 11.

In this example, the A column represents the PDF to reference, the B column represents the absolute page number, and C represents the result. To obtain this result, the following formula can be used:

=SUBSTITUTE(A2,".PDF","_Part"&B2&".pdf")

This formula will look at filename reference and substitute the .PDF portion of the filename for _Partx.pdf, where x represents the figure in the B column. Using this formula, only filenames with the PDF extension will be affected, while filenames in other formats will be unaffected.

For data where the page reference needs to increment by one more than the row above

The same formula can be used for the naming, but another formula is used to determine if the page reference should increase if the same base file is being referenced in the row directly above.

In this example, the N column represents the PDF to reference, the O column represents the absolute page number, and P represents the result. A 24 page file NS91912 is being merged and needs to have the page reference incremented by one so that the filenames are NS91912_Part1.pdf to NS91912_Part24.pdf. The following formula can be used to change the page reference:

=IF(N2=N1,O1+1,1)

This formula will look at the filename and determine that if the filename is different to the row above, put the number 1 in the cell, BUT if the filename is the same as the row above, take the page value from the cell above and add 1 to it into this cell.

In a perfect world

Again, this is a workaround – it will only work for PDFs and requires some upfront work to prepare. Ideally, if I had my way and could implement some improvements, I’d like to see:

  • Not just the ability to choose a specific page, but choose the correct trim box and layers as well. For example, a file reference such as myFile.pdf;1,trim;Layer1,Layer2 where 1 represents the absolute page number, trim represents what trim box to use, and Layer1,Layer2 represent the layers I would like to appear (or leave the layer bit blank if all layers should be visible).
  • The ability to perform a similar task for incoming INDD, AI or PSD files.

Is this why Data Merge PDFs are “throttled back”?

Some time ago, I wrote an article about the difference between Data Merge PDF Export vs regular PDF export. The article highlighted the difference between the two PDF exports, but not why the data merge PDF export appears to have been throttled. Admittedly, this seemed more of a curiosity than anything else, and no further research was undertaken.

dmmystery001

The Data Merge PDF export dialog box. The yellow highlight shows items that can’t be checked.

In October 2018, the issue was once again raised by a reader who asked about preparing tagged PDFs via the Data Merge palette for the purposes of Section 508 accessibility – a way tagging a PDF so that PDF-reading software with accessibility features can assist users with limited accessibility in various ways, such as the example of tagging an image with a description that can be read aloud for users with little- or no vision.

As I couldn’t offer an explanation, all I could do was point to my previous article and submit a request to the InDesign Uservoice team to allow the Export to PDF to have all features of a regular PDF.

Then one month later, I fielded a query on the Adobe InDesign Forums concerning Interactive PDF and Data Merge Conflict where a user had hyperlinks in an interactive PDF where data merge fields were present, even though they weren’t linking to anything.

dmmystery002

Notice the tooltip displayed by the name “Zolly” – text that was a Data Merge text field.

That reminded me of an article from InDesignSecrets about Ghost Hyperlinks explaining that data merge fields can also be shown in the hyperlinks panel, meaning merge fields are hyperlinks themselves.

dmmystery003

The highlighted field in the art is the data merge field, as well as hyperlink 2.

However, Data Merge can’t export to interactive PDF from the data merge panel, so the only way I could replicate the forum poster’s issue was to prepare an InDesign data merge file, navigate to a relevant record,  then go to the file menu and export an Interactive PDF of the visible record on the page.

It was at that moment it occurred to me that THIS may be the reason that the hyperlinks checkbox is greyed out from the “export to PDF” dialog box in the data merge palette – because the merge fields are – in effect – hyperlinks themselves, and having hyperlinks enabled would also make the variable text clickable in the resulting PDF, despite having no actual link to go to. It would also explain why data merge does not offer an “export to interactive PDF” option from the data merge palette.

So, despite having a “eureka” moment of solving why the exports were different, it also made me realise that – without overhauling the way data merge works in InDesign – it may be unlikely to directly export PDFs with hyperlinks or interactivity via the Data Merge Panel anytime soon.

It is worth noting that if the data merge is exported to an InDesign file first (as explained in my workaround linked at the start of the article), and then exported to an interactive PDF, these issues do not occur. However, it is double-handling.

Still, this is frustrating in a world moving online, particularly for marketers who want to prepare unique PDFs that contain:

  • Hyperlinks, not just for navigating to URLs, but within the PDF itself, such as footnotes or page navigation;
  • Interactivity such as form fields for the purposes of surveys and feedback; and
  • Accessibility, not only from the legal standpoint of Section 508 conformance, but the genuine desire to engage with people with limited accessibility.

On that note, isn’t it about time to update the data merge feature so that exports are no longer limited to throttled-back PDFs or InDesign files as their only options? As an addition, how about the ability to print a merge directly from a data merge file, a feature that has been available in Microsoft Word for nearly thirty years.

Or what about the ability to merge to uniquely named files based on each record, something that I’ve already prepared a script for but would welcome as part of the InDesign user interface. And why stop at full-throttle PDFs… how about image formats such as jpg or png, or other formats such as html? Statistics from an InDesignSecrets poll show that print PDFs account for just under half of the participants’ usual file output exports.

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, it can be downloaded via the scripts page.

Another Data Merge script: Data merge to batches

This latest script compensates for a feature that should be available in InDesign’s Data Merge feature, but simply doesn’t work.

The problem:

Take for example the following Data Merge file where we want to export a custom range, but prepare PDFs in batches of 50s for production purposes. Each record is one page long.

dmlots001

When the Data Merge feature is used in Adobe InDesign, it is possible to merge to several new InDesign files that contain a maximum amount of records per file. The same dialog box is present when merging directly to PDF as well.

dmlots002

Unfortunately, the Record Limit per Document checkbox may as well be there for decoration, because it doesn’t work. Instead of 13 PDFs being created with the maximum size of each PDF being 50 records long, a PDF the size of the complete merge file is created.

dmlots003

The workaround

It is possible to split the document into ranges 50 pages per PDF, but it has to be done in Acrobat. From here, click the Organize Pages button.

dmlots004

This will show the Organize Pages toolbar.

dmlots005

From here, click on the split icon to show the split pages portion of the toolbar.

dmlots005

With the split pages toolbar now visible, choose the appropriate split by dropdown and edit the amount required. In this case, we need “number of pages” and 50 pages.

dmlots005b

The files now need to be saved somewhere. Click the Output Options button to show the Output Options dialog.

dmlots005c

Select a destination for the files and any additional filenaming information and click OK.

dmlots006

Once back at the regular toolbar, click the big blue split button.

dmlots005

The task will run and then present a dialog box once it is complete.

dmlots007

On an example such as the one demonstrated, this isn’t an onerous task. However, if working in a production setting where PDF page lengths can be tens of thousands or longer, this is inconvenient and unacceptable.

The solution

Rather than use the Adobe Acrobat solution, I would prefer that the original dialog box worked correctly. One option is to let the Adobe InDesign Engineers know that it should be fixed. A link to the direct request can be found here.

Until it is fixed, I’ve written a free script specifically for this purpose.

dmlots008

Using the earlier example, the same settings will be keyed in.

dmlots009

Once keyed in, click OK. A progress bar will let you know how the merge is going.

dmlots010

An alert will let you know when the merge is complete. The files are then saved to the selected destination with no extra splitting required.

dmlots011

Interested in this script? It can be downloaded from here.

Of interest: New Data Merge techniques and quote bug

In the latest Colecandoo Youtube episode, four Data Merge specific features are covered, namely:

  • Adding faux-returns to a data merge field to split over lines, and subsequent limitations of this technique;
  • Using GREP styles to swap a character for a glyph during a Data Merge;
  • Highlighting field codes so that they are easier to see when not showing live data; and
  • A bug that occurs when a double-quote is at the start of any field in a Data Merge text file.

Faux returns within a field

The faux-returns technique is written about elsewhere, so rather than spoil their presentations, please read the articles directly from the appropriate sources:

I’m a fan of this trick, but emphasise that this is a workaround rather than a long-term solution, given that formatting is limited and there are more appropriate ways of accomplishing this task such as dedicated plug-ins or an XML workflow.

Swap characters for glyphs

Daniel Solis also features a clever trick to swap phrases with glyphs during a Data Merge that uses both GREP styles and ligatures. Again, rather than simply repeat the technique, please see his original video here.

A similar method can be employed using Indiscripts’ Indyfont script, but rather than swapping phrases with glyphs, will swap single characters.

Highlight Field Codes

The video also shows a method for highlighting field-codes when Data Merge is not in the preview mode. It relies on the [Basic Paragraph] style using a GREP style that contains a large highlight, and that any other styles in the document are based off of the [Basic Paragraph] style. It also means the document has to be styled correctly.

I’d demonstrated this technique following a real-world example of a live file where fields were very hard to see, and the file had to have an offset shell printed with variable data printed afterwards, so making sure the shell had no variable data on it was crucial. Using this technique would make finding the field codes much easier to see.

Double Quote bug

Also featured in the video was an issue that once again arose from a real-world example where a customer had provided a database that had double-quotes at the beginning of fields, but no closing quotes, resulting in rather unusual results.

 

Data Merge to Uniquely-Named INTERACTIVE PDFs

In this episode of Colecandoo, I’ll demonstrate several ways to data merge to uniquely named interactive PDFs. The first method uses the data merge to single records script that I released in 2015 and can be downloaded here.

myscript

This demonstration features an InDesign file that is a survey for a package tour company. It contains form elements such as check boxes, radio buttons, a combo box, text box and a submit button. It is also a Data Merge document and contains two text fields within the first paragraph.

surveyitself

With my script, this should be a simple task, but as I click on the PDF export preset dropdown, I notice that I don’t have an option for interactive PDF. Why is this? Well put simply, the script works by calling upon the two ways that a Data Merge can normally be exported – to a newly merged InDesign file, or to a PDF.

As described on Colecandoo before, PDF export from Data Merge is neither a print PDF nor interactive, but it’s own style. Read the full article here.

Method One

But I said it could be done, so what’s the trick? Ultimately, we have to run my script to merge to InDesign files first, and once the folder of InDesign files is generated, use another script from Peter Kahrel, namely BatchConvert.

batchprocess

This script is an amazing utility created by Peter Kahrel that I have written about for InDesignSecrets. It takes a folder of InDesign files and can convert them to a variety of formats, including – for our purposes – interactive PDF. Simply point the script to the folder of InDesign files that were made initially, then point the script to a folder where the interactive files should save save to. Choose the output option as PDF interactive, and then run the script. That’s the first way.

Method Two

The second method is identical to the first method in that files are initially merged to InDesign files, and again uses the batch convert script. The difference is that rather than export to PDF interactive, files remain as InDesign files. Instead, there is a checkbox at the bottom of the user interface that allows another script to run during the batch. From here, I’m going to choose a script I’ve written for this express purpose – it will create an interactive PDF with the same name as the ID file but will save it to a folder called interactive PDFs on my desktop. So that’s the second method.

exportoption

Method Three

The third method demonstrates a sneak-peek at the PRO version of the data merge to unique names script.

proscript

The interface doesn’t look too much different to the previous script, with one exception – the option to run a script during an InDesign export. From this new option in the user interface, simply select the script that I used in method two. Choose some fields for the filenames, the range, and click OK. That’s the third method.

Method Four

The last method demonstrates a sneak-peek at another alternate version of the data merge to unique names script. Unlike the other methods shown, this method is by far the most direct, as it adds “PDF interactive” directly to the user interface.

extscript

To accomplish this task, choose the save location, choose the “PDF interactive” radio button, choose some fields for the filenames, the range, and click OK. That’s the fourth method.

Sidenote about Document Fonts

One issue not addressed in the video is the issue of potential font substitution while creating the interactive PDFs. This comes about because all four techniques rely on creating an InDesign file first that is removed from the original merge file, and may not have access to the fonts used by the original merge file. I’m running Extensis Suitcase font management software so I know the fonts will always be active until I turn them off, but for those relying on other solutions such as the Document Fonts folder, beware of this issue. I’ve written about this for InDesignSecrets.

An added bonus

One thing about the PDFs made during the demonstration was that the text in the dropdown field didn’t suit the formatting of the survey. Prior to the release of Adobe InDesign CC 2019, formatting of text-related form fields can’t really be controlled within InDesign except for the point size.

UPDATE 2018-10-21: Adobe InDesign CC 2019 now allows users to not only change the point size of a form’s text, but also its typeface as well.

However, I’ve made an Acrobat Action that I can run not just to this file, but all files in a folder. This action will convert the font in the text and combo boxes to Helvetica and make them 12 point. It’s worth noting that while it’s possible to change the font to whatever is on your system, other users may not have those fonts, so be conscious about this before using the action. Helvetica, Times, Symbol and Courier are present in Adobe Acrobat.

I’ve made this Acrobat Action available from my downloads page as well.

For those after a more robust solution, perhaps consider Form Magic from ID-Extras.

So there you have it, four ways to create uniquely named interactive PDFs from Adobe InDesign. If you’re interested in purchasing the upgraded versions of the data merge to unique names scripts shown in this video, contact me directly via my contact page.

Data Merging into the same Text Frame

From time to time, I hear the question along the lines of “how to I get Data Merge to put the next records in the same textframe during an InDesign Data Merge?” Well, if you’re expecting to do this procedure in one step, you are going to be disappointed because there is no one-click, turnkey solution to do this in Adobe InDesign itself.

That does not mean that accomplishing this task is impossible, in fact it can be done, and in Episode 16 of the Colecandoo Youtube videos, I outline several methods of how to accomplish this task, such as:

  • Merge in Microsoft Word beforehand and import into InDesign as a regular text import;
  • Merge in InDesign using the multiple record feature and use one of three scripts to re-thread the text so that it can be combined into one textframe;
  • Use a script from Ozalto that performs this task with almost no effort;
  • Venture into the rabbit-hole that is XML publishing; or
  • Consider one of the half-dozen paid plug-ins that are dedicated to the production of catalogues.

The video demonstrates several scripts that are absolutely essential for this task, as well as a bonus script that will help in everyday InDesign use:

This is a question that comes up often on various forums, and I feel that by showing how to accomplish this task through a video tutorial that it makes it easier to understand why this task needs to be done differently to Data Merge campaigns related to direct mail items or the creation of business cards.

Data Merge PDF Export vs regular PDF Export

From time to time, I receive feedback on my Data Merge to Single Records script saying that – when exporting to PDF – spreads or hyperlinks won’t work. There is a reason for this and it has nothing to do with the script, but a behaviour (or bug) of how Data Merge exports to PDF.

A regular user of Adobe InDesign will be aware that there are two different kinds of PDF export – print and interactive. What users may not be aware of is that there is a third, more subtle method of PDF export, and that is PDF export during Data Merge.

On the surface, the PDF export looks the same, but the devil is in the detail. When merging directly to a PDF directly from the Data Merge palette (or using the Data Merge to Single Record script), there are options that cannot be chosen. These are:

  • The ability to merge to an interactive PDF
  • The page range (not the record range)
  • Spreads
  • Create Tagged PDF
  • Create Acrobat Layers
  • Hyperlinks

pdfdiff1

The export PDF dialog box via Data Merge. Note that several options are greyed out.

With the exception of being unable to check the spreads checkbox, the other limitations don’t usually pose too many issues when creating print-ready PDFs. I don’t know the reasons why these options are unable to be checked and in my mind it doesn’t make any sense that they should not be able to be selected at all.

But I digress… if interactive PDFs need to be created using Data Merge (for example, a survey where the participant was directly named during the Data Merge) then this cannot be done via the export to PDF directly from Data Merge.

There is a workaround

The solution is to merge to an InDesign file, and then export the merged InDesign file to an interactive PDF.

This situation presented itself in a real-world example where a school wanted to provide an interactive form to the parents of the students. The form would contain the student’s name, class number and teacher from the Data Merge panel, but other components of the document were interactive form fields. The PDFs had the name of the student and the teacher as the filename. The solution was as follows:

  1. Use the Data Merge to Single Record script to merge to InDesign files to a new location using the name of the student and the teacher in the filename.
  2. pdfdiff2

    Using the Data Merge to Single Records script to merge as InDesign files.

  3. Once created into a new directory, select a single file at random from that directory and ensure that it opens correctly without any font substitution. Export this single file to an interactive PDF using the settings you would like to use for the remaining files, and click OK.
  4. Open the interactive PDF that was created to make sure it opens as intended. If so, close the PDF and delete it (the reason will become apparent in a moment).
  5. Close all documents and run the Batch Convert script from Peter Kahrel. If you can’t get to the script palette from here because regular palettes are hidden and replaced with a dialog showing recent documents, go to the Window Menu, Utilities, then Scripts.
  6. pdfdiff3

    Peter Kahrel’s Batch Convert script is used to convert the InDesign files to Interactive PDF files.

  7. Once Peter’s script is open, choose the input folder by pointing to the folder containing the newly created InDesign files. The three checkboxes underneath this option should be unchecked.
  8. Choose an output folder by pointing to a destination folder for the interactive PDFs.
  9. Choose the source format as InDesign and the target format as PDF (interactive).
  10. Click OK

Peter’s script will now begin to work through the files exporting them to interactive PDFs. While this technique works, it’s annoying to have to double-handle files. One other frustration with this method is that the interactive export settings have to be initially created from a “sacrificial” PDF. To be fair, this has nothing to do with Peter’s script, but rather a “feature” (or lack of…) by InDesign. Unlike the print PDF presets, there is no ability to create interactive PDF presets.

This is a feature I would like to see and if you feel the same way, make sure to tell the Adobe InDesign team at their feature request/bug report form. In fact, I personally wouldn’t stop there… instead of having to go through this entire procedure, I’d let them know that Data Merge’s features need to be expanded and improved upon so that workarounds like this should not be necessary.

%d bloggers like this: