Commit Graph
9 Commits
Author SHA1 Message Date
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