Commit Graph
22 Commits
Author SHA1 Message Date
aiongg 537af3af4d feat: convert the bullet character list
The preferences object lists the bullet characters offered for lists in
chunk 0x1A488. Write them as ABullet elements.
2026-10-07 01:42:37 +00:00
aiongg 32c74f5c6b feat: convert inks and colour groups
Write an Ink for each ink object (class 0x1F07) with its neutral
density, trap order, frequency and angle, and the colour groups listed
in the preferences (chunk 0x1F61) with their swatches.
2026-10-07 01:41:10 +00:00
aiongg 9eba4eea66 feat: convert composite fonts, kinsoku tables and mojikumi tables
Read the composite font and its entries (classes 0xCB02 and 0xCB03):
name, font, style and custom characters, and the kinsoku and mojikumi
tables with the character lists of a custom kinsoku table.
2026-10-07 01:40:31 +00:00
aiongg 3f4a68dfe6 feat: write object style settings for every object style
Object styles other than [None] now get their text frame, story, text
wrap and frame fitting settings, fill, stroke and corner attributes,
applied paragraph style and some category flags from the INDD (chunks
0x1B92B, 0x1B924, 0x285B, 0x50F28, 0x3776, 0x3777, 0x1B92E, 0x1B946),
and the values every such style has in the corpus IDML files, collected
by tools/root_values.py into src/idml/object_style_values.xml. The root
style gets the same INDD values in place of observed ones.
2026-10-07 01:33:21 +00:00
aiongg 4ff4dd03e0 feat: convert frame fitting and clipping path settings
Frame fitting attributes are in the page item attribute list and, for
object styles, in chunk 0x1B956. Write FrameFittingOption on rectangles,
ovals, polygons and object styles, ClippingPathSettings on images, PDF
and EPS graphics from chunk 0x2C1A, and ImageIOPreference on images from
chunk 0x8C39.
2026-10-07 01:26:02 +00:00
aiongg c938df6f0b feat: convert page margins, columns and layout grid
Pages store margins (chunk 0x51A) and columns (0x528) with a flag that
says whether they are the page's own; otherwise the master page at the
same position supplies them. Write MarginPreference from the values in
effect and GridDataInformation from chunk 0xCD02.
2026-10-07 01:13:34 +00:00
aiongg 9594ac557b feat: convert tint swatches 2026-10-07 00:04:23 +00:00
aiongg 3ca668e96e feat: convert text variables and their instances
Read text variable definitions (class 0xCAB4) into designmap TextVariable
elements with their settings, and write instances (class 0xCA64) as
TextVariableInstance elements in place of U+0018. Evidence and the
settings left out are in docs/format/text-variables.md.
2026-10-06 23:03:09 +00:00
aiongg 358fb2dbe1 feat: convert ruler guides
Read guide objects (class 0x3301, chunk 0x3308) from spread layers and
write them as Guide elements in their page: orientation, location, fit to
page, guide type, item layer, and the view threshold and colour values the
samples show. Locations are measured from the spread, and ViewPreference
states RulerOrigin SpreadOrigin to match.
2026-10-06 22:20:45 +00:00
aiongg 6475d01841 docs: describe evidence from the non-public sample in general terms 2026-10-06 20:31:49 +00:00
aiongg e1acc98fa8 feat: convert start paragraph, drop caps, letter spacing and first baseline offset
Map paragraph attributes 0x1B37 (StartParagraph), 0x1B0D and 0x1B0E
(drop cap characters and lines), 0x1B31 and 0x1B32 (maximum and minimum
letter spacing), and the text frame's first baseline offset code in
chunk 0x2CE. Evidence is recorded in docs/format.
2026-10-06 20:30:55 +00:00
aiongg 18206fca5b feat: convert small caps, jump and bounding-box wrap, and Roman page numbers
Capitalization codes 1 (SmallCaps) and 3 (CapToSmallCap), text wrap
modes 1 (JumpObjectTextWrap) and 3 (BoundingBoxTextWrap) with offsets
stored as left, top, right, bottom, and page number style 0x4C17
(LowerRoman) with Roman page names. Evidence in docs/format.
2026-10-06 19:51:56 +00:00
aiongg b0658ad13a feat: convert text wrap mode of page items and graphics
Read chunk 0x3703 (mode, offsets, flags) and the contour type in chunk 0x373D, and write TextWrapPreference for page items, groups and placed graphics. Modes 0 (None) and 6 (Contour) are written; other modes are left out with a warning. Offsets are written only when all are 0, since their order is not known yet.
2026-10-06 19:02:02 +00:00
aiongg 950dec81ce feat: convert all sections of a document
Read each section's first page and page number style from chunk 0x4C02, sort sections by their first page, and write one Section per section with its length. Write PageNumberStart only when numbering restarts, and PageNumberStyle only for the Arabic style seen in the corpus. Pages are named by their number in their section.
2026-10-06 18:55:34 +00:00
aiongg 38a9154bc5 feat: write the applied master of master pages
Master pages use the same chunk 0x140F as document pages. Write AppliedMaster and MasterPageTransform for them too: "n" and the identity matrix when the chunk is absent or empty, as in all corpus pairs, and the named master spread otherwise.
2026-10-06 18:48:01 +00:00
aiongg 5c024c0413 feat: convert embedded and pasted graphics with their contents 2026-10-06 18:22:23 +00:00
aiongg 534e37549a feat: convert gradients and corner and gradient item attributes
Read gradient swatches (stops, locations, midpoints, type) and write them
to Graphic.xml after the swatches, as the schema requires. Write
CornerOption, CornerRadius and gradient start and length on page items.
Decode unknown 4-byte attribute values as numbers.
2026-10-06 17:43:37 +00:00
aiongg 69573c8461 feat: convert document and text frame preferences
Write DocumentPreference (page size, facing pages, bleeds, intent) and
TextFramePreference (columns, gutter, column width, vertical
justification, auto-sizing). compare.py now also compares child elements
without Self and the preference elements.
2026-10-06 17:26:36 +00:00
aiongg 2da8d4eb7c feat: convert style groups, object styles, master names and sections
Write the style hierarchy with root and nested groups and path-qualified
style references, object styles with AppliedObjectStyle on page items,
master spread names and prefixes, and sections with their numbering.
Keep negative zero in numbers, as IDML does.
2026-10-06 16:45:43 +00:00
aiongg a4d9f0d882 feat: convert placed images, PDF, EPS and SVG with links
Read graphics inside frames (transform, bounds) and their links and link
resource URIs, and write them as Image/PDF/EPS/SVG elements with Link
children. Frames with graphics get ContentType GraphicType.
2026-10-06 16:39:56 +00:00
aiongg 7b7d5c2452 feat: convert items anchored in text
Read the owned-items strand of stories and write anchored page items in
place of their U+FFFC character. Record that the third object tree lists
deleted UIDs, which no live hierarchy references.
2026-10-06 16:37:23 +00:00
aiongg 0e20d76f2a feat: convert colours, fill and stroke, and style hierarchy
Decode colour swatches (name, model, space, values, override, flags) and
the None swatch, and write them to Graphic.xml. Parse attribute lists and
write page item fill colour and tint, stroke colour and weight, and miter
limit. Write BasedOn of root styles as a string, as IDML does. Write forced
line breaks as U+2028 and keep surrogate pairs intact across text runs.

Document the object, chunk and attribute formats with their evidence.
2026-10-06 16:25:07 +00:00