feat: write the spread flattener resolutions without the flattener chunk

Spreads without chunk 0x10833 get LineArtAndTextResolution 300 and
GradientAndMeshResolution 150. No INDD field decides these values:
5,045 of the 5,074 trustworthy spreads without the chunk have them; the
other 29 (all spreads of 9 documents) have 400 and 400. The evidence is
in objects.md and idml-values.md.

compare.py --exclude own/:
- trustworthy value coverage 97.03% -> 97.12% (+10,090 values); all
  pairs 95.07% -> 95.16% (+13,836)
- Spread/FlattenerPreference resolutions: 5,074 missing -> 29 wrong
- extra values: trustworthy unchanged; all pairs +306 (the attributes
  on spreads of stale pairs that their IDML no longer has)
This commit is contained in:
aiongg committed 2026-10-08 05:13:20 +00:00
1 parent c6e943e187
commit 78b59b6319
3 files changed
+24 -12

No files matched your search

+7 -1
View File
@@ -279,7 +279,13 @@ values come from the INDD.
| `Layer` | 1,546 | `ShowGuides` and `Expendable` (`true`) from DOM 7 |
Every spread has one `FlattenerPreference`, so the converter writes the
element on every spread. The other attributes of these elements come
element on every spread. For a spread without the flattener chunk
(`objects.md`, flattener settings) it also writes
`LineArtAndTextResolution="300"` and `GradientAndMeshResolution="150"`.
These are not in every IDML: 5,045 of the 5,074 trustworthy spreads
without the chunk have them, and the other 29 (all spreads of 9
documents) have 400 and 400. No INDD field tells the two groups apart
(`objects.md`). The other attributes of these elements come
from the INDD (`objects.md`).
### Document settings in designmap.xml
+10 -5
View File
@@ -112,11 +112,16 @@ offsets 20 and 28, 2 at 36 and 800 at 44. Their IDML has
`LineArtAndTextResolution` and `GradientAndMeshResolution` 400 and
`RasterVectorBalance` 50. The converter writes the f64 at 20 and 28 as
the two resolutions; which is which is not known, as they are equal in
every sample. Without the chunk, 5,080 spreads have 300 and 150 and 29
spreads (all spreads of 9 documents, DOM 8 to 20) have 400 and 400; the field that decides this was not found in the
spread or the document preferences, so the converter leaves the two
resolutions out. The other four values are the same in every IDML
(`idml-values.md`).
every sample. Without the chunk, 5,045 trustworthy spreads have 300
and 150 and 29 spreads (all spreads of 9 documents, DOM 8 to 20) have
400 and 400. No field decides this: the bytes of 300 and 150 or of 400
and 400 do not occur in those files, and no chunk of the preferences or
the document object follows it. The 9 documents all contain objects of
classes 0x4207, 0x4208 and 0x4218, which only 4 of the 480 other
trustworthy documents contain, so the setting probably comes from the edition of the
application that made the document. The converter writes 300 and 150
for spreads without the chunk (`idml-values.md`, spreads). The other
four values are the same in every IDML (`idml-values.md`).
**Spread layers (0x301)** hold the items of one document layer on one
spread. Chunk 0x302: u32 document layer UID, u16 1 for the layer's guide
+7 -6
View File
@@ -786,12 +786,13 @@ impl Writer<'_> {
}
let major = self.doc.version.major;
if !master && let Some(mut fp) = values::element("Spread/FlattenerPreference", major) {
if let Some([line_art, gradient]) = s.flattener_resolution {
fp.attrs
.insert(0, ("GradientAndMeshResolution".into(), num(gradient)));
fp.attrs
.insert(0, ("LineArtAndTextResolution".into(), num(line_art)));
}
// Without the flattener chunk, IDML has 300 and 150 in nearly
// every spread (`idml-values.md`, spreads).
let [line_art, gradient] = s.flattener_resolution.unwrap_or([300.0, 150.0]);
fp.attrs
.insert(0, ("GradientAndMeshResolution".into(), num(gradient)));
fp.attrs
.insert(0, ("LineArtAndTextResolution".into(), num(line_art)));
fp.write(&mut x);
}
for p in &s.pages {