diff --git a/docs/format/idml-values.md b/docs/format/idml-values.md index f0ffa8a..bca3f80 100644 --- a/docs/format/idml-values.md +++ b/docs/format/idml-values.md @@ -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 diff --git a/docs/format/objects.md b/docs/format/objects.md index cc10bc5..7f1a00c 100644 --- a/docs/format/objects.md +++ b/docs/format/objects.md @@ -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 diff --git a/src/idml/spread.rs b/src/idml/spread.rs index 3bfabdf..238ecf4 100644 --- a/src/idml/spread.rs +++ b/src/idml/spread.rs @@ -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 {