Do PDF bookmarks survive a split?
Merge loses bookmarks and needs an offset formula. Split is the mirror problem: pages are renumbered 1–n per part, so survivors need a filter and a minus sign. We ran it.
The executed run
- Built a 9-page merge from four sources (A 3p, B 2p, C 2p, D 2p) with all 10 bookmarks written by formula; read back 10/10.
- Split three ways: pages 1–3, 4–6, 7–9. Raw bookmarks kept in each part: 0, 0, 0 — 0/10.
- Rebuild rule: keep a bookmark if its destination page falls inside the part’s range, remap
page’ = page − start. - Result: part1 = A s1–s4 (4), part2 = B sec1–2 + C sec1 (3), part3 = C sec2 + D sec1–2 (3). Every destination verified against extracted page text: 3/3 parts True.
The cross-edge finding
C’s two bookmarks straddle the split: C sec1 (merged p6) lands in part2, C sec2 (merged p7) in part3. Ownership is decided by destination page, not by source file — one rule, no special-casing.
The two formulas
- Merge
destination_offset = sum(pages of sources before)→ +0/+3/+5/+7- Split
- keep if
start+1 ≤ page ≤ end, thenpage’ = page − start
Split tools that claim “bookmarks preserved” should show per-part counts. Ours do now, per part, with text-verified targets.