Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@ follow semantic versioning; release dates are ISO 8601.

### Public API

- **A DOCX export bookmarks a block of drawings alone where its first drawing is anchored, so a
page reference or a link to its anchor works.**
- A section, a container or a layer stack's column holding nothing but drawings writes no
paragraph for a bookmark to go round: its drawings are anchored in the paragraphs beside them,
or in one written on their page. Its anchor had no bookmark: a link to it named a bookmark the
file did not hold, and a page reference to it was written as the number the layout read, which
no edit updates, with a report note. The bookmark now goes at the start of the paragraph its
first drawing is anchored in — the drawing on the earliest page, highest on it. Word keeps a
drawing on its paragraph's page and moves it with that paragraph, so the reference reads the
page the block starts on, and goes on reading it once the text above is edited.
- Measured in Word 16, fields updated, and LibreOffice 24.2, on such a block on page 2 and on
the same file with a page put in ahead of it: before, both editors read 2 in each and carried
no link; now both read 2 and then 3, and the link goes to the block's page. So it is for a
section and a container of drawings, one opening its page, one alone on its page, one in a
panel, a layer stack's column of drawings, and an anchor named with spaces past the 40
characters Word keeps; a block at the foot of page 1 whose drawings run onto page 2 reads 1,
and then 2.
- A block that draws nothing, one whose first drawing stands on a page nothing is written on,
and one composed in a table's cell, whose drawings its table draws, still have no bookmark, and
the report names the anchor.

- **A DOCX export bookmarks a layer stack's column, so a page reference or a link to its anchor
works.**
- A stack whose layers stand side by side is written as a one-row table, each layer's content in
Expand All @@ -23,8 +44,8 @@ follow semantic versioning; release dates are ISO 8601.
carried no link; now both read 2 and then 3, and the link goes to the column's page. So it is
for a left and a right column, a container, a later layer of a column, a column opening with a
table, a stack in a panel, and a table of contents' entry.
- A column that writes no paragraph — drawings alone — has no bookmark still, and the report
names its anchor, as it does a section's of drawings alone.
- A column that writes no paragraph — drawings alone — is bookmarked where its first drawing is
anchored, as a section of drawings alone is (above).

- **A DOCX export keeps a page break the layout makes by itself after a card where the page
makes it.**
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/backend-capability-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Payload records live in `core` under
| Capability | PDF (fixed) | PPTX (fixed) | DOCX (semantic) |
|---|---|---|---|
| External hyperlinks (fragment- and run-level) | ✅ `PdfLinkAnnotationWriter` + link rects in `PdfFixedLayoutBackend` | ✅ `PptxNavigationWriter` (transparent hotspots for measured span, line, and fragment rectangles, emitted above all content after the fragment pass) | ⚠️ `DocxSemanticBackend.newRun` — a paragraph's, a run's, a picture-in-a-line's and a page zone picture's link is a `w:hyperlink` with an external relationship, a run's own link winning over its paragraph's. A block written as a picture, a drawing or a rule — an image, a barcode, a shape, an ellipse, a line — and a table carry none, and the report names the link |
| Internal links (anchor jump, forward references) | ✅ `PdfInternalLinkWriter` (two-pass) | ✅ `PptxNavigationWriter` (deferred slide-jump hyperlinks, resolved after all fragments — including across sections) | ⚠️ `DocxSemanticBackend` — an internal `linkTarget` is a `w:hyperlink` with `w:anchor`, on what an external one is written on, and every anchor the export writes is a bookmark: a paragraph's around its text, a section's, container's, table's, image's or barcode's around everything the block wrote, a stack's layer written as a column around what it writes, a rule's around its paragraph (`bookmarkAround`). A drawing floated over the text — a shape, an ellipse, a line not written as a rule — a page zone's paragraph or picture, and a block that writes no paragraph — a section or a container of drawings alone — hold no bookmark: the report names the anchor, a link to it points at no bookmark, and a page reference to it is written as the number the layout found |
| Internal links (anchor jump, forward references) | ✅ `PdfInternalLinkWriter` (two-pass) | ✅ `PptxNavigationWriter` (deferred slide-jump hyperlinks, resolved after all fragments — including across sections) | ⚠️ `DocxSemanticBackend` — an internal `linkTarget` is a `w:hyperlink` with `w:anchor`, on what an external one is written on, and every anchor the export writes is a bookmark: a paragraph's around its text, a section's, container's, table's, image's or barcode's around everything the block wrote, a stack's layer written as a column around what it writes, a rule's around its paragraph (`bookmarkAround`); a block that writes no paragraph — a section, a container or a column of drawings alone — at the start of the paragraph its first drawing is anchored in, which Word keeps the drawing on the page of. A drawing floated over the text — a shape, an ellipse, a line not written as a rule — a page zone's paragraph or picture, and a block that draws nothing, whose first drawing stands on a page nothing is written on, or that is composed in a table's cell hold no bookmark: the report names the anchor, a link to it points at no bookmark, and a page reference to it is written as the number the layout found |
| Page references — a table of contents' numbers, `addPageReference(...)` (`PageReferenceNode`) | ✅ `PageReferenceDefinition` lays out the resolved page as text, drawn by `PdfParagraphFragmentRenderHandler` | ✅ the same laid-out text through `PptxParagraphFragmentRenderHandler` | ✅ `DocxSemanticBackend.writePageReference` — a `PAGEREF` field to the anchor's bookmark, as a hyperlink (`\h`), storing the page the layout resolved; the editor recomputes it (LibreOffice on layout, Word on a field update). A reference to an anchor the export writes no bookmark for is the text the page prints, since Word turns a `PAGEREF` to a missing bookmark into an error, and the report names it, as it does the margins and padding on the sides its alignment sets it from, which are not written. `w:updateFields` is not set |
| Document outline / bookmarks tree | ✅ `PdfBookmarkOutlineWriter` | ⚠️ `PptxNavigationWriter` (no PPTX outline concept — slide names where 1:1, extra bookmarks dropped with a note) | ❌ |

Expand Down
Loading
Loading