1 Datasource preparation & import
Best practices for your datasource
- Must contain more than one data column/title (you can disable this behavior in the import preferences if you have a csv with one column only)
- Cannot contain line breaks inside of the data (just at the end of each data record)
- Each flied has to be separated by one of the following characters: semicolon, comma, tab or vertical bar
- Has to be encoded as MacOS Roman, UTF-8 (recommended), UTF-16BE, UTF-16LE, UTF-32BE or UTF-32LE
Import datasource
Drag and drop your CSV file on the CSV icon or select a file by clicking the folder icon. Note: If you have Excel installed and running, you might see an Excel icon instead. You can still drop your csv file [1] on it and it will change to a CSV icon.
Then the settings will pop up. You must select the correct delimiter and encoding or the import will fail. The other options are optional:
Sanitize
With this option turned off, individual fields will be imported exactly like they are found in the .csv file. If you want these fields to be cleaned (surrounding double quotes stripped, characters unescaped, etc.) you can turn this option on.
Backslash as escape
This option allows you to import files where special characters are escaped with a backslash (the separator, newline etc.)
2 Layout preparation & import
Best practices for your layout
- Always expect long data. When preparing layouts for MyDataMerge, you have to add placeholders to text frames. Please make sure that text frames which contain placeholders are big enough to provide enough room for the data you want to merge in.
- Move unneeded stuff to master pages. Instead of keeping all items on the regular pages, move everything that’s does not need to be merged (like decoration, background images…) to the master page. For large databases, this will speed up the process a lot.
- Do not use styling options if every data record has the same styling. Apply styling in your layout document instead.
- Use locally installed fonts instead of auto downloading them from Adobe Cloud. Adobe Fonts can be installed locally as well in your Adobe Creative Cloud app. When loading them online, this can massively slow down the merge process or lead to errors.
- Scale images down. When merging thousands of data records its necessary to scale images down before the merge. No matter if the images are merged or part of the layout. This can save a lot of processing time.
Add placeholders to your layout
Add text placeholder
Requirements
- The placeholder text can be located in any text frame, along any other text
- You can choose any text you like (a-z, 0-9, _-)
Make sure that even the longest text from your datasource will have enough room in the text frame provided, or overset text will be produced.
Add image placeholder
Requirements
- The placeholder text must be located in a single text frame (not linked with any other)
- The frame can have any proportions
- You can choose any text you like (a-z, 0-9, _-)
- The placeholder text including tags must be the only content of the text frame (be careful with spaces)
- If you want to use Autolink you can add @ to identify the placeholder as image, e.g. <<@image>> (for using Autolink you also have to make sure that the label of the placeholder and the title of your datasource colum must match (in the example above, the datasource column title must be “image”)
Note: The position/alignment of the text inside the frame is not taken into account. You can control the alignment and fitting in the configuration.
Import
Import Layout
Importing your layout is easy:
Open MyDataMerge, start a new project and drag and drop your .indd file on the INDD area [1] or select the file by clicking the folder button [2]
After adding a datasource you can import both files.
Most common issues that may arise
- If you have missing links or fonts, MyDataMerge will throw an error and ask you to fix this
- If you have no placeholders defined (surrounded by << >>), MyDataMerge will throw an error
- If you have auto-download fonts from Adobe Cloud enabled, MyDataMerge will throw an error – this is because InDesign loads these fonts asynchronously and doesn’t let developers (like us) check the loaded state of these fonts. You can bypass this issue by activating the fonts directly in the cloud (so they are always active)
3 MyDataMerge configuration
Autolink - setup placeholders automatically
Autolink is perfect for simple setups (or a good start for more complex setups), saying if you just want to link your datasource with your placeholders.
The only requirement is that your data titles match your placeholders exactly.
Example database:
Example layout:
Example placeholders:
- For text replacements a placeholder “<<Last Name>>” will automatically create a text placeholder and match the datasource column “Last Name”.
- For image replacements a placeholder “<<@image>>” (note the @ which represents an image) will automatically create an image placeholder and match the datasource column “image”
- For QR-Code replacements a placeholder “<<#qrcode>>” (note the # which represents a qr-code) will automatically create a qr-code placeholder but will not match any datasource column (as qr-codes are more complex than just one value)
Note: Your placeholders in the layout still have to match the requirements or they will be treated as text replacement.
Once your layout is imported, hit the Autolink button in the bottom right.
Editing text placeholders
Setup text placeholders
A text placeholder will inject text from various sources into your layout in the merge process.
These sources can be one or a combination of:
- Datasource content (Changes for each record)
- Static text (Always the same)
- Sequence (Different types of counting numbers)
- Automator workflow (for editing outside of MyDataMerge – learn more here)
- Custom (java-)script (learn more here)
To add an element, open the placeholder by double clicking it (or click the pen icon), then add an element by clicking the plus icon:
Add the element and the appropriate editor will open (e.g. datasource element):
Once you selected or entered the required data, the element becomes valid (green check)
Once every placeholder is valid, you are able to export.
Notes:
- You can combine different elements here by adding them (plus icon above the eye icon) and drag & drop them up or down. The result will always be shown in the preview on the right.
- Additionally every element has some settings (gear icon) which will provide a wide range of tools to transform your data (e.g. strip whitespaces, add space before or after and so on)
Editing image placeholders
Setup image placeholders
An image placeholder will inject images based on file paths from various sources into your layout in the merge process.
These sources can be one or a combination of:
- Datasource content (Changes for each record)
- Static text (Always the same)
- Sequence (Different types of counting numbers)
- Automator workflow (for editing outside of MyDataMerge – learn more here)
- Custom (java-)script (learn more here)
Open the placeholder by double clicking it (or click the pen icon), then the editor will open. First of all, make sure that “Replace with image” is selected [1]. Then add one or more elements to get file paths to your images. In the below example [2] a datasource element is added, where column “Image” is selected (as this column contains paths to the image files). If the element is valid (green check) and a valid image path is given, you will see a preview on the right [3]. If the preview doesn’t appear, you might need to grant access to the image folder for MyDataMerge – click the “Grant access” button in this case. By deactivating the switch “Show image”, MyDataMerge will output the file path in the preview instead.
After access is granted, you will see the image appear in the preview on the right:
How to download images
To advice MyDataMerge to download images please follow these instructions
- Make sure your image placeholder has the right type “Replace with image” [1]
- Add a datasource element and select the column with the image URLs [2]
- Open the settings (gear icon), and activate “Download image” [3]. You may additionally select a folder where to download the images to
Issues that may arise
- By default, MyDataMerge checks for file name extensions of images. e.g. “https://www.myserver/path/to/myimage.jpg” -> .jpg – If it doesn’t find any, an error will be thrown. You can disable this behaviour in the preferences > editor > Disable file extension check for downloaded images
- If images change online, MyDataMerge doesn’t know that. At the first time an image is downloaded, it will be cached and not re-downloaded by default (for a better performance). You can force a download everytime by activating “Force download on each export” in the image settings (check the image above).
4 Export
Filetypes
CSV export
With CSV selected in Export > Filetype, MyDataMerge will export a Adobe® Indesign®’s data merge compatible CSV file. Use this option if you don’t want to merge with MyDataMerge but want to use MyDataMerges ability to customise the data.
Please note: Both CSV options …
- CSV (export only) – Exports a CSV file
- CSV (export and link) – Exports a CSV file and links it with your data in InDesign so you can continue with the data merge there
… cannot handle MyDataMerge specific actions like:
- Applying styles
- Applying the last action if a setup fails
- Applying GREP actions
- Applying Hyperlinks
- Use Automator workflows after export
If you need any of these please use MyDataMerge for merging your data.