Skip to content

Improve native Word PDF layout parity#1976

Merged
PrzemyslawKlys merged 4 commits into
masterfrom
codex/word-pdf-engine-parity-main
Jun 19, 2026
Merged

Improve native Word PDF layout parity#1976
PrzemyslawKlys merged 4 commits into
masterfrom
codex/word-pdf-engine-parity-main

Conversation

@PrzemyslawKlys

Copy link
Copy Markdown
Member

Summary

  • improves native OfficeIMO PDF layout behavior for Word save-as-PDF scenarios, including document defaults, paragraph/list/table style defaults, headers/footers, charts, links, row/table pagination, and text diagnostics
  • extracts table autofit sizing into a reusable writer component and adds Word-like handling for dense technical tables, CamelCase/header tokens, qualified identifiers, fixed-width expansion, and preserved-width tables
  • refreshes PDF visual/raster baselines and expands Word SaveAsPdf/PDF visual quality coverage

Validation

  • dotnet test OfficeIMO.Tests\OfficeIMO.Tests.csproj --framework net8.0 --no-restore --filter "FullyQualifiedName~Pdf" --logger "console;verbosity=minimal" -v quiet -> 3136 passed
  • dotnet run --project Artifacts\WordPdfParity\StressRunner\StressRunner.csproj --configuration Release -- "C:\Support\GitHub\TestimoX-exporter-powerpoint-excel-proof\Artifacts\LiveExporterComparison\20260617-125016\TestimoX-live-10.docx" Artifacts\WordPdfParity\stress-officeimo-native-pr-final.pdf
  • dotnet run --project Artifacts\WordPdfParity\CompareRunner\CompareRunner.csproj --configuration Release -- Artifacts\WordPdfParity\stress-word-saveas-reference.pdf Artifacts\WordPdfParity\stress-officeimo-native-pr-final.pdf "21-25,28-34,44-45,66-75"

Stress comparison notes

  • Word Save-as reference: 69 pages; native OfficeIMO candidate: 75 pages
  • links match: 35 vs 35
  • images match: 0 vs 0
  • remaining known gap: dense real-report table pagination still differs from Word Save-as-PDF, especially in large autofit tables where native output keeps more extracted lines per page than Word
  • native conversion warnings: 0; report diagnostics: one existing Calibri ligature substitution diagnostic

@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.92949% with 357 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.42%. Comparing base (96a0205) to head (ac8d61e).
⚠️ Report is 14 commits behind head on master.

Files with missing lines Patch % Lines
...ng/Writer/PdfWriter.Layout.TableColumns.AutoFit.cs 89.07% 21 Missing and 31 partials ⚠️
...ord.Pdf/WordPdfConverterExtensions.Native.Fonts.cs 52.23% 13 Missing and 19 partials ⚠️
OfficeIMO.Pdf/Rendering/Writer/PdfWriter.Text.cs 85.34% 13 Missing and 15 partials ⚠️
...nverterExtensions.Native.ParagraphStyleDefaults.cs 68.67% 10 Missing and 16 partials ⚠️
...dfConverterExtensions.Native.TableStyleDefaults.cs 65.78% 5 Missing and 21 partials ⚠️
...rd.Pdf/WordPdfConverterExtensions.Native.Tables.cs 76.59% 5 Missing and 17 partials ⚠️
OfficeIMO.Word/Converters/DocumentTraversal.cs 81.03% 2 Missing and 20 partials ⚠️
.../Rendering/Writer/PdfWriter.Layout.TableColumns.cs 60.00% 6 Missing and 12 partials ⚠️
...dPdfConverterExtensions.Native.DocumentDefaults.cs 55.00% 5 Missing and 13 partials ⚠️
...rdPdfConverterExtensions.Native.ParagraphStyles.cs 85.56% 7 Missing and 7 partials ⚠️
... and 18 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1976      +/-   ##
==========================================
+ Coverage   73.36%   73.42%   +0.06%     
==========================================
  Files        2525     2531       +6     
  Lines      284422   286273    +1851     
  Branches    60940    61518     +578     
==========================================
+ Hits       208667   210202    +1535     
- Misses      47983    48097     +114     
- Partials    27772    27974     +202     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 60f0e1c7d6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread OfficeIMO.Pdf/Rendering/Writer/PdfWriter.Layout.TableColumns.cs
Comment thread OfficeIMO.Word.Pdf/WordPdfConverterExtensions.Native.HeaderFooter.Diagnostics.cs Outdated
Comment thread OfficeIMO.Word.Pdf/TableLayoutCache.cs Outdated
Comment thread OfficeIMO.Word.Pdf/WordPdfConverterExtensions.Native.HeaderFooter.Diagnostics.cs Outdated
@PrzemyslawKlys PrzemyslawKlys merged commit 5a1caae into master Jun 19, 2026
21 checks passed
@PrzemyslawKlys PrzemyslawKlys deleted the codex/word-pdf-engine-parity-main branch June 19, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant