Skip to content

fix: preserve detailed pages in PDF export - #10

Merged
wenn-id merged 1 commit into
ai/post-event-developmentfrom
ai/pdf-jpeg-fidelity-hotfix
Jul 30, 2026
Merged

fix: preserve detailed pages in PDF export#10
wenn-id merged 1 commit into
ai/post-event-developmentfrom
ai/pdf-jpeg-fidelity-hotfix

Conversation

@wenn-id

@wenn-id wenn-id commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • encode PDF page rasters at JPEG quality 95
  • add a deterministic high-frequency regression fixture
  • preserve the existing full-content fidelity thresholds

Evidence

  • live Codex App comic: page 1 mean error 3.87 -> 2.24
  • Windows: 334 tests passed, 7 skipped
  • Linux: 334 tests passed, 1 skipped
  • focused PDF suite: 16/16
  • build, distribution validation, and clean-install base/MCP passed

@warpfix warpfix 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.

🔍 WarpFix PR Review

This pull request introduces a fix to preserve detailed pages during PDF export by encoding PDF page rasters at JPEG quality 95. It also adds a regression test to ensure fidelity thresholds are maintained.

📖 Walkthrough

The changes made in this pull request include modifying the PDF export script to set the JPEG quality to 95, which aims to enhance the fidelity of exported pages. Additionally, a new test case has been added to verify that detailed pages survive the fidelity gate during the PDF export process. The test generates a synthetic image, saves it, and checks if the export function successfully creates a PDF file. The overall structure of the existing tests has been maintained, with minor adjustments to imports and the addition of the new test.

📁 File Changes

File Change Impact
scripts/export_pdf.py Added JPEG quality parameter to the PDF export function. 🔴 high
tests/test_export_pdf.py Added a test case to verify fidelity of detailed pages in PDF export. 🟡 medium

⏱ Review Effort & Risk

Metric Value
Effort ███░░ 3/5 (Moderate) · ~30min
Risk 🟡 MEDIUM
Risk Factors
  • Potential impact on existing PDF export functionality
  • Changes to image processing may affect performance
  • New test cases may not cover all edge cases

Labels: bug enhancement test

💡 Key Observations

Ensure that the JPEG quality setting does not degrade the output quality beyond acceptable limits.

Verify that the new test case accurately reflects real-world scenarios for PDF exports.


🤖 Reviewed by WarpFix — AI-Powered Code Review + CI Repair · Security

@wenn-id
wenn-id merged commit bad5aab into ai/post-event-development Jul 30, 2026
7 checks passed
@wenn-id
wenn-id deleted the ai/pdf-jpeg-fidelity-hotfix branch July 30, 2026 07:50
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