Skip to main content
Skip table of contents

Export InDesign layouts to standard articles (censhare Client)

InDesign allows you to select text and image boxes and combine them into a single article. Since version 4.8 censhare uses this functionality to generate an export for the article editor from the IDML of the InDesign layout. The resulting XML can be processed for various output channels (online, EPUB, App and print).


Displaying the converted XML file in the censhare Article Editor. The editor uses the iPad template for the preview. If errors occur, then you will have to manually post-edit it.

Preparing InDesign documents

Before you can export the articles out of the InDesign document, you first have to prepare the document accordingly. This is done in two steps. First, you specify which content from the InDesign document is going to be moved to which censhare articles. Then you have to determine a mapping setup for allocating elements of the DTD of the XML editor for paragraph and character styles in the InDesign document.

Defining articles

In the InDesign document, create the articles and assign them to the desired page elements of the InDesign document. During the export, censhare creates an article asset for every article in the InDesign document and links it with the layout asset for InDesign document. The content of the article asset in question contains page elements that are assigned to the corresponding article in the InDesign document. It is also possible to assign one page element to multiple articles. These will then appear in the respective article assets.

Assigning text and image element articles in Adobe InDesign

In Adobe InDesign you create articles in the article window of the program. Here you assign the desired page elements to the respective articles using drag and drop. To do this, drag the desired text and image elements into the corresponding article in the article window.

The sequence of texts in the article in the Adobe InDesign article window also determines the sequence of texts in an article in censhare. Drag and drop the text page elements to the desired location in the article in the article window. For more information on working with the article window see the help pages in Adobe InDesign.

Defining mapping

After defining the article in InDesign, select a paragraph style for each paragraph of a text element that you have assigned to an InDesign article. The name of the paragraph style must correspond to the desired XML element of the DTD in the Article Editor. This allows censhare to assign the appropriate XML tags during the export. Based on the name, a mapping process takes place between the paragraph style and the XML element. For example, the XML tags <paragraph>...</paragraph> are assigned to the "paragraph" style elements. The text of a paragraph will then appear between those tags.

Comparing and renaming existing paragraph and character formats in Adobe InDesign as well as creating new ones

If there is no XML element with the name of a paragraph style, this will cause an error in the XML content of the associated article asset. This will then need to be manually corrected.

In order for the text formats to be applied, you first have to define the appropriate character styles. Like with paragraph styles, the names of the character styles need to correspond to the appropriate XML tags. For example, censhare will place texts with the "bold" character style between the XML tags <bold>...</bold>. This allows censhare to carry out the appropriate mapping. Mark the corresponding text sections with the desired character styles after you have assigned the paragraph styles.

censhare supports tables and lists for exports. For the latter, you need to define the corresponding paragraph styles, for example, a "bullet list" for lists without numbers.

A note regarding images

Images anchored in text boxes are also placed between tags in the XML content. Images that are in separate image boxes are stored in the "Print" tab of the XML editor and do not appear as part of the continuous text.

Exporting articles

To export articles, select the prepared InDesign asset and open the respective server action. The article appears as an assignment below the layout in the asset query. If styles are missing, the paragraph in question will still be shown in the article editor but will need to be assigned a tag before continuing work.

For exports, censhare first creates an IDML file from the layout. An XSLT script will access that file in order to extract the desired information. To do so, a Render Client needs to be running. This is also required if the layout asset already contains an IDML file. Without an active Render Client, you will be shown an error message.

Setting up the article export function

In order to set up the article export function, you first need to import the necessary transformation asset. Then you need to create a server action that calls up the corresponding XSLT style sheet.

Setting up the transformation in the admin client in the folder "Configuration/Modules/Transformations" in the entry "Execute XSLT"

The transformation assets are in the folder "Install/assets/optional/layout-to-article-transformation" of the censhare server. Import the file "XSLT-indesign-to-article-transformation.censhare-assets" in the Java Client.

Create the server action In the folder "Configuration/Modules/Transformations" in the Admin Client. Open the entry by double-clicking "Execute XSLT". In the section "General setup" click the option "Enabled" to activate the command. In the "Title" field enter a suitable name, for example, "Export standard article from the layout". In the "Special setup" section select the "InDesign2StandardArticle" option for the field "XSLT stylesheet". Save the settings with OK and update the server configuration.

In order for censhare to create an IDML file for the layout, it has to be configured in the Admin Client in the "Client Preferences" in the folder "Configuration/Modules/Clients/Client/". Double click the settings to open them. Look for the entry "create-idml" and check whether the entry "<allow domain=""/>" is available. The section should look like this now:

CODE
<create-idml>
   <allow domain=""/>
</create-idml>

Rendering the IDML before exporting the article

Before exporting the article, censhare needs to use the renderer to create an IDML file for the layout. An excerpt from the log file on the server shows the process:

CODE
 07.04-11:35:46.662 [IDC 2015#02][master.20160407.113546.654][censhare] Request  #83 receive

07.04-11:35:46.668 [IDC 2015#02][master.20160407.113546.654][censhare] Loading document Layout Article Structure (ID: 60056) (Version: 2) from serve

07.04-11:35:46.678 [IDC 2015#02][master.20160407.113546.654][censhare] Open document Layout Article Structure (ID: 60056) (Version: 2

07.04-11:35:46.777 [IDC 2015#02][master.20160407.113546.654][censhare] Create IDML of Layout Article Structure (ID: 60056) (Version: 2

07.04-11:35:46.893 [IDC 2015#02][master.20160407.113546.654][censhare] Close document Layout Article Structure (ID: 60056) (Version: 2

07.04-11:35:46.909 [IDC 2015#02][master.20160407.113546.654][censhare] Request #83 finished in 247 ms - state „COMPLETED
 
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.