Files
indd-utils/docs/format/header.md
T
aiongg ac957b0eb2 feat: read master pages and contiguous objects
Select the active master page by sequence number, read the database page
count, iterate the contiguous objects after the database pages, and
extract the XMP packet. `indd info` now prints these fields.

The layout comes from Adobe's BSD-licensed XMP Toolkit SDK and is checked
against all 352 corpus files and the fixtures. Add Adobe's BlueSquare.indd
sample (BSD) as a fixture and record the XMP Toolkit as a permitted
reference.
2026-10-06 15:34:39 +00:00

32 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# INDD file header
Offsets are from the start of the file.
| Offset | Size | Meaning | Evidence |
|---|---|---|---|
| 0x00 | 16 | Fixed signature `06 06 ED F5 D8 1D 46 E5 BD 31 EF E7 FE 74 B7 1D` | Identical in all 352 corpus files |
| 0x10 | 8 | ASCII `DOCUMENT` | All 352 files |
| 0x18 | 1 | Byte order: `01` = little-endian, `02` = big-endian. The XMP Toolkit calls it the object stream byte order. | 351 corpus files are `01`. The `02` files (`opf-neddy-flyer`, InDesign 3.0, and `xmp-toolkit-bluesquare`, 4.0) store the version below big-endian. |
| 0x1D | 4 | Major version, u32 in the byte order above | Matches the major version in the document's XMP `CreatorTool` in all 352 files |
| 0x21 | 4 | Minor version, u32 | Matches the minor version in `CreatorTool` (for example 18.5, 21.3) in all files where `CreatorTool` states one, except two where the header is one higher (header 18.2 / XMP 18.1, header 21.1 / XMP 21.0). The header probably records the last save and the XMP an earlier one. |
Major versions seen: 3, 7–9, 11–13, 15–21.
## Other observations
These are observations, not yet explanations. The page layout, master page
selection and contiguous objects are described in `container.md`.
- The two master pages (0x0000 and 0x1000) carry the same signature, tag,
byte order and version.
- In the little-endian files, the first 0x40 bytes of the two master pages
differ, if at all, only at 0x37 and 0x3A.
- 0x19–0x1C read `70 0F 00 00` in every little-endian file sampled.
- 0x25 (u32): small values, 1 to 16 in the sample.
- 0x29 (u64): large values that differ between unrelated files.
## Open questions
- Meaning of 0x19–0x1C, 0x25, 0x29 and 0x31–0x107.
- Whether any file uses a byte-order value other than 1 or 2.