When creating a story in Adobe InDesign, it can be exported from InDesign and added to Studio as a Digital article. This way, a story that was originally aimed for output to print can be used for a digital output.
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 Studio. Download the file named 'Print To Digital' for the version of Studio 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 by doing the following:
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 Studio 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 Print to Digital 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:
The script can be used from either the user or the application scripts folder. To locate the folder, access the Scripts panel in InDesign by choosing Window > Utilities > Scripts, right-click the Application or User folder and choose Reveal in Finder or Reveal in Explorer.
The preferred location is /Applications/Adobe InDesign <Version>/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
The export is based on an InDesign Article that contains all content that needs to be exported. This 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 macOS: ~/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 1:
|
Example 2 (As found in the ptd-config-sample.jsx file in the installation package, more examples are available there). Here, different variants are styled:
|
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 text formatting
Text that is formatted in one of the following styles (or should be treated as such) can be defined in the configuration file:
- Bold
- Italic
- Subscript
- Superscript
- Uppercase
- Lowercase
- Capitalized
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 macOS: ~/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 a specific style:
Style | Method |
---|---|
Bold Italic |
Character style (preferred method) Paragraph style Font style |
Subscript Superscript |
Character style |
Uppercase Lowercase Capitalized |
Character style (preferred method) Paragraph 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:
|
Adding grouped frames to a Container component
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 MacOS: ~/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.
Comment
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.
1 comment
Hi,
To download the 'Print To Digital' script, navigate to the Software releases page and open the article for the version of Studio such as version 11.139.
The file can be downloaded at the bottom of the article under Downloads.
Best regards,
Maarten van Kleinwee
Senior Technical Writer, WoodWing Software.
Please sign in to leave a comment.