Info: This feature requires Content Station 11.11 or higher.
When creating a story in Adobe InDesign, it can be exported from InDesign and added to Content Station Aurora as a Digital article.
This method requires scripts to be installed and configured in InDesign. This article describes how this is done.
Installation
Step 1. The scripts are provided in a separate file as part of each release of Content Station. Download the file named 'Print To Digital' for the version of Content Station that is used from the Software releases page.
Step 2. Unzip the downloaded file.
Step 3. Copy the folders named PrintToDigital and Startup Scripts into the Scripts folder of InDesign or into the Scripts folder of the user.
Step 3a. Open InDesign.
Step 3b. Access the Scripts folder: Window > Utillities > Scripts.
Step 3c. Right-click the Application folder or User folder and click Reveal in Finder or Reveal in Explorer.
Figure: The Scripts folder of the user with the inception and Startup Scripts folder copied to it.
Note: When a Startup Scripts folder already exists, copy the content of the Startup Scripts folder into the existing folder.
Step 4. If InDesign was opened, close and reopen it so that the added scripts are loaded.
A new menu named 'Print To Digital' is added to the main menu bar.
Figure: The installed scripts add a new Inception menu to the menu bar of InDesign.
Configuration
The following features can be configured:
- The location of the folder where the files are exported to.
- Which paragraphs should be included when automatically generating an InDesign Article.
- Into which components of the Digital article each paragraph should be imported.
- Which text formatting should be treated as bold, italic, subscript, or superscript.
- Which characters in the output should be replaced.
- If grouped frames should be added to a Container component
Changing the location of the log folder
By default, the log files are exported to the following location:
~/Desktop/ptd-indesign-export
To change this location, do the following:
Step 1. Access the ptd-config.jsx file.
<location where the scripts were installed (see above)>/PrintToDigital/ptd-config.jsx
Example: Here the file is stored in the Application Scripts folder on Mac OS: ~/Library/Preferences/Adobe InDesign/Version 10.0.0/en_GB/Scripts/PrintToDigital/ptd-config.jsx |
Step 2. Change the exportDirectory option.
// The directory used as base directory for the export. The script will create directories with the document name
// inside the base folder to separate the export of different documents. Consecutive exports of the same document
// will overwrite existing files. Orphaned files will not be removed.
exportDirectory: '~/Desktop/ptd-indesign-export',
Controlling which paragraphs to export and linking them to components in the Digital article
An InDesign Article can be generated automatically by choosing Print To Digital > Create InDesign Article. During this process, paragraphs are automatically added to an InDesign Article as items.
During export, it needs to be defined into which Digital article component each paragraph needs to be loaded.
Both actions are controlled by associating a paragraph style with a component. This is done in the configuration file.
Example: A paragraph has the style 'Title-black" applied. In the configuration file, the component 'Title' is associated with the paragraph style 'Title-black'.
|
Step 1. Access the ptd-config.jsx file.
<location where the scripts were installed (see above)>/PrintToDigital/ptd-config.jsx
Example: Here the file is stored in the Application Scripts folder on Mac OS: ~/Library/Preferences/Adobe InDesign/Version 10.0.0/en_GB/Scripts/PrintToDigital/ptd-config.jsx |
Step 2. In the textFilterList option, add a paragraph style to its corresponding component.
Example: For the Title component, add the paragraph style(s) that is used for styling the title in InDesign; for the Subtitle component, add the paragraph style(s) that is used for styling the subtitle in InDesign, and so on.
Note: For examples, see the ptd-config-sample.jsx file.
// Object with all component types. Each type has an array of style names that will be used
// to define the type. Style names can be either strings or regular expressions (in string form)
textFilterList: {
title: [
],
subtitle: [
],
caption:[
],
author: [
],
intro: [
],
quote: [
],
body: [
],
footer: [
]
},
Example:
|
Note about what to do when no paragraph styles are used in the layout Although not recommended, it is not uncommon that layouts have no custom paragraph styles defined and that text is solely formatted through the use of character styles or local styling. To still export the content from the layout, associate the default paragraph styles "[No Paragraph Style]" and "[Basic Paragraph]" with a component. Most practical will be to associate them to the Body component. Example: Here, all text that has the default paragraph styles assigned is exported as a Body component:
|
Defining which text formatting should be treated as bold, italic, subscript, or superscript
Text that is formatted as bold, italic, subscript, or superscript (or should be treated as such) can be defined in the configuration file.
Step 1. Access the ptd-config.jsx file.
<location where the scripts were installed (see above)>/PrintToDigital/ptd-config.jsx
Example: Here the file is stored in the Application Scripts folder on Mac OS: ~/Library/Preferences/Adobe InDesign/Version 10.0.0/en_GB/Scripts/PrintToDigital/ptd-config.jsx |
Step 2. In the styles section, use any of the available methods to define which text should be treated as bold, italic, subscript, or superscript:
Info: The subscript and superscript options are supported in Content Station 11.23 and higher.
- For bold and italic:
- By using a character style (preferred method)
- By using a font style
- By using a paragraph style
- For subscript and superscript:
- By using a character style
Note: Use the following syntax: "name of character style, font style or paragraph style": {formatting style: true or false} For examples, see the ptd-config-sample.jsx file. |
styles: {
// Mark character styles as bold, italic, subscript or superscript. Matching is on full character style name. Most commonly used.
character: {
},
// Mark use of certain font styles as bold or italic in the output. Be aware that this will match for all
// font families used with the specified font style
font: {
},
// Mark entire paragraphs as bold or italic. Not commonly used.
paragraph: {
}
},
Example:
|
Replacing characters in the output
Because of the differences between print and Web, some changes may need to be made to the output so that the content displays correctly in HTML.
Example: Hard line breaks may need to be removed.
Step 1. Access the ptd-config.jsx file.
<location where the scripts were installed (see above)>/PrintToDigital/ptd-config.jsx
Example: Here the file is stored in the Application Scripts folder on Mac OS: ~/Library/Preferences/Adobe InDesign/Version 10.0.0/en_GB/Scripts/PrintToDigital/ptd-config.jsx |
Step 2. In the htmlEncode option of the output section, define the changes that need to be made.
// The 'output' section [...] offers the opportunity to remove and/or replace
// characters in the output. Html special characters will automatically be
// escaped in the output.
output: {
...
htmlEncode: [
]
},
Note: For examples, see the ptd-config-sample.jsx file.
Adding grouped frames to a Container component
Info: This features requires Content Station 11.23 or higher.
The Container component can be used to create a story within a story (such as a sidebar). It can contain any other type of component.
During the export of the InDesign Article, frames that are grouped on the layout can be automatically turned into a Container.
This is done by setting the createContainerForGroup option in the ptd-config.jsx file to true.
<location where the scripts were installed (see above)>/PrintToDigital/ptd-config.jsx
Example: Here the file is stored in the Application Scripts folder on Mac OS: ~/Library/Preferences/Adobe InDesign/Version 10.0.0/en_GB/Scripts/PrintToDigital/ptd-config.jsx |
createContainerForGroup: true
Preparing templates
In order for the exported content to be properly imported, make a Story template available for the user that matches the components that are present in the export as much as possible.
For more information, see Setting up article templates.
Testing the configuration
Test the configuration by exporting a layout.
Document history
- 17 October 2018: Updated section 'Configuration' with references to subscript and superscript.
Comments
Do you have corrections or additional information about this article? Leave a comment!
Do you have a question about what is described in this article? Please contact support here.
0 comments
Please sign in to leave a comment.