Information Classification: External Restricted.
See https://www.chili-publish.com/security
Steps followed in the InDesign conversion process
Overview
Every source application is different, and provides different functionalities/tools. So your own options might not be exactly identical. As a general reference, the content below describes the general steps taken during the conversion of an InDesign document to a CHILI document.
CHILI's InDesign Extension is a Flash plug-in, which uses InDesign's Object Model to walk through the document content. It also uses some of InDesign's other functionalities (eg PDF Export) during some of the steps.
Logging in
Depending on the choice of the user (or the configuration of a branded InDesign Extension), the Extension will either log in to the CHILI Server (using ?Webservice Functions - GenerateApiKey) or work completely local. In the latter case, a zip file containing a CHILI Package will be generated. The returned API key is stored, and used for all subsequent webservice calls.
Conversion Settings
Before starting the conversion, the user is presented with a conversion settings screen, which allows for some configuration of the conversion process (determining locked layers, page ranges, etc...). This information obviously will be used throughout the rest of the steps accordingly.
Starting the conversion
To make things easier on ourselves, the Extension first checks whether the document has been saved. If so, it opens a (hidden) new instance of the document. This way, the Extension can safely execute chanes within the document during the conversion (eg: removing some content, moving things around to get more accurate bounding box information, etc.).
At the time of writing, CHILI does not contain support for master pages. To export this content from within InDesign, the Extension first overrides all master page items on all pages. Afterwards, it also finds any special text references (eg: page number placeholders), and replaces them with actual values (this could be done during the actual text conversion as well, of course, but by doing it here we manage to simplify some of the other processes).
Then, the Extension will walk through the general resources needed before the actual page layout can be imported (Fonts, Char./Par. Styles, Colors, etc...)
Fonts
Next up, the Extension will start conversion of the used Fonts in the InDesign document.
If connected to a live CHILI Server, the Extension will first ask CHILI for a list of the fonts already available on the server, within the directory specified in the Conversion Settings (see higher)
First, the Extension will identify all of the relevant fonts (checking the used fonts, texts, character and paragraph styles, etc.)
It will loop through each used font, and perform a series of steps:
- Check validity of the font:
- It will check
- Is it in fact installed
- Is it a supported font type for CHILI (OpenType/TrueType)
- Can the actual font file be found on disk
- If anything goes wrong here, a preflight "error" will be shown to the user, asking him to correct the situation
- It will check
- If connected to the CHILI Server, the Extension will check whether or not the font already exists on the server. If not, it gets uploaded
- If creating a CHILI Package, a unique ID will be generated for the font
- If connected to the CHILI Server, the Extension will use CHILI's metadata of the font (id/family/style) throughout the rest of the conversion process. Otherwise, the ID will be used as a reference
- The basic XML definitions for the fonts get added to the new document XML: ?Fonts XML, either containing the full information, or information required by a CHILI Package
Variables
If the InDesign Document contains "Data Merge" settings, the InDesign Extension will:
- Find the used "fields" in the data merge file
- Create variable definitions (all of type "string") inside the document XML: ?Variables XML
Later on (during the conversion of text frames), it will find usages of those fields inside the text frame. If a field is used in a text frame, it will set that frame's "isVariable" attribute to "true" in the XML, and it will replace InDesign's placeholder ("<<FIELD_NAME>>") with CHILI's placeholder ("%VARIABLE_NAME%").
Layers
Next up, the basic information/definitions of the available layers are stored. It will compare the layers to the Conversion Settings. If the layer is marked to be "locked", the extension will add frame constraints to the layer: ?Layers XML and ?Constraints XML. The conversion of the locked content itself (1 imageframe rather than individual frames for the layer content) is handled later.
Colors
The Extension will also build a list of colors to be used throughout the rest of the conversion process:Â ?Colors XMLSteps followed in the InDesign conversion process
First of all, the "Standard" colors are matched between InDesign and CHILI. A CHILI document will always contain ?None, White and Black. Those colors also exist within InDesign, and are mapped for further use.
The Extension then loops through the rest of the colors, and converts them:
- CMYK/RGB/LAB are pretty simple
- Tints are not "directly" supported in CHILI, however; the Extension will calculate the appropriate "tinted" color values, and convert them that way, if the tint is configured on the color itself. If the tint is configured on content (see lower), it will result in separate CHILI colors
- SPOT colors will check for te space, and include the appropriate CMYK or RGB color values
- For gradients, the Extension will:
- First convert the start and end color (using the same process as being walked through right here)
- Use that as a reference
- Convert locations and midpoints accordingly (although they might result in separate CHILI colors when the points have been modified for individual frames inside InDesign)
For every color, the InDesign Extension will ofcourse also perform some preflight checks on unsupported features, such as:
- Unsupported color spaces/types
- Gradients with more than 2 colors
Character and Paragrah Styles
Next, the Extension will loop through the Character and Paragraph Styles used: ?Paragraph and Character Styles XML
It will:
- Calculate the "actual" values of the style (using the "based on" styles, which aren't currently supported in CHILI)
- Convert the format: ?TextFlow and ITextLayoutFormat XML
- Check on commonly used features which aren't supported by CHILI
Pages
Once all of the main resources have been converted, the Extension has enough information to start converting actual page layout.
For each page, the Extension will import the SectionOptions and other general settings (eg margins): ?Steps followed in the InDesign conversion process?Page XML
Frames
Then, the Extension will loop through the frames on the page. Or more specifically, it will loop through the layers inside the document, and request all of the frames per layer.
If a layer has been marked to contain locked content, the Extension will:
- Generate a new InDesign document on the fly
- Figure out the "bounding box" of all content on the layer, and use that as the dimensions of the new layer
- Duplicate/move all content of the locked layer to the new document
- Export the new document to PDF
- Use that PDF as the source of a single CHILI ImageFrame (see lower), and place that in the CHILI page, as part of the current layer
If the layer doesn't contain "locked" content, the Extension will loop through the frames, and convert them individually as CHILI Objects.
An individual Frame
For each frame, the Extension will first figure out the content type. ?Steps followed in the InDesign conversion process?General Frame XML
If the frame contains a gradient (which can be applied in a lot of ways in InDesign), and if the "convert gradients to PDF" setting has been checked by the user, the Extension will again convert the frame to PDF (similar to locked layers), and use that PDF as the source of a new ImageFrame (regardless of the content type of the frame).
The Extension then calculates the exact position of the frame, matching InDesign's coordinate system (applied scaling, transformations, rotation, etc...) to CHILI's x/y/width/height/rotation/skewX attributes.
Border and fill properties are converted, by referencing the color list which was constructed earlier. If any of the used colors have a tint applied purely for the frame, this will result in a duplicate of the CHILI Color, with an appendix to the name (eg: "MAIN_COLOR - 70%"), and with the updated (tinted) color value.
The Extension will figure out whether or not the InDesign page item contains a complex shape (rather than being a rectangle), and convert the frame accordingly (?ShapeFrame XML and Paths XML)
Various preflight checks are performed, to warn the operator about potential conversion issues:
- Effects, such as bevel and emboss
- Non-matching corner options (CHILI supports rounded corners, but only on the entire frame, not on individual corners, excpet for compex shapes)
- Non-matching stroke options
- etc...
Image Frames
If an image frame is encountered, (or if it is "implied", by locked content or converted gradients) the InDesign Extension will generate ?ImageFrame XML
- Find the placed link on disk, and keep track of it (see lower: Uploading Assets)
- Extract relevant information from the image (type, dimensions, resolutions, PDF boxes, etc.)
- Calculate the image's positioning inside the frame (always with a fitMode of "manual")
- Perform preflighting on missing links, files without extension, etc...
Text Frames
For text frames, the Extension will generate ?TextFrame XML. It loops through the InDesign story (potentially spanning multiple text frames), and constructs a textFlow XML: ?TextFlow and ITextLayoutFormat XMLSteps followed in the InDesign conversion process. During the conversion, it will again reference the needed other resources (fonts, colors, character and paragraph styles, ...).
Uploading Assets
During the conversion process of frames, all placed images have been gathered. At the end, they are either uploaded to the server (also checking whether or not the asset already existed), or placed inside the structure of the CHILI Package.
General Document Settings
Finally, more general document settings are gathered (dimensions, bleed, slug, baseline grid options, etc...)
Preflight Report
Before finally uploading or saving the new document XML, a list of potential preflight warnings is presented to the operator.
Upload / Save
And finally, the document XML is either uploaded to the CHILI server, or saved to the structure of the CHILI Package and zipped.
All information on this page must be treated as External Restricted, or more strict. https://www.chili-publish.com/security