645
Automation
Text field placeholders appear in the target application within double angle brackets (such as <<Name>>) using the
current formatting attributes (such as font and size).
Note:
You cannot create a valid field by simply typing the field name or editing an existing field. You must insert it from the Data
Merge panel.
Insert an image data field in the target document
• To insert a new inline graphic placeholder, drag an image field onto a text frame, or place the insertion point in a
text frame and click the image field.
• To insert a new floating graphic, drag an image field onto an empty frame or existing graphics frame. If you drag an
image field onto an empty frame, the empty frame becomes a graphics frame.
• To insert a field into grouped items, table cells, or nested items, drag the image field onto the target.
Image field placeholders appear as frames containing the field name.
Add QR code
You can integrate a QR code in the merged document. Following are the different types of QR code fields that can be
added via a Data Merge workflow:
• Plain Text
• Web Hyperlink
• Text Message
• Email
• Business Card
To generate the QR codes the data entries in the .txt or .csv files, which are used as Data Source, are in the following
format:
• Plain Text: In the QR code Column enter the text as it is.
• Web Hyperlink: URL:<url> (For example “URL:http://www.google.com”)
• Text Message: SMSTO:<Phone number>:<Message> (For example: “SMSTO:9818143551:Hi”)
• Email: MATMSG:\nTo:<email address> (example: “MATMSG:\nTO:[email protected]\nSUB:Hi;\nBODY:;;”)
• Business Card: BEGIN:VCARD\nVERSION:2.1\nN:Smith;John\nFN:John
Smith\nORG:Adobe\nTITLE:Engineer\nTEL;CELL:+919876543210\nTEL;WORK;VOICE:123456789\nADR;WO
RK:;;Street
ABC;Seattle;Washington;98101;US\nEMAIL;WORK;INTERNET:[email protected]\nURL:www.adobe.com\nEND
:VCARD
Though the data entries can be a mix of email, sms, hyperlink, or plain text type. Enter them in the .csv and txt field in
the above mentioned format with a # sign on their column name. To generate QR codes, follow these instructions:
1 Select Windows > Utilities > Data Merge.
2 From the flyout menu, select Select Data Source.
3 Select the data file with the QR field information. Click Open.
4 Select the placeholder in the document.
5 Click Create Merged Document icon to create a merged document.
Last updated 10/15/2018
646
Automation
Adding data field placeholders to master pages
If you insert data field placeholders on master pages, you have advantages that are not available when you insert
placeholders on document pages:
• The resulting merged document contains the original placeholders on its master pages and includes the merged
results on document pages as overridden master page items.
• The merged document maintains a connection to the data source, so if records in the data source are modified, you
can update the merged document contents by choosing Update Content In Data Fields. This option is especially
helpful if you change the layout in the merged document and then need to add new data from the data source.
• The settings in the Create Merged Document dialog box are the same as those used in the target document, so you
can quickly re-create the current document with the same appearance. You can also use these shared settings to
create an identical document with a different data source, or create a new document with a slightly modified layout.
Note:
If you’re adding data fields to a master page, make sure that the text frame containing the data fields allows master item
overrides. Select the text frame on the master page and choose Allow Master Item Overrides On Selection from the Pages
panel menu. If this option is not selected, the data will not be merged. (See .)
You cannot place data fields on both master pages and document pages. To merge properly, you must apply a master
containing data fields to the first page of the document.
Note:
If an error message indicates that InDesign cannot merge the document because no placeholders are present, you may have
added the placeholders to the left master page in a one-page document. Page 1 is based on the right master page, so add
the placeholders to the right master page.
Update, remove, or replace data source files
• To update data source files, edit and save the data source file in comma- or tab-delimited format, and then choose
Update Data Source from the Data Merge panel.
The changes will be reflected in the Data Merge panel. If the changes are not reflected in the document after
updating, deselect Preview to turn it off, and then select Preview again to turn it back on.
• To remove the connection to the data source file, choose Remove Data Source from the Data Merge panel menu.
• To switch to a new data source file, choose Select Data Source from the Data Merge panel menu, and then specify
the new data source file. InDesign may not recognize some of the fields. In this situation, it’s best to delete and
reinsert placeholder fields.
If you generate a merged document from a target document in which data fields appeared on master pages, you can update
the data fields in the merged document.
Preview records in the target document
Before you merge the target document and data source file, it’s a good idea to preview the records to make sure that
field data will appear properly when the information is merged. When you preview records, the Data Merge panel
displays actual data from the data source file instead of the field placeholders. For example, instead of seeing
<<Company>>, you might see Adobe. You can use the navigation buttons on the Data Merge panel to cycle through
the records.
Last updated 10/15/2018
647
Automation
If you find problems with any of the records, such as typographical errors or extra spaces, it is recommended that you
edit the source file in its original application. (See About data source files.)
1 Click Preview at the bottom of the Data Merge panel, or choose Preview from the Data Merge panel menu.
2 Click the navigation buttons to cycle through data from different records.
To go to a specified record, click the navigation buttons at the bottom of the panel. You can also type the number of the
record you want to preview in the navigation text box at the bottom of the panel, and then press Enter or Return.
Switching preview on or off
Some issues may arise or correct themselves when you switch between previewing modes. Keep the following in mind:
• Placeholders replace the preview content when the Preview Record option is not selected. If you delete an image as
well as the frame containing the image, or delete a whole text string, when you deselect the Preview Record option,
the placeholders will not appear as they have also been removed.
• Changes in the Content Placement Options dialog box are not reflected until you click OK. Also, if the Preview
Record option is selected, the data will not reflect the updated placement settings until you deselect and select the
option again.
• If you try to save the document in preview mode, you will receive a message prompting you to turn off preview mode
before saving your document.
Edit data field placeholders
When you add a text data field to a document, the placeholder text for the field is entered using the formatting attributes
(such as font and size) active at the insertion point. You can then edit the placeholder text’s attributes to control the look
of the actual data.
? Do one of the following:
• To change placeholder attributes, select the placeholder text, and then change the formatting attributes as you
would with other text.
• To change a placeholder, select the placeholder or the actual data, and select a different field name in the Data
Merge panel.
• To delete a placeholder, select the placeholder and press Backspace or Delete.
Note:
In Story Editor view, text placeholders are displayed in the same way as hyperlinks. Some Data Merge panel options are
not available in Story Editor view.
Set content placement options
Use the Content Placement Options dialog box to specify the default settings for the current document or for all future
data merge projects. You can specify how the image is placed, whether images are linked or embedded, whether blank
lines are removed for empty fields, and the maximum number of records for each merged document.
1 Do one of the following:
• To affect only the current document, open the target document.
• To affect all future documents you create, close all documents.
Last updated 10/15/2018
648
Automation
2 Choose Window > Utilities > Data Merge.
3 Choose Content Placement Options from the Data Merge panel menu.
4 Change the content placement options. (See Content placement options.)
5 Click OK.
Merge records
After you format the target document and insert fields from the data source file, you’re ready to officially merge the
information from the data source with the target document. You can merge the records to another InDesign document
or directly to PDF. When you merge, InDesign creates a new document or PDF based on the target document, and
replaces the fields in the target document with the appropriate information from the data source file.
When you merge a document that includes data field placeholders on master pages, those master page items will be
copied into the master pages in the newly generated document.
Merge single or multiple records
1 With the target document open, do one of the following:
• Choose Create Merged Document from the Data Merge panel menu, or click the Create Merged Document
button .
• Choose Export To PDF from the Data Merge panel menu.
Create Merged Document
2 On the Records tab, for Records To Merge, select All Records to merge all the records in the data source file, select
Single Record to merge a specific record, or specify a Range of records to merge.
3 For Records Per Document Page, do one of the following:
• Choose Single Record so that each record starts at the top of the next page.
• Choose Multiple Records to create more than one record per page. (For example, to print mailing labels.)
Last updated 10/15/2018
649
Automation
You cannot merge multiple records if the data fields appear on a document page in a document with multiple
pages, or if data fields appear on multiple master pages.
4 Select Generate Overset Text Report With Document Creation to automatically open a report that tracks overset
conditions created during the merge of the data into the InDesign document. (See Overset text reports.)
5 Select Alert When Images Are Missing to display a missing link alert when one or more images are not available.
6 If you selected Multiple Records on the Records tab, click the Multiple Record Layout tab, and specify the following:
• For Margins, type values to specify the distance between margin guides and each edge of the page.
• For Layout Of Records, select either Rows First or Columns First, and then specify the spacing between the
columns and rows.
7 If you selected Multiple Records, select Preview Multiple Record Layout to review changes made in the Create
Merge Records dialog box. You can click the Page buttons to navigate the records.
8 Click the Options tab and specify the placement options. (See Content placement options.)
9 When you’re finished, click OK.
10 If you’re exporting directly to PDF, specify PDF options, and click Export. Then specify the filename and location,
and click Save. (See Adobe PDF options.)
If the data source file points to any unsupported file formats or images that are not available, you may need to correct
the data source file to point to a supported file, correct the path to any missing file, or simply move the file to the correct
folder so that InDesign can find it and place it.
Limitations for merging multiple records
You can choose Multiple Records to create more than one record per page. For example, if you are printing mailing
labels, you want to print more than one label per page. The way records appear in the merged publication depends
mainly on the layout options. Here is a list of limitations you might encounter when using the Multiple Records option:
• You cannot merge multiple records if the data fields appear on a document page in a document with multiple pages,
or if data fields appear on multiple master pages.
• The Data Merge allows for only one size of place holder.
• Deleting a record in the merged publication will not reflow the remaining records into the empty placeholder.
Merging to a PDF file
When you merge to a PDF file, all the options are the same as when you create a merged InDesign document. The
resulting PDF takes advantage of PDF XObjects for the static parts of the page, resulting in a reduced-size, efficient PDF.
Update data fields
After merging a document with data placeholders on master pages, you can change the layout of the merged document
and still update the values of data fields in the data source. Use the Update Data Fields to update the data fields while
maintaining the layout of the document. This option is available only in a merged document in which data placeholders
appear on master pages.
1 Make any changes to the data source file, and then save and close the data source file.
2 In the merged document, choose Update Data Fields.
The changes that have been made by updating the data fields appear in a log file.
Last updated 10/15/2018
650
Automation
This option works best when you simply edit or add records in the data source file. If you add placeholder fields, add new
fields to the data source, or change the settings in the Create Merged Document dialog box, use the Create Merged
Document option to generate a new merged document.
Overset text reports
The Overset Text Report appears if the Generate Overset Text Report option is selected in the Create Merged
Document dialog box, and if one or more fields include overset text after the data is merged.
The report displays each overset instance in a numbered list showing the page number the text appears on, overset
character/word count and a snippet of the overset text.
If the report appears when you create a merged document, use the report to fix the overset condition. For example, you
may want to increase the text frame size, decrease the font size, or edit the text.
Content placement options
The following options appear in the Content Placement Options dialog box:
Fit Images Proportionally Maintains the image’s aspect ratio but scales the image to fit within the frame (default).
Fit Images To Frames Scales the image so that its aspect ratio is identical to the frame’s aspect ratio.
Fit Frames To Images Preserves the image size but adjusts the frame size to match it.
Preserve Frame And Image Sizes Places the image at its intrinsic size into the frame, aligned to the upper-left corner of
the frame. The image is cropped if too large for the frame.
Fill Frames Proportionally Places the image so that its height or width fills the frame, leaving the rest of the image
cropped.
Content-Aware Fit Automatically fits an image inside the frame based on the image content and frame size.
Center In Frame Aligns the center of the image to the center of the frame. This option is disabled if you have selected
Content-Aware Fit as the fitting option.
Link Images Creates a link, or file path, to the original image file. If this option is not selected, all image data is
embedded in the InDesign document.
Remove Blank Lines For Empty Fields Remove paragraph returns inserted for empty fields. This is especially useful for
mailings in which you have an optional address field. This option ignores soft returns. If any characters, including
spaces, appear on the line, the line is not deleted.
Record Limit Per Document Specifies the maximum number of records for each merged document. When this
threshold is reached, a new document is created. This document has the number of pages necessary to hold the
remaining records being merged (up to the per-record limit). This option is available only when Single Record is
selected.
Page Limit Per Document Specifies the maximum number of pages for each document. When the threshold is reached,
a new document is created with the number of pages necessary to hold the remaining records being merged (up to the
per-page limit). This option is available only when Multiple Records are selected from the Records Per Document Page
menu when merging.
Plug-ins
Last updated 10/15/2018
651
Automation
Install plug-ins
The InDesign plug-in modules are software programs developed by Adobe, and by other software developers working
in conjunction with Adobe, to add features to Adobe software. A number of importing, exporting, automation, and
special-effects plug-ins come with your program and are automatically installed in the Plug-Ins folder. In fact, most of
the features you see in InDesign are provided by plug-ins.
Once installed, plug-in modules appear as options on menus, in dialog boxes, or in panels.
1 If an installer is provided, use it to install the plug-in module. Otherwise, drag a copy of the module into the Plug-Ins
folder inside the InDesign application folder.
2 Follow any installation instructions that come with the plug-in.
Note:
You can use any commercial plug-in designed for use with InDesign. Adobe Technical Support can help you isolate
problems related to plug-ins. However, if it has been determined that the problem is directly related to a plug-in created by
another company, you will need to contact that company for further support.
Use Extension Manager to configure plug-ins
Use the Extension Manager application to inspect and customize the set of installed plug-ins. For example, you can get
detailed information about installed plug-ins, create custom plug-in sets for different tasks or workgroups, and isolate
plug-ins when troubleshooting problems. You can also disable plug-ins.
? Choose Help > Manage Extensions (Windows) or InDesign > Manage Extensions (Mac OS).
For more information on using Extension Manager, click Help in the Extension Manager application.
Integration with Creative Cloud Add-ons via the Browse Add-ons menu
You can search and install plug-ins, extensions, and more for Adobe InDesign and other products from the Adobe Add-
ons website.
• To add-on InDesign with the additional plug-ins select Window > Browse Add-ons. These add-ons can be free or
paid. All the installed/acquired plug-ins from the creative cloud app for InDesign get synced to InDesign from this
workflow. It takes you to the browse add-ons webpage.
• These add-ons are later visible in Window > Extensions, downloads or location mentioned in the where to find
description of the add-on. To view the add-ons you have downloaded, go to the browse add-ons webpage and in the
left side pane of the webpage there is an option of View my add-ons. It also lists for which products and respective
versions these add-ons are supported on.
When file-syncing is ON, the browse add-ons sync to the creative cloud account.
Scripting
Last updated 10/15/2018
652
Automation
Scripting in InDesign
Scripting is a great tool for performing a variety of tasks. A script can be as simple as an automated common task or as
complex as an entire new feature. You can create your own scripts, and you can run scripts that other people have
created. For more information on scripting, see the Scripting Guide, scripting requirements, and other developer
resources at http://www.adobe.com/devnet/indesign/documentation.html.
The Scripting Guide contains an introduction to scripting and tutorials. You can also find a number of useful scripts
that you can run, such as a script that draws guides around the selected object. Some of these scripts appear by default
in the Scripts panel.
Scripts panel and Script Label panel overview
InDesign includes two panels for scripting: the Scripts panel and the Script Label panel.
The Scripts panel is where you run scripts without leaving InDesign. The Scripts panel displays the scripts that are
located in the Scripts folders in the InDesign application folder and in your Preferences folders. If you create or receive
a script, you can place it in the Scripts Panel folder so that it shows up in the Scripts panel.
Mac OS Users/[username]/Library/Preferences/Adobe InDesign/[version]/[language]/Scripts/Scripts Panel
Windows XP Documents and Settings\[username]\Application
Data\Adobe\InDesign\[version]\[language]\Scripts\Scripts Panel
Windows Vista and Windows 7
Users\[username]\AppData\Roaming\Adobe\InDesign\[version]\[language]\Scripts\Scripts Panel
A quick way to locate the Scripts Panel folder is to right-click (Windows) or Control-click (Mac OS) a script in the Scripts
panel, and choose Reveal In Explorer (Windows) or Reveal In Finder (Mac OS).
You can then double-click a script in the Scripts panel to run it, or you can run scripts using Quick Apply.
The Script Label panel lets you specify a label for a page item, such as a text frame or shape. Specifying labels for page
items is especially useful for writing scripts in which you need to identify an object.
For detailed information on adding, running, and editing scripts, see the Scripting Guide on the Adobe website at
http://www.adobe.com/devnet/indesign/documentation.html.
Open the Scripts panel
? Choose Window > Utilities > Scripts.
Open the Script Label panel
? Choose Window > Utilities > Script Label.
Run sample scripts
You can run these scripts in InDesign:
AddGuides Adds guides around the selected object or objects.
AddPoints Adds points to the paths of the selected object or objects.
Last updated 10/15/2018
653
Automation
AdjustLayout Moves objects by specified distances on right/left pages.
AlignToPage Aligns objects to specified positions on a page.
AnimationEncyclopedia Automatically creates buttons with different animation properties.
BreakFrame Removes a selected text frame and its contents from a story.
CornerEffects Re-draws the path of the selected item or items using a variety of corner effects. Corner effects can be
applied to selected points on the path.
CreateCharacterStyles Defines a complete character style based on the selected text.
CropMarks Adds crop and/or registration marks around the selected object or objects.
ExportAllStories Exports all stories in a document to a series of text files.
FindChangeByList Performs a series of common text find/change operations by reading a tab-delimited text file.
ImageCatalog Places all graphics in a specified folder in a “contact sheet” layout.
MakeGrid Creates a grid by subdividing or duplicating the selected object or objects.
Neon Applies a “blend” effect to the selected object or objects.
PathEffects Changes the position of path points on the selected object or objects to add a creative effect.
PlaceMultipagePDF Places all pages of a PDF.
SelectObjects Selects objects on the active spread by their object type.
SortParagraphs Sorts the paragraphs in the selection alphabetically.
SplitStory Splits the text frames in the selected story into separate, unlinked text frames.
TabUtilities Applies tab stops and indents to the selected text.
For more information on installing and using these sample scripts, see
www.adobe.com/go/learn_id_scripting_readme_cs5_en (PDF).
Last updated 10/15/2018
654
Chapter 16: Accessibility
Last updated 10/15/2018