| 1 | # Native feature controls |
| 2 | |
| 3 | OneNote 14.0.4763.1000 authored 19 pages alongside the Rust seed page, then |
| 4 | exported XML, PDFs and attachment bytes. The frozen input is |
| 5 | [notebook/fixture.json](notebook/fixture.json); [scripts/author.ps1](scripts/author.ps1) |
| 6 | contains the executed author. The input generator validates every page against |
| 7 | the unmodified 2010 COM schema (`OneNote2010.xsd`, kept outside the repository). |
| 8 | |
| 9 | The fixture covers PNG/JPEG/BMP/TIFF/GIF import, alternative text and image links, |
| 10 | all four background/printout flag combinations, an attachment, a WAV recording |
| 11 | and its timed annotation, inherited strikethrough and paragraph spacing, RTL, |
| 12 | collapsed nested paragraphs, repeated breaks, numbering formats 0–4, a disabled |
| 13 | task with identity and dates, duplicate titles, three page levels, nested section |
| 14 | groups, duplicate section names in different groups, and an empty section. |
| 15 | Native XML exports BMP, TIFF and GIF images as PNG; JPEG remains JPEG. |
| 16 | The stored TIFF payload remains TIFF. The report preserves it and creates a |
| 17 | PNG browser preview whose pixels are checked against the native XML export. |
| 18 | |
| 19 | The printout controls isolate a native framing distinction. All four inputs |
| 20 | request 288 × 192 points. Without `isPrintOut`, stored layout maxima are exactly |
| 21 | 288 × 192. With it, they are 286.56 × 190.56, independently of `backgroundImage`. |
| 22 | Native XML includes the 0.72-point border on each side; native PDF bitmap bounds |
| 23 | agree with the smaller stored dimensions within PDF coordinate rounding. |
| 24 | The corresponding stored Boolean is `0x08001d85`; the model retains both flags |
| 25 | and exposes the bitmap dimensions without adding the frame to them. |
| 26 | |
| 27 | The recording GUID is stored in `0x1c001c97`. Its annotation stores the same GUID |
| 28 | in `0x1c001c98` and 500 milliseconds in `0x14001c99`, agreeing with native |
| 29 | `MediaIndex`. The WAV payload is checked byte-for-byte against the native cache. |
| 30 | COM import does not set `IRecordMedia` for this fixture; the model leaves that |
| 31 | property absent. The separate private video has the documented value 2. |
| 32 | |
| 33 | The task's GUID, disabled/completed bits and four dates are checked against |
| 34 | `OutlookTask`. Numbering format 0 ends in a meaningful UTF-16 NUL code, which |
| 35 | must survive decoding. Rust assertions are in [tests/document.rs](../../../tests/document.rs). |
| 36 | |
| 37 | Reproduce the native semantic comparison with the bundled Python runtime: |
| 38 | |
| 39 | ```sh |
| 40 | cargo build --example document |
| 41 | python3 tools/verify-document.py corpus/m6/native-features-01/notebook corpus/m6/native-features-01/read |
| 42 | ``` |
| 43 | |
| 44 | The comparison passed 20 pages, the task association and 8,576 explicit |
| 45 | character-format comparisons. These results establish model and native |
| 46 | agreement; report visual inspection is a separate acceptance gate. |