Merging Four Outlined PDFs Kept 0 of 10 Bookmarks — Our Cumulative Offsets Held at +3, +5, +7
The numbers that define today's run: 10 rows in, 0 kept, 10 restored at predicted pages. We built four PDFs that each carried a genuine outline — source A with 3 pages and 4 nested rows, then B, C, and D with 2 pages and 2 flat rows each (9 pages, 10 bookmarks total) — merged them in A+B+C+D order, and read the merged file back: an empty outline with all 9 pages present. Following the discipline our three-source page set, we wrote the offset formula down before touching the machine: the first source stays at 0, and each later source shifts by the summed page counts of everything before it, now extending to four sources. Rebuilt that way, the merged file read back all 10 rows identical to the written plan. No accuracy claims, no prices; what we did not run is labeled not run, same as before.
The formula at four sources (written first, run second)
For sources S1…S4 with page counts P1…P4, in merge order:
offset(S1) = 0 · offset(S2) = P1 · offset(S3) = P1 + P2 · offset(S4) = P1 + P2 + P3
On today's bench: offset(A) = 0, offset(B) = 3, offset(C) = 3 + 2 = 5, offset(D) = 3 + 2 + 2 = 7. The planned rebuild table, written before the merge executed, put B's rows at pages 4–5, C's at 6–7, and D's at 8–9 of the merged nine-page file. One sentence of inference, labeled as such: had we saved the raw source lists unshifted, B's rows would point inside A's content and C's and D's rows would point at pages 1–2 as well — we did not build that wrong file to watch it fail, so the arithmetic stands as derived, not as a observed mis-pointing.
The A+B+C+D run, read back step by step
| Step in our run | Outline read-back (verbatim) | What it says |
|---|---|---|
| Source A: 3 pages, nested outline set before save | [[1,'A-H1',1],[2,'A-Child',1],[2,'A-Child2',2],[1,'A-H2',3]] | A exists on disk with its nesting |
| Sources B, C, D: 2 pages each, 2 flat rows each | [[1,'B-Only',1],[1,'B-Second',2]] · [[1,'C-Intro',1],[1,'C-Join',2]] · [[1,'D-Start',1],[1,'D-End',2]] | All three exist on disk — 8 flat rows total |
| Merged A+B+C+D, read straight from the saved file | [], page count 9 | Zero of the 10 rows survived; content intact, matching every prior merge run |
| Rebuild written per formula (0 / +3 / +5 / +7), saved, read back | The same 10 rows: A's nesting at 1–3, B at 4–5, C at 6–7, D at 8–9 | 10 of 10 identical to the plan (fixed_match_plan = true) |
Quick FAQ
Do bookmarks survive merging four PDFs?
In our run, none survived: four outlined sources merged into a file that read back an empty outline. The count of sources does not change what the merge step does; the rebuild step is what returns rows.
How do offsets extend past three sources?
Cumulatively: each source shifts by every page count before it. Today that landed B at +3, C at +5, and D at +7, and the read-back confirmed all ten targets. The pattern is now measured at two, three, and four sources.
What about five or more sources?
Not yet run. The arithmetic extends, but we will not present the extension as fact until we execute it — the same promise the three-source page made about four, now paid, repeats for five.
What we could NOT test — the list stays honest
- Five-source merge and the offset beyond +7 — not run. Reason: today's bench was exactly four; an unexecuted extension stays off the conclusions list.
- Bookmarks pointing at named destinations, and any merge option that might preserve outlines natively — not run. Reason: today's sources carry plain page-target rows only.
- A deliberately mis-pointed rebuild to film the failure mode — not run. Reason: we had no reason to build a knowingly wrong file; the target arithmetic is stated as inference and labeled.
Decision rule this run supports
- Merging up to four outlined PDFs where bookmarks matter: write the offset list first (0 / P1 / P1+P2 / P1+P2+P3), read every source outline, rebuild, then read back. Our run confirmed 10 of 10 targets across four sources.
- Five sources and beyond: the bench is ready and the number will come from execution. Nothing else is promised.
This page pays the four-source promise left on the three-source page, on the same toolchain and deck shape as the nesting run. Bookmark pdf2mdtool.com — the five-source run stays queued until executed.