Upload
vhizzie
View
236
Download
0
Embed Size (px)
Citation preview
8/9/2019 Working With Inx File Format
1/30
ADOBE SYSTEMS INCORPORATED
Corporate Headquarters
345 Park Avenue
San Jose, CA 95110-2704
Working with INX file format
Solutions Document #10091
Version InDesign CS2 / InCopy CS2
08 Nov 2005
8/9/2019 Working With Inx File Format
2/30
Working with INX file format
Copyright 2005 Adobe Systems Incorporated. All rights reserved.
The information in this document is furnished for informational use only, is subject to change without notice, and should not be construed as acommitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies thatmay appear in this document. The software described in this document is furnished under license and may only be used or copied in accordancewith the terms of such license.
Adobe, Adobe logo, Adobe Acrobat, Adobe InCopy, Adobe InDesign, Adobe Type Manager, and PostScript are either registered trademarks ortrademarks of Adobe Systems Incorporated in the United States and/or other countries. Macintosh and Mac OS are either registered trademarks ortrademarks of Apple Computer, Inc. in the United States and/or other countries. Microsoft, Windows, and Windows XP are either registeredtrademarks or trademarks of Microsoft Corporation in the United States and/or other countries. All other products or name brands are trademarksof their respective owners.
Revision Date Author Comments
1.0 6/03/04 Shengliu Dai initial documentation
1.1 3/15/05 Rodney Cook CS2 revisions
1.2 11/8/05 Todd Kopriva Editing
8/9/2019 Working With Inx File Format
3/30
iii
Getting started with INX file format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Introduction to the INX file format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Overview of the INX file format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Understanding the INX file format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Hierarchy of objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Order of objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Custom export and import of INX files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Interpreting INX file content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
INX file header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Element and attribute names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Processing object references. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Decoding an element . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Simple text content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Special characters in text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Text attributes in stories and table cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Marker processing instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Table attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Alternative double and unit representations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Alternative date and time representation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
List type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Encoded block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
ScriptID values used only in the INX file format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Enumerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Appendix A: Attribute values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
EBNF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Non-terminals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Terminals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Notes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Appendix B: Objects with ordered children . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Spread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Contents
8/9/2019 Working With Inx File Format
4/30
Contents
iv 08 Nov 2005 Working with INX file format
Story . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
8/9/2019 Working With Inx File Format
5/30
Working with the INX file format 5
Working with the INX file format
Getting started with INX file format
Working with the INX file format
Getting started with INX file format
This document provides information about the InDesign Interchange (INX) file format andhow to read and understand INX files. This document covers the structure of the INX file, thealgorithm to decode any object within the file, and processing instructions for some specialcontent of the file. The appendixes provide a list of scripting IDs that are used in Save Back-wards but are not documented in the Scripting Reference, the formal semantics of attribute val-ues, and a list of objects that require special ordering of their children.
Before you begin, you must have the following:
A basic understanding of XML
A basic understanding of Adobe InDesign, InDesign scripting, and the InDesign scriptingdocument object model (DOM)
Access to the Adobe InDesign Scripting Reference
A copy of the ScriptID value-name lookup table (At least, you should have a copy of Script-ingDefs.h.)
Introduction to the INX file format
Overview of the INX file format
INX is an XML-based format used to serialize and deserialize the InDesign scripting DOM.
This format is most useful with the Save Backwards feature of InDesign, which allows you touse an earlier version of InDesign to open a document that was created in a later version ofInDesign. InCopy and GoLive also use the INX format. Each of these usages has a different setof valid elements and attributes; this document addresses only the elements used in the SaveBackwards feature. However, concepts introduced here also apply to other situations.
In the InDesign scripting DOM, every InDesign document is described by a tree structure ofscripting objects, rooted at a Document object. For example, a document has several childrenthat are Color objects, several children that are Spread objects, and so on. Besides having chil-dren, each object can have a set of properties. A Color has properties that describe its name,color model, and color values, among other things.
When an InDesign document is exported to an INX file, every object, its properties, and theirvalues are translated into XML. When an INX file is imported, this information is used to cre-ate a new InDesign document.
8/9/2019 Working With Inx File Format
6/30
Working with the INX file format
Introduction to the INX file format
6
Exporting an InDesign CS2 document as INX data and then importing the INX data into thesame version of InDesign CS2 exactly recreates the original document. Importing the INX datainto an earlier version (e.g., InDesign CS) requires the Save Backwards feature. Exporting andimporting fragments of documents enables the asset libraries, actions, and InCopy stories fea-
tures, and possibly other features.When a document is saved in INX format as part of a Save Backwards operation, an entirelynew InDesign document is created from the INX data. Because of differences between versionsof InDesign, the resulting document may not look exactly like the original. For example, differ-ences in the composition algorithm may cause slight differences. The new INX file may containobjects or object properties that did not exist in the earlier version of InDesign; these objectsand properties are ignored during import into the earlier version of InDesign.
Understanding the INX file format
Because an INX file is the serialized state of a DOM tree and a files content depends on what is
in the tree, there is no formal definition or static description for INX files. This is a necessaryfeature of the INX technology; because INX is based on the scripting DOM, and the DOM isextensible by third-party plug-in developers, it follows that any plug-in developers can havetheir data represented in INX simply by including appropriate scripting support for their fea-tures. Of course, this does make creating and parsing INX files more difficult.
Each INX file begins with a standard XML declaration. The next line is an INX-specific pro-cessing instruction (PI), which might be followed by additional processing instructions. Nextcomes the outermost (root) XML element document (docu), which represents the Documentobject in the scripting DOM. (For uses other than Save Backwards, such as assignment, theoutermost element may be something other than Document.) Everything else is either a childof the root element, or a child of a child.
Each scripting DOM object is represented by an XML element. Each object property becomesan XML attribute.
Element and attribute names are identified by ScriptID values.
Property values are constrained by the rules of what can or cannot appear in an XML attributevalue string. Moreover, property values can be complex types, including heterogeneous listsand lists of lists. See Appendix A: Attribute values on page 26.
Hierarchy of objects
An INX file is usually large and consists of obscure-looking codes, so it appears to be compli-
cated. However, the INX file structure is simple. To get an impression of what an INX file lookslike do the following:
1. In InDesign, open a very simple InDesign document. (An empty document will suffice forthis exercise.)
2. Export the document to INX format by choosing File > Export and selecting InDesignInterchange.
8/9/2019 Working With Inx File Format
7/30
Working with the INX file format 7
Working with the INX file format
Introduction to the INX file format
3. Open the file in a text editor, such as Notepad, Visual Studio, or an XML editor such asXMLSpy.
The hierarchical scripting document object model is exactly the same as the InDesign scriptingDOM. Compared to the legacy scripting view, there are only a few differences:
A few new objects store information for facilitating the processing of INX (such as theInsertionPoint object).
A few attributes are added and a few are removed to improve the performance of INX fileexport and import.
Scripting events are not relevant to INX.
Order of objects
Inside the document object, its first-level (direct) child objects are listed one by one, indentedby one tab character. The documents preference objects are listed first; followed by more visi-ble content, such as layers, master spreads, spreads, sections, XMLStory, stories, and so on; thefinal part contains other objects.
In general, children appear in the same order as in the scripting DOM. You can regard this asrandom order; in other words, do not assume that objects will occur in any particular order.However, there are several special cases in which the children do occur in a certain order. In thecase of the document object itself, its children are sorted. For a list of objects whose childrenare placed in a certain order and their respective algorithms, refer to Appendix B: Objects withordered children on page 29.
NOTE : The order of the children might change at any time. Do not reorder the objects; doingso could cause problems because certain objects require that others be created first.
Custom export and import of INX files
Usually, third-party plug-in developers dont need to implement custom export and import ofINX files. Even if you have custom persistent data in your plug-in, as long as you providescripting support for your data, the InDesign or InCopy application will export or import thesedata for you. But if you do have to write custom code to export or import these files, be awarethat for InDesign CS2 and InCopy CS2 you need to send NewDocResponder signals andOpenDocResponder signals; this may change in a future version of InDesign and InCopy. Theresponses to NewDocRepsonder and OpenDocResponder signals sometimes share similarcode (typically attach document observers). To minimize the impact of possible future change,
it is recommended that you check in your OpenDocResponder to see whether a correspondingNewDocResponder has already been executed.
8/9/2019 Working With Inx File Format
8/30
Working with the INX file format
Interpreting INX file content
8
Interpreting INX file content
INX file headerThe first line of an INX file is a standard XML declaration that looks like this:
The next line is an INX-specific processing instruction. It contains information required byInDesign to properly configure the import process. Here is an example:
TABLE1 INX head settings
Element and attribute names
InDesign writes four-character ScriptID values to INX files. The following table shows exam-ples of the ScriptID names and ScriptID values for a few common elements.
TABLE2 ScriptID names and ScriptID values
Element Description
aid Reserved token that InDesign uses for its INX-processing instructions.
style Identifies style, which is set forth for various INXOptions, 33 = 0x21, whichrepresents InDesign CS2, use Readable numbers.
type Identifies the intended use of this INX file. INX files that serialize the state of anInDesign document are of type document.
DOMVersion Identifies the version of the scripting DOM that was used to export the file.Currently, there are two possible values: 1 for InDesign CS and 4.0 for InDesignCS2.
featureSet Identifies the scripting DOM feature set that was used during export. This value is
either 256 for the Roman feature set or 257 for Japanese.
ScriptID names ScriptID values
Document docu
Color colr
Spread sprd
Story cflo
TextStyleRange txsr
Item Geometry IGeo
8/9/2019 Working With Inx File Format
9/30
Working with the INX file format 9
Working with the INX file format
Interpreting INX file content
Because the names are derived directly from the scripting DOM, you can refer to the InDesignScripting Reference to learn about the meaning of each object, property, and property value.
NOTE : Some attribute and element names, such as Item Geometry, are used only in INX andare not documented in the Scripting Reference. See ScriptID values used only in theINX file format on page 14 for details.
Processing object references
In the scripting DOM, some objects are children of other objects, and some objects point toother objects. For example, a paragraph style contains a property that points to its parent style.INX represents these pointers by assigning a unique Self attribute to each element. The specific
value is not important. What is important is that each value is a string that is unique within theINX file.
A property that points to another object (an object reference) has a value of type Object. There
may, of course, be many references to the same object.NOTE : INX files can contain forward references.
Pointers from one file to another are not possible. In this sense, INX behaves like href/id ratherthan like xpointer.
Here is a simplified example of a Tint that is based on a Color. In this example, the colors Selfvalue is the string ue. It is referenced by the tints clbs (Base Color) attribute:
Some facts about object references:
The value of the objects Self attribute and the reference value in other objects properties areguaranteed by using the same routine when exporting to an INX file.
There can be zero or more references that point to the same object.
The identifier must be unique throughout the document. The actual value is not important;it can be any value as long as it maintains uniqueness. (Tip: If you change the identifier,remember to change all references to it.)
Decoding an elementAn element is represented as its attributes and children. Here is an example of a gradient ele-ment with two child elements:
8/9/2019 Working With Inx File Format
10/30
Working with the INX file format
Interpreting INX file content
10
Each element, whether parent or child, expresses the following:
The objects name, represented by its ScriptID value, which is the four-character XML tag(for example, ). To find the full ScriptID name and description of the object, lookit up in the value-name lookup table. For example, grad represents gradient.
A list of attributes of the form scriptIdValue=type_value; for example, grdt=e_axlg orloca=D_0. See Table 3.
TABLE3 Interpreting an ID value pair
Attributes values can contain subvalues; for example, a list containing items. For this, recur-sively analyze each item as shown in Table 3. For each child element, recursively interpret theelement and its attributes. By such recursive analysis, you can translate each plain, static XMLelement and attribute to dynamic, structured scripting DOM objects and properties.
Simple text contentText is contained in a Contents element (ScriptID value pcnt) that is a child of a Text StyleRange element (ScriptID value txsr). Each Text Style Range has exactly one Contents child.Textual content is broken into ranges that share a common set of text attributes. The Text StyleRange defines the attributes to apply to the text. So, a simple range of text might look like this:
c_Hello world.
The contents of the Contents element is in serialized form. The leading c_ indicates that thecontents are expressed as a string.
Special characters in text
Text may contain any characters, including special characters that InDesign and InCopy sup-port. However, some characters are not allowed in a well-formed XML document. These char-acters are encoded in an ACE processing instruction so that the data can correctly make theround trip from an InDesign native document to INX format and back again. In the examplebelow, represents the Auto Page Number special character.
c_Hello world.
scriptIdValue Represents the property name of the attribute. Look it up in the value-name lookuptable. For example, grdt is the gradient type.
type The type of the value. Look it up in Terminals on page 27. For example, rcrepresents two aspects of the type, a Read_only (r) attribute of type Type_string;whereas e indicates a type of Type_enum.
value The value of the attribute. The value is represented by the characters after theunderscore (_) character. For example, D_100 represents a Double valued 100.00; b_trepresents a Boolean with the value of true; o_u7c represents an object reference withidentifier u7c. If the type is Type_enum, then look up its ScriptID value in the value-name lookup table; for example, e_axlg represents an enumeration of type Linear.
8/9/2019 Working With Inx File Format
11/30
Working with the INX file format 11
Working with the INX file format
Interpreting INX file content
The characters disallowed from a well-formed XML document are as follows (values in hexa-decimal):
0x0000-0x0008
0x000B 0x000C
0x000E-0x001F
0xD800-0xDFFF
You can compare ACE values to those found in TextChar.h. For example, representsFootnote Marker; represents Section Marker.
NOTE : This special treatment is common for INX and XML.
Text attributes in stories and table cells
One or more Text Style Range elements make up the textual contents of a Story (cflo) or a TableCell (ccel) element. There are many text attributes that can be applied to a Text Style Range.You will not see the values of each attribute written out for each Text Style Range. Rather, youwill see a reference to Paragraph Style (psty) and Character Style (csty) elements. The Text StyleRange object inherits its attribute values from its styles. If an attribute value is overridden, itappears as an attribute of the Text Style Range. Attributes not explicitly defined for the TextStyle Range are assumed to come from the underlying styles.
Character and paragraph styles are hierarchical. Each style is based on another style anddefines only the attributes that differ from its parent style. At the bottom of the hierarchy arethe base character and paragraph styles. These are identified by the lack of a based-on (basd)
attribute value.To properly apply text attributes, do the following:
1. Apply the paragraph style.
2. Apply the character style.
3. Apply any overrides.
Refer to the Scripting Reference to gain an understanding of all of the possible text attributesand their values.
Marker processing instructionSometimes you need to be able to refer to a location between two characters in a story. Con-sider this example:
c_Text with inline graphic.
The processing instruction (?aid) in the middle of the text is an insertion point marker.
8/9/2019 Working With Inx File Format
12/30
Working with the INX file format
Interpreting INX file content
12
Recall from the discussion of object references that a Self property serves as the target forobject-to-object references. Recall also that the value of the property is unimportant; it is sim-ply a string that is guaranteed to be unique within the INX file.
In the preceding example, the text implies that the marker is used to indicate where an inline
graphic should be placed. Elsewhere in the INX file is an element with an attribute that refer-ences the marker. In effect, the element is saying, Place me here.
Here is what a simple inline rectangle might look like. Some attributes have been removed forsimplicity:
The rectangles Story Offset (Stof ) attribute points to the desired location in the text.
There are also other uses for markers. Sometimes they are used in pairs to delimit a range oftext, such as a range of tagged text.
Table attributes
Table cells also have attributes. Do not confuse these with the attributes of the text that the cellscontain. An example of a cell attribute is its stroke style.
Processing cell attributes is similar to processing text attributes. Things are slightly easierbecause, as of now, there is only a single base table style. Every table is deemed to have the set ofattributes defined by this style. Every table cell, in turn, inherits this same set of attributes.
Note that, whereas a Text Style Range points to its Paragraph and Character styles, Table andCell elements do not. In the future, if generalized table styles are supported, this will change.
To determine the full set of attributes that apply to each table cell do the following:
1. Apply the base attributes values found in the table style (tsty) element.
2. Apply overrides found on the Cell element itself.
NOTE : If you set an attribute on one cell, it does notcarry over to another. Each cell starts overwith the attributes defined in the base table style.
Alternative double and unit representations
Real numbers are represented in one of two waysreadable or binarydepending on an
option set using INXOptions during export. Because readable and binary numbers have differ-ent type codes (D versus d and U versus u), it is theoretically possible to find both in a singleINX file. In practice, however, this does not occur.
To process the readable format, use a good text-to-real conversion algorithm, otherwise, loss ofprecision is possible.
The binary format is a direct representation of the bits in an IEEE-754 floating-point value.
8/9/2019 Working With Inx File Format
13/30
Working with the INX file format 13
Working with the INX file format
Interpreting INX file content
Alternative date and time representation
Like real numbers, time stamps can have two different representations, binary and readable:
The binary representation is a 64-bit unsigned integer that represents the number of 100-
nanosecond intervals since the beginning of January 1, 1601. This is known as FILETIMEon Windows. This value can be processed using the Deserialize64() function.
The readable representation is as an XML-standard date and time string. It looks like this:
yyyy-mm-ddThh:mm:ss
Note that the dash (-), the character T, and the semicolon (:) are separator characters.
List type
There are three type of lists: General_list, Record_list, and Object_list. Their terminals are x, y,and z, respectively. See Appendix A: Attribute values on page 26 for formal definitions.
Some list values are quite straightforward to decode, such as the following example:
clvl="x_4_D_0_D_0_D_0_D_0"
In the above example, the attribute value of clvl (color value) is a list type with four items. Theitems are of type Type_readable_double, and all have the value 0. That is, the C, M, Y, and Kcomponents are all 0.
Special attention is required for lists, because they are generated dynamically; before a list isexported to an INX file, you cannot predict how many items the list will have. In addition,General_list can consist of multiple Simple_value items; thus its items type could be mixed.For example, the first item could be a double, the second could be a string, the third an enu-meration, the fourth an object, and so on. The following example describes a page item (rect-
angle):
8/9/2019 Working With Inx File Format
14/30
Working with the INX file format
ScriptID values used only in the INX file format
14
IGeo (Item Geometry) of crec (rectangle) is a general list with 25 items (the length is stored inhexadecimal form after the type terminator, where 0x19 equals 25). It may be difficult tounderstand this list until you know the proper structure of the property. Fortunately, theScripting Guide describes each property and its possible values. Those few special properties
that are used only when exporting and importing INXsuch as IGeoare documented inScriptID values used only in the INX file format on page 14.
NOTE : The documentation attempts to list all possible properties and their variations; however,sometimes new, undocumented properties are added. When a special value is found, itshould be resolved on a case-by-case basis.
Encoded block
The INX file contains several blocks of ASCII encoding data. Data is encoded because it isbinary and must be encoded to put it into an XML file. There are some exceptions, such as EPSText Data.
NOTE : Do not alter the content of any encoded block.
ScriptID values used only in the INX file format
Enumerations
The following enumerations are special to the INX file format. The rightmost two column in
the table describe the possible enumerators.
8/9/2019 Working With Inx File Format
15/30
Working with the INX file format 15
Working with the INX file format
ScriptID values used only in the INX file format
FIGURE1 Table of enumerations
Properties
The following table lists the properties that are special to INX. For the purpose of understand-ing INX, if the storage type is simple, you can assume that the value string in the INX is quitesimple, too (for example, because storage type Long means that the value is a long int, you canexpect the value string to be something like l_12345 and just interpret the result as integer12345). However, if the storage type is complex (such as an array of arrays of mixed types),decoding is also more complex. Information on how to decode the specific value strings aregiven in Table 4.
NOTE : Some Property IDs represent different Scripting Elements, so their meaning could be
different. Also, to facilitate fast lookup, the table is sorted according to the ScriptIDvalue.TABLE4 Property table
Property ID ScriptID
name
ScriptID
value
Scripting element ID Storage type Comments
p_AllRunInStyles
All nestedstyles
alrs kAllRunInStylesPropertyScriptElement
Array of arraysof ID/value pairs
See p_AllRunInStyleson page 19.
Enum type Enum
typename
Enum
typeID
Description Enum
ID
Enum name
ethx hex encoding
eta8 ascii85 encoding
en_EncodingType encodingtype
eten How contents value isencoded. Value type ofp_BinaryBlobEncodingproperty
eta6 ascii64 encoding
bbta axial shade
bbtr radial shade
bbtm mesh shade
en_AGMBlackBoxType contentstypesettings
bbte Types of smooth shadespersisted. Value type ofp_AGMBlackBoxType
property bbtc constant shade
gsto top outside
gsti top inside
gsbo bottom outside
gsbi bottom inside
gscv center vertical
gsch center horizontal
en_GridStartingPointType gridstarting
pointoptions
Gstp Options for the gridstarting point. Value type
of p_GridStartingPointproperty
gscc center completely
norm normal
eOvP specialpaper
eOvB specialblack
eOvR specialregistratio n
eOvH hiddenreserved
en_Override coloroverride
eOvr The override type. Valuetype of p_Overrideproperty
eOvM mixedinkparent
8/9/2019 Working With Inx File Format
16/30
Working with the INX file format
ScriptID values used only in the INX file format
16
p_AppliedTO
CStyle
Applied
TOC Style
ATOC kAppliedTOCStyleP
ropertyScriptElement
TOCStyle Reference to TOCStyle
object
p_BinaryBlobEncoding
contentsencoding
bben kAGMBlackBoxEncodingScriptElement
EncodingTypeenumerator
See enum explanation inEnumerations onpage 14.
p_AGMBlackBoxMatrix
contentsmatrix
bbmx kAGMBlackBoxMatrixScriptElement
Array of six Realvalues
Matrix
p_AGMBlackBoxType
contentstype
bbtp kAGMBlackBoxTypeScriptElement
ContentsTypeSettingsenumerator
See enum explanation inEnumerations onpage 14.
p_BNBulletChar
bullet char bnbc kBNBulletCharacterPropertyScriptElement
Array ofBulletcharactertype enumeratorsor Longs
See p_BNBulletChar onpage 20.
p_BindingLocation
bindinglocation
BnLc kBindingLocationPropertyScriptElement
Long
p_BaseColor base color clbs kBaseColorProperty ScriptElement
Color Object reference to colortype
p_DMDataSourceFile
data sourcefile
dsfl kDataMergeDataSourceFileScriptEleme
nt
File A value for the formf_xxx, where xxx is file-
name string of SysFilep_DMDataSourceFileType
data sourcefile type
dsft kDataMergeDataSourceFileTypeScriptElement
DataSourceTypeenumerator
Enumerators:en_DataMergeCommaSeperated, comma-separated, dmCs;en_DataMergeTabDelimited, tab-delimited, 'dmTd'
p_Editable coloreditable
edbl kColorEditablePropertyScriptElement
Boolean
p_EPSTextData
EPS textdata
ETFC kEPSTextDataPropertyScriptElement
String Similar to image, storesencoded EPS text data
record
Property ID ScriptID
name
ScriptID
value
Scripting element ID Storage type Comments
8/9/2019 Working With Inx File Format
17/30
Working with the INX file format 17
Working with the INX file format
ScriptID values used only in the INX file format
p_Hyperlink
Destination
destination hlds kDestinationPropert
yScriptElement
Array of String,
Long, orBoolean values,HyperlinkTextDestination,HyperlinkPageDestination,HyperlinkExternalPageDestination, orHyperlinkURLDestination
See
p_HyperlinkDestinationon page 20.
p_ItemGeom
etry
item
geometry
IGeo kItemGeometryPro
pertyScriptElement
Array of Long,
Boolean, or Realvalues
Seep_ItemGeometry on
page 20.
p_InstanceList
instancelist
InLi kIndexInstanceListPropertyScriptElement
Array of stringsor storyreferences
See p_InstanceList onpage 21.
p_GridStartingPoint
gridstartingpoint
Jgsp kGridStartingPointPropertyScriptElement
GridStartingPointOptionsenumerator
See enum explanation inEnumerations onpage 14.
p_MojikumiUISettings
mojikumiUI settings
jmus kMojikumiUISettingsPropertyScriptEle
ment
Short This is a private, Japanese-only preference setting.
p_RubyFlag ruby flag jrfg kRubyFlagPropertyScriptElement
Long This is a private, Japanese-only preference setting.
p_UseMasterGrid
use mastergrid
Jumg kUseMasterGridPropertyScriptElement
Boolean
p_ColumnWidth
columnwidth
klwd kColumnWidthPropertyScriptElement
Unit Property of table and tablestyle objects
p_LinkInfo linked fileinfo
LnkI kLinkInfoPropertyScriptElement
Array of Strings,Longs, Dates orBooleans
See p_LinkInfo onpage 21.
p_CanChoosePosters
can chooseposters
Mccp kCanChoosePostersPropertyScriptElement
Boolean
p_CustomPoster
customposter
Mcsp kCustomPosterPropertyScriptElement
Boolean
p_FixedHeight
fixedheight
MFHo kFixedHeightPropertyScriptElement
Unit Property of table and tablestyle objects
Property ID ScriptID
name
ScriptID
value
Scripting element ID Storage type Comments
8/9/2019 Working With Inx File Format
18/30
Working with the INX file format
ScriptID values used only in the INX file format
18
p_IntrinsicBo
unds
intrinsic
bounds
Mibd kIntrinsicMovieBou
ndsPropertyScriptElement
Array of two
Long values
Store width and height of
intrinsic bounds (of moviepage item).
p_PosterIsAvailable
posteravailable
Mpia kPosterIsAvailablePropertyScriptElement
Boolean
p_MixedInkInkNames
ink namelist
mxnm kInkNameArrayPropertyScriptElement
Array of Stringvalues
Ink names
p_OverridenPageItemProps
overriddenpage itemprops
ovpp kOverridenPIPropsPropertyScriptElement
Array of Longvalues
Stores a list of InterfaceIDs that are locallychanged; that is, used indescribing locallyoverridden page items.
p_Override coloroverride
ovrd kColorOverridePropertyScriptElement
ColorOverrideenumerator
See enum explanation inEnumerations onpage 14.
p_OverrideList
overridelist
ovrl kOverrideListPropertyScriptElement
Array ofPageItem values
See p_OverrideList onpage 22.
p_PageCount page count PagC kPageCountPropertyScriptElement
Long
p_AllCellGradientAttrList
all cellgradient
attr list
pcgl kAllCellGradientAttrListPropertyScriptE
lement
Array of Realvalues, arrays of
two Unit values
General list type. First twoitems are length and angle
of cell gradient, third is alist with two items, whichare (x, y) coordinates ofgradient center.
p_Contents contents pcnt kContentPropertyScriptElement
String See p_Content onpage 22.
p_Contents contents pcnt kImageContentsScriptElement
String See p_Content onpage 22.
p_Contents contents pcnt kAGMBlackBoxContentsScriptElement
String See p_Content onpage 22.
p_MetaDataPacket
metadatapacket
pMep kMetaDataPacketPropertyScriptElement
MetadataPacketPreference
Stores object reference ofkMetaDataPacketObjectScriptElement object,which has property ofkContentPropertyScriptElement property.
p_Visible visible pvis kColorVisiblePropertyScriptElement
Boolean
Property ID ScriptID
name
ScriptID
value
Scripting element ID Storage type Comments
8/9/2019 Working With Inx File Format
19/30
Working with the INX file format 19
Working with the INX file format
ScriptID values used only in the INX file format
p_AllRunInStyles
Storage type: Array of arrays of ID/value pairs
This property stores a list of all of the properties of all of the nested styles on the object.
Example of the attribute value:
alrs="x_4_z_4_63727374_o_u58_72697465_e_RIdc_72696374_l_1_72696963_b_t_z_4_63727374_o_u58_72697465_e_RIdw_72696374_l_a_72696963_b_t_
z_4_63727374_o_u58_72697465_e_RIdc_72696374_l_1_72696963_b_t_
z_4_63727374_o_u58_72697465_c_Sentences_72696374_l_8_72696963_b_t"
Applying the algorithm provided in Decoding an element on page 9 to decode the ID/valuepairs for the first example record shown above, you can see the following:
x_4 indicates a general list type of four items.
p_AGMBlack
BoxVersion
contents
version
pvrs kAGMBlackBoxVers
ionScriptElement
Long
p_Removable colorremovable
rmbl kColorRemovablePropertyScriptElement
Boolean
p_SpotColorList
spot colorlist
spcl kSpotListPropertyScriptElement
Array ofSwatches
Property onkAGMBlackBoxObjectScriptElement(c_AGMBlackBox, "pasted smoothshade"). Its value is objectlist of Swatch.
p_SpecialGlyph
customglyph
SpGl kSpecialGlyphPropertyScriptElement
Long No
p_StoryOffset story offset STof kPIStoryOffsetPropertyScriptElement
InsertionPoint Seep_StoryOffset onpage 23.
p_StoryOffset story offset STof kChangeStoryOffsetPropertyScriptElement
InsertionPoint See p_StoryOffset onpage 23.
p_StoryOffset story offset STof kStoryOffsetPropertyScriptElement
InsertionPoint Seep_StoryOffset onpage 23.
p_StoryOffset story offset STof kNoteStoryOffsetPropertyScriptElement
InsertionPoint See p_StoryOffset onpage 23.
p_XMLContent
XMLcontent
Xcnt kXMLContentPropertyScriptElement
Text, Story,PageItem,Movie, Sound,Image, EPS orPDF
Stores object reference toactual page item
Property ID ScriptID
name
ScriptID
value
Scripting element ID Storage type Comments
8/9/2019 Working With Inx File Format
20/30
Working with the INX file format
ScriptID values used only in the INX file format
20
z_4 indicates a Record list with four items that represents all properties of a kAllRunInStyle-ObjectScriptElement.
63727374_o_u58 indicates a property of crst/p_AppliedCharStyle on kCharacterStyleProp-ertyScriptElement, whose value is an object.
72697465_e_RIdc indicates a property of rite/p_RunInTriggerExp ("delimiter") onkTriggerExpressionPropertyScriptElement, whose value is an enum.
72696374_l_1_ indicates a property of rict/p_RunInCount ("repetition") on kRunInCount-PropertyScriptElement, whose value is a long int.
72696963_b_t_ indicates a property of riic/p_RunInInclusive on kRunInInclusiveScriptEle-ment, whose value is a Boolean.
NOTE : This decodes one Record list; you could apply the same method to the other threerecords, thereby decoding the whole value string.
p_BNBulletChar
Storage type: Array of Bulletcharactertype enumerators or Long values
INX uses the kBNBulletCharacterPropertyScriptElement to access the kBNBulletCharacter-ObjectScriptElement objects properties directly, so its value is not a reference to an object;rather, it is a general list of two items.
An example value:
"x_2_e_BCuf_l_2022"
x_2 indicates a general list type of two items.
e_BCuf indicates an enum whose value is BCuf/en_BCUnicodeWithFont. Other possiblevalues are BCuo/en_BCUnicodeOnly and BCgf/en_BCGlyphWithFont.
l_2022 indicates a long whose value is 2022.
p_HyperlinkDestination
Storage type: Array of String, Long or Boolean values, HyperlinkTextDestination, Hyper-linkPageDestination, HyperlinkExternalPageDestination, or HyperlinkURLDestination
The storage type looks complicated, but it actually has only the following three cases:
If there is no destination indicated, the value is a nil object reference.
If it is an external destination, then the value is a list of external datalink information, whichstores file name, volume name, DirID, ClassID, and hyperlink destination UID. Except for
the last item, they are the same as p_LinkInfo on page 21. If it is a valid internal destination, it stores the object reference to the destination (that is, the
xxxDestination objects).
p_ItemGeometry
Storage type: Array of Long, Boolean, or Real values
p_ItemGeometry is a complex property. It stores geometry information about a page item. Itsvalue is a list that has mixed value items.
8/9/2019 Working With Inx File Format
21/30
Working with the INX file format 21
Working with the INX file format
ScriptID values used only in the INX file format
An example of the attribute value:
IGeo="x_19_l_1_l_4_l_2_D_36_D_-360_l_2_D_36_D_-175.2_ l_2_D_309.8181818181818_D_-
175.2_l_2_D_309.8181818181818_D_-360_b_f_ D_36_D_360_D_309.8181818181818_D_-
175.2_D_1_D_0_D_0_D_1_D_0_D_0"
The items in the list are can be decoded as follows:
x_19 indicates a general list type of 25 (0x19) items.
l_1 indicates that there is a single path. If there were more than one path, the other pathswould be inserted after b_f, which marks the end of a path.
l_4 indicates the start of a path containing four points.
l_2 indicates the first point, whose type is 2 (enum PMPathPointType, kL, see PathTypes.h),which represents a corner point, where only the anchor point itself matters; so the point'sX(), Y() value is appended ("D_36_D_-360"). Note that if the path point type were 0 or 1(kCS or kCK), then the left and right direction points would be written out, too, so therewould be another four numbers. The same rules apply to the second, third, and fourth
points.
b_f indicates the end of the single path containing four points, whose Boolean value speci-fies whether the path is open.
D_36_D_360_D_309.8181818181818_D_-175.2 indicates the geometric bounds, four dou-ble values that represent the left, top, right, and bottom of the bounding box.
D_1_D_0_D_0_D_1_D_0_D_0 indicates the transform matrix, whose six double valuesrepresent the matrix.
If the item has graphic bounds, an additional four double values represent the left, top,right, and bottom of the graphic bounding box.
p_InstanceList
Storage Type: Array of strings or story references
This is a general list that stores names (string) and stories (object reference) of indexinstances alternatively (odd-numbered items are names, even-numbered items are stories).
This is a property of the document object.
p_LinkInfo
Storage type: Array of String, Long, Date, or Boolean values
Stores link information.
An example:LnkI="x_c_c_C:\shuksan\build\qa\testfile\BOTTLE.TIF_c__l_0_l_8c01_c_TIFF_l_0_c__t_0
~21fd4_t_1c4137a~defef92a_l_0_b_t_b_f"
x_c indicates a general list type of 12 (0x0c) items.
c_C:\shuksan\build\qa\testfile\BOTTLE.TIF indicates a string representing the link pathand file name.
8/9/2019 Working With Inx File Format
22/30
Working with the INX file format
ScriptID values used only in the INX file format
22
c__ indicates a string representing the link Volume, whose value (on Windows) is an emptystring.
l_0 indicates a long representing the the DirID, whose value (on Windows) is 0.
l_8c01 indicates a long representing the ClassID, whose value is kDataLinkBoss. c_TIFF indicates a string representing the format name.
l_0 indicates a long representing file type.
c__ indicates a string representing the datalink full name for Mac OS, whose value (on Win-dows) is an empty string.
t_0~21fd4 indicates a 64-bit Type_alt_date representing the file size. The 64-bit value is sep-arated into two 32-bit values by a tilde (~).
t_1c4137a~defef92a indicates a 64-bit Type_alt_date representing the file time stamp. The64-bit value is separated into two 32-bit values by a tilde (~).
l_0 indicates a long representing the link state, which is (IDataLink::kLinkNormal). Forother possible values, refer to IDataLink.h.
b_t indicates a Boolean representing the return value of IsLinkNeeded().
b_f indicates a Boolean representing the return value of HasInternalDataChanged().
p_OverrideList
Storage type: Array of PageItem values
Stores a list of (master page item, layout page item) pairs within the page (because the pageobject has this property).
For example:
ovrl="x_6_o_ucc_o_ud6_o_uf6_o_uf9_o_uf4_o_ufb"
x_6 indicates a general list type of six items.
o_ucc_o_ud6 indicates a (master page item, layout page item) pair.
o_uf6_o_uf9 indicates a (master page item, layout page item) pair.
o_uf4_o_ufb indicates a (master page item, layout page item) pair.
p_Content
Storage type: String
p_Content is also used in other objects where content has a meaningful string, such as the text
content of a story; but for these property elements that are available only in INX, p_Content isused differently.
For kImageContentsScriptElement and kAGMBlackBoxContentsScriptElement, p_Contentrepresents IAsciiEncodingUtils::kAscii64Encoding (or some other encoding type), anencoded string of image content. Do not modify it directly.
For kContentPropertyScriptElement, p_Content represents the XML packet representingthe metadata. Its a property of kMetaDataPacketObjectScriptElement (metadata packetpreference). The stored strings are also not encoded.
8/9/2019 Working With Inx File Format
23/30
Working with the INX file format 23
Working with the INX file format
ScriptID values used only in the INX file format
p_StoryOffset
Storage Type: InsertionPoint.
p_StoryOffset represents kPIStoryOffsetPropertyScriptElement, kChangeStoryOffsetProperty-
ScriptElement, kStoryOffsetPropertyScriptElement, and kNoteStoryOffsetPropertyScriptEle-ment.
The value is an object reference to InsertionPoint. InsertionPoint is a special object that marksa position inside text. See Marker processing instruction on page 11.
Objects
Table 5 summarizes objects that are available only in INX. Details about their base objects, par-ent objects, children, and special properties are listed in the following detail sections.
TABLE5 Objects table
c_AGMBlackBox
Base object: swatch, 'swch', kSwatchObjectScriptElement
Parents:
"application", 'null', kApplicationObjectScriptElement
"document", 'docu', kDocumentObjectScriptElement
Properties:
"contents version", 'pvrs', kAGMBlackBoxVersionScriptElement
"contents type", 'bbtp', kAGMBlackBoxTypeScriptElement
"spot color list", 'spcl', kSpotListPropertyScriptElement
"contents", 'pcnt', kAGMBlackBoxContentsScriptElement
"contents encoding", 'bben', kAGMBlackBoxEncodingScriptElement
"contents matrix", 'bbmx', kAGMBlackBoxMatrixScriptElement
c_EPSText
Base object: "page item", 'pitm', kPageItemObjectScriptElement
Object ID Name 4-char
value
Scripting element ID
c_AGMBlackBox pasted smoothshade
ctbb kAGMBlackBoxObjectScriptElement
c_EPSText EPSText EPST kEPSTextObjectScriptElement
c_XMLStory xml story bnbc kXMLStoryObjectScriptElement
c_MetaDataPacket binding location BnLc kMetaDataPacketObjectScriptElement
8/9/2019 Working With Inx File Format
24/30
Working with the INX file format
ScriptID values used only in the INX file format
24
Parents:
"spread", 'sprd', kSpreadObjectScriptElement
"master spread", 'mspr', kMasterSpreadObjectScriptElement
"page item", 'pitm', kPageItemObjectScriptElement "oval", 'covl', kOvalObjectScriptElement
"rectangle", 'crec', kRectangleObjectScriptElement
"polygon", 'cpgn', kPolygonObjectScriptElement
"graphic line", 'glin', kGraphicLineObjectScriptElement
"group", 'grop', kGroupObjectScriptElement
"state", 'APrc', kAppearanceObjectScriptElement
"document", 'docu', kDocumentObjectScriptElement
"layer", 'layr', kLayerObjectScriptElement "page", 'page', kPageObjectScriptElement
"button", 'Push', kPushButtonObjectScriptElement
"text frame", 'txtf', kTextFrameObjectScriptElement
"story", 'cflo' , kStoryObjectScriptElement
"text", 'ctxt', kTextObjectScriptElement
"character", 'cha ', CharacterObjectScriptElement
"word", 'cwor', kWordObjectScriptElement
"line", 'clin', kLineObjectScriptElement
"text column", 'Ccol', kTextColumnObjectScriptElement
"paragraph", 'cpar', kParagraphObjectScriptElement
"text style range", 'txsr', kTextStyleRangeObjectScriptElement
"cell", 'ccel', kCellObjectScriptElement
"table", 'ctbl', kTableObjectScriptElement
"insertion point", 'cins' , kInsertionPointObjectScriptElement
Properties:
"item geometry", 'IGeo', kItemGeometryPropertyScriptElement
"EPS text data", 'ETFC', kEPSTextDataPropertyScriptElement
"EPS text attribute bounds", 'ETSC', kEPSTextAttrBoundPropertyScriptElement
c_XMLStory
Base object: "story", 'cflo', kStoryObjectScriptElement
Parents:
"document", 'docu', kDocumentObjectScriptElement
8/9/2019 Working With Inx File Format
25/30
Working with the INX file format 25
Working with the INX file format
ScriptID values used only in the INX file format
Children:
"text", 'ctxt', kTextObjectScriptElement
"character", 'cha ', kCharacterObjectScriptElement
"word", 'cwor', kWordObjectScriptElement "line", 'clin', kLineObjectScriptElement
"text column", 'Ccol', kTextColumnObjectScriptElement
"paragraph", 'cpar', kParagraphObjectScriptElement
"insertion point", 'cins', kInsertionPointObjectScriptElement
"text style range", 'txsr', kTextStyleRangeObjectScriptElement
"table", 'ctbl', kTableObjectScriptElement
"page item", 'pitm', kPageItemObjectScriptElement
"story preference", 'SyPf', kStoryPrefsObjectScriptElement "grid data information", 'Jgda', kGridDataObjectScriptElement
"metadata packet preference", 'cMep', kMetaDataPacketObjectScriptElement
Properties:
"metadata packet", 'pMep', kMetaDataPacketPropertyScriptElement
"lock state", 'lckS', kLockStatePropertyScriptElement
"associated XML elements", 'Xans', kAssociatedXMLElementsPropertyScriptElement
c_MetaDataPacket
Base object: "preferences object", 'PObj', kPreferencesObjectScriptElementParents:
"document", 'docu', kDocumentObjectScriptElement
"graphic", 'Grfc', kGraphicObjectScriptElement
"image", 'imag', kImageObjectScriptElement
"EPS", 'EPS ', kEPSObjectScriptElement
"WMF", 'WMF ', kWMFObjectScriptElement
"PICT", 'PICT', kPICTObjectScriptElement
"PDF", 'PDF ', kPDFObjectScriptElement
"story", 'cflo', kStoryObjectScriptElement
"xml story", 'cxst' kXMLStoryObjectScriptElement
Properties:
"contents", 'pcnt', kAGMBlackBoxContentsScriptElement
8/9/2019 Working With Inx File Format
26/30
Working with the INX file format
Notes
26
Notes
Pay special attention to coordinates and their relationship to their parents.
The scripting model is always changing. Any time that a third-party plug-in is added, or anexisting plug-in is removed, the scripting DOM can change, which changes the INX file struc-ture.
Some information is encoded and written as a block; accidentally overwriting it could changethe embedded images, sounds, video, and so on.
XML tags and enumerations in values are keywords to import INX; accidentally changing key-words could cause the file to fail to import.
There is no definitive structure of INX files. There is no XML schema or anything like that thatdescribes the structure. However, if you have the debug version of InDesign, you may chooseTest > Diagnostics > INX DTD > Generate to generate a DTD of the current scripting DOM
tree. Just keep in mind that this is for information only, and you are not supposed to validateINX against this DTD.
Appendix A: Attribute values
This section uses Extended Backus-Naur Form (EBNF) to represent the syntax of attribute val-ues.
EBNF
( ) Group
{ } Zero or more repetitions
[ ] Optional
| Choice
Non-terminals
Attribute_value ::= [ Read_only ] (Simple_value | Value_list)
Simple_value ::= Empty_value | Boolean_value | String_value |StringKey_value | Int16_value |Int32_value| Readable_Double_value | Alt_Double_value | Object_value |Readable_Date_value | Alt_Date_value | File_value |Enumeration_value |Readable_Unit_value | Alt_Unit_value
Value_list ::= General_list | Object_list | Record_list
General_list ::= Type_list Separator List_count { Separator Simple_value }
8/9/2019 Working With Inx File Format
27/30
Working with the INX file format 27
Working with the INX file format
Appendix A: Attribute values
Record_list ::= Type_record Separator List_count { Separator Record_item_key SeparatorSimple_value }
Object_list ::= Type_object_list Separator List_count { Separator Object_value }
Empty_value ::= Type_empty SeparatorBoolean_value ::= Type_boolean Separator ( True | False )
String_value ::= Type_string Separator String
StringKey_value ::= Type_stringkey Separator String
Int16_value ::=Type_int16 Separator Hex_string
Int32_value ::= Type_int32 Separator Hex_string
Int64_value ::= Type_int64 Separator Bit64_string
Readable_Double_value ::= Type_readable_double Separator Double_string
Alt_Double_value ::= Type_alt_double Separator Bit64_string
Object_value ::= Type_object Separator String
Readable_Date_value ::= Type_readable_date Separator Date_string
Alt_Date_value ::= Type_alt_date Separator Bit64_string
File_value ::= Type_file Separator String
Enum_value ::= Type_enum Separator String (see Note 5)
Readable_Unit_value ::= Type_readable_unit Separator Double_string
Alt_Unit_value ::= Type_alt_unit Separator Bit64_string
List_count ::= Hex_string
Record_item_key ::= Hex_string
String ::= text with special processing for Separator (see Note 1)
Double_string ::= floating point decimal value (see Note 2)
Date_string ::= Decimal_string Decimal_string Decimal_string T Decimal_string :Decimal_string : Decimal_string (see Note 3)
Bit64_string ::= Hex_string Bit_separator Hex_value (see Note 4)
Decimal_string ::= { Decimal_char }
Hex_string ::= { Hex_char }
Terminals
Read_only ::= r
Type_empty ::= 0
Type_boolean ::= b
Type_string ::= c
8/9/2019 Working With Inx File Format
28/30
Working with the INX file format
Appendix A: Attribute values
28
Type_stringkey ::= k
Type_int16 ::= s
Type_int32 ::= l
Type_int64 ::= LType_readable_double ::= D
Type_alt_double ::= d
Type_object ::= o
Type_readable_date ::= T
Type_alt_date ::= t
Type_file ::= f
Type_enum ::= e
Type_readable_unit ::= UType_alt_unit ::= u
Type_list ::= x
Type_object_list ::= y
Type_record ::= z
Separator ::= _
True ::= t
False ::= f
Decimal_char ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
Hex_char ::= Decimal_char | a | b | c | d | e | f
Bit_separator ::= ~
Notes
1. A string can contain anything (including white space) except a separator (_). If a separa-tor occurs in the string, it is replaced by a separator sequence (~sep~). You should checkfor this sequence and replace it with a separator prior to using the string value.
2. Informally: 3 or -2.98 or 5.002.
3. An XML-standard date/time string. Informally: yyyy - mm - dd T hh : mm : ss
4. 64-bit values are stored as two 32-bit components, the high-order 32-bits, a ~, followed bythe low-order 32-bits. This separator prevents having to write a fixed number of hex digitsfor each component.
5. The "String" in enum value is a four-character ScriptID representing the enumeration value.
8/9/2019 Working With Inx File Format
29/30
Working with the INX file format 29
Working with the INX file format
Appendix B: Objects with ordered children
Appendix B: Objects with ordered children
DocumentThe document children appear in the following order:
XML items (c_XMLItem, 'cxit');
XML export maps(c_XMLStyleToTagMap, 'stmX');
XML import maps(c_XMLTagToStyleMap, 'tsmX');
Colors (c_Color, 'colr');
Mixed ink groups(c_MixedInkGroup, MxSg');
Mixed inks(c_MixedInk, 'MxSw');
Pasted smooth shades(c_AGMBlackBox, 'ctbb');
Tints(c_Tint, 'tint');
Swatchs(c_Swatch, 'swch');
Gradients(c_Gradient, 'grad');
Fonts(c_Font, 'FonT');Character styles(c_CharStyle,'csty');
Paragraph styles(c_ParaStyle,'psty');
Named grids(c_NamedGrid, 'Jngd');
Kinsoku tables(c_KinsokuTable, 'Jkst');
Mojikumi tables(c_MojikumiTable, Jmjt');
Languages(c_Language, 'lang');
Preferences(all kind of preference objects);
Stroke styles(c_StrokeStyle, 'StSt');
XML tags (c_XMLTag, 'tagX');
Layers(c_Layer, 'layr');
Master spreads(c_MasterSpread, 'mspr');
Spreads(c_Spread, 'sprd');
Sections(c_Section, 'sctn');
PageItems(c_PageItem, 'pitm', all types of page items document directly own);
Stories(all stories);
Hyperlink text destinations(c_HyperlinkTextDestination, 'HLTd');
Hyperlink page destinations(c_HyperlinkPageDestination, 'HLPD');
Hyperlink URL destinations(c_HyperlinkURLDestination, 'HLUD');
Hyperlink external destinations(c_HyperlinkExternalPageDestination, 'HLEP');
hyperlink text sources(c_HyperlinkTextSource, 'HLTS');
hyperlink page item sources(c_HyperlinkPageItemSource, 'HLPs');
Hyperlinks(c_Hyperlink, 'HLOB');
Bookmarks(c_Bookmark, 'Bkmk');
All other remaining children of document;
SpreadThe spread children appear in the following order:
First write non-page items;
Then write page items in reverse z-order (to make importing more efficient)
8/9/2019 Working With Inx File Format
30/30
Working with the INX file format
Appendix B: Objects with ordered children
Table
The table children appear in the following order:
Table rows (c_TableRow, 'crow');
Table columns(c_TableColumn, 'ccol');All other remaining children;
Story
The story children appear in the following order:
Put all story preferences first.
Text style ranges(c_TextStyleRange, 'txsr');
Tables(c_Table, ctbl');
Page items(c_PageItem, 'pitm', all types of page items story own);
Notes (c_Note, 'Note');
Changes (c_Change, 'Chng');
All other remaining children;