compare.py --cache keeps conversions by content SHA-256 and file name,
--valid-cache keeps schema validation results by part; render_compare.py
takes conversions from the same cache and reuses verdicts and
measurements with --reuse-results. Runs killed by a signal or a timeout
and failed renders are not kept.
Story links come from chunk 0x8CBC with the graphic link reader;
LinkClassID is the link object's class and resource state 3 is
StoredState="Contained". LinkResourceId on stories and text frames
comes from document chunk 0x21D06, LinkedStoryOption from 0x21D12,
ParaStyleMapping/CharStyleMapping from 0x21D30 (story and
preferences), StyleMappingPreferences from 0x12216, and
WordRTFImportPreferences/ExcelImportPreferences from the options object
of 0x12202.
Article elements with ArticleMember children from document chunk 0x21B03
and the articles' chunks 0x13C and 0x21B02; Group ArticleChildrenList
from chunk 0x21B05; the nine empty EpubAccessibility attributes from
INDD 19.3 and EpubCreatePageNavigation from 19.4.
Preference, document and language values that no INDD field holds and
nearly every reference IDML has are written as defaults. The print
page range is read from the u16 at A+122 of the print settings.
Movie (class 0x14801) and Sound (0x14F01) as the last child of their
frame: playback settings from chunk 0x14004, poster image, link,
FilePath, label, text wrap and transparency. MovieBehavior/SoundBehavior
name them in MovieItem/SoundItem, and timing targets that point at them
are kept.
NumberingRestartPolicies (0x1A41E) is three u32; the two triples seen
in the corpus are written. KeyboardDirection code 1 is
LeftToRightDirection. IDML writes AllNestedStyles only when the list
has items, on every style. The root value test checks values that the
observed root values still hold.
IDML writes a style's text attributes in ascending attribute ID order.
The IDs between known ones, with their payload types, place 79 more
attributes: ruby, kenten, tatechuyoko and warichu settings, OpenType
features, gap tints and colours, overprint flags, paragraph border
options and others. Styles and text runs write them wherever they are
stored; the root style values come from the INDD instead of the
observed values.
- BeforeGroupingLayerReference from the u32 at 0 of chunk 0x324, a
spread layer resolved to its layer.
- TableStyle CaptionPosition from DOM 21.5: attribute 0x1047D = 1 gives
BeforeTable, absent gives AfterTable.
- AIGeneratedAltText, AltTextGenerationError and AltTextCropSyncRect of
page items from chunks 0x1E262, 0x1E260 and 0x1E261.
- The Name of a nested style group is its full path joined by ':'.
An image without a link whose chunk 0x8C23 is 0 or absent keeps its
file in its preview (0x170D -> class 0x1708 -> 0x119 -> raw data
object). Images of InDesign 2.0 to 5.0 whose chunk 0x8C1B names a class
0x8C01 object keep the preview as a preview.
`read_previews` also collects the page items of graphic table cells and
the items of form field states, which the package holds as well. Over
the open corpus this adds previews for 657 graphics in cells and 385 in
states; every cell graphic without `Contents` has one. Items anchored in
cell text were already in the story anchors.
A preview chain that can't be read gives no preview instead of failing
the graphic, and with it the conversion.
The README and ARCHITECTURE.md say that every conversion looks up each
graphic's preview object; only `convert` reads the preview data.
`indd::convert` now returns `Conversion::previews`: InDesign's screen
preview (chunk 0x170D -> class 0x1708 -> chunk 0x119 -> raw data) of each
placed graphic without `Contents`, one entry per preview file with the
`Self` of every graphic that uses it. IDML has no place for a preview, so
the package is unchanged; an application can show the preview when it
cannot read a linked file. `convert_into` and `indd audit` do not read
previews.
Output: `diff_outputs.py --exclude own/` over 23 files (the fixtures and
part of the open corpus): 0 differing outputs, 0 changed warnings or
failures.
Stories and XML stories get the Ai* attributes from DOM 21.5; links the
Ai* attributes from 21.5 and SourceObjectName from 21.4; every typed
ContourOption the four contour parameters from 21.4; object styles
EpubAriaLabel and EpubAriaLabelSourceType from 21.2; designmap.xml
Html5ExportPreference from 21.1. LockPosition and AnchorSpaceAbove go on
every AnchoredObjectSetting with all ten settings, polygons included,
in place of the per-tag WhenWritten blocks.