Skip to content

Render cached TOC field-result entries black like Word #427

Description

@JSv4

Summary

Docxodus renders cached Table of Contents field-result entries in the blue/underlined Hyperlink character style, but Microsoft Word prints those TOC entries in black.

This is the styling residual left after the geometry work tracked by #397. Microsoft Graph Word-reference capture in PR #423 now resolves the correctness question.

Reproduction

Render TestFiles/HC022-Table-Of-Contents.docx in paginated mode at 96 DPI and inspect the TOC-entry region (x=90..730, y=135..220).

The package's Hyperlink character style declares color 0563C1 and underline. Docxodus applies that appearance directly to the cached TOC result runs.

Evidence

Renderer Blue pixels in TOC-entry region TOC entry appearance
Microsoft Graph conversion 0 black
LibreOffice 0 black
Docxodus 4,890 blue/underlined

Word still renders genuinely blue content elsewhere in the same page (including the title/body headings), so this is not a grayscale or capture artifact. The result is specific to the TOC field-result entries.

The broader page comparisons measured Docxodus-versus-Word SSIM 0.95320 / ink F1 0.97023 and LibreOffice-versus-Word SSIM 0.96636 / ink F1 0.95808. Geometry-focused ink F1 does not represent the color error well; the exact blue-pixel measurement is the decisive signal.

Expected

Cached TOC field-result entries should use Word's field-result formatting behavior and render black for this document, despite the surrounding hyperlink markup/style definition.

Actual

Docxodus paints the entries with the package's blue, underlined Hyperlink style.

Acceptance criteria

  • Reduce the behavior to a minimal generated TOC/cached-field fixture.
  • Add a regression that distinguishes TOC field-result styling from an ordinary hyperlink using the same character style.
  • Match Word's black TOC result text without regressing ordinary hyperlinks.
  • Rerun the tracked fields-and-tabs visual-parity case and record the result.

Provenance

Microsoft Graph conversion reference: Microsoft Graph v1.0 DOCX-to-PDF conversion, rasterized at 96 DPI. The reproducible capture and measurement metadata are being added by PR #423; no Word artifact needs to be committed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions