Skip to content

Rework PDF export engine#164

Closed
ThisIs-Developer wants to merge 1 commit into
mainfrom
codex/fast-pdf-export-engine
Closed

Rework PDF export engine#164
ThisIs-Developer wants to merge 1 commit into
mainfrom
codex/fast-pdf-export-engine

Conversation

@ThisIs-Developer
Copy link
Copy Markdown
Owner

Summary

  • Reworked PDF export to use a fast print-document pipeline by default.
  • Kept the existing jsPDF + html2canvas exporter as a compatibility fallback.
  • Added scoped PDF print styles for better page breaks across images, Mermaid diagrams, tables, code blocks, alerts, and math.
  • Improved PDF rendering parity with preview/HTML export by preserving frontmatter, reference links, Mermaid, MathJax, and image readiness.
  • Synced the same PDF export behavior into the Neutralino desktop resources.
  • Updated desktop lazy-loaded export libraries to resolve from local /libs assets.

Why

The previous PDF exporter captured the entire document into one large canvas and sliced it into PNG-backed PDF pages. That approach was slow for large documents, memory-heavy, and prone to layout splits.

The new default path lets the browser/desktop print engine handle pagination, which should be much faster and produce more professional PDFs with selectable text and better layout behavior.

Validation

  • git diff --check
  • node --check script.js
  • node --check preview-worker.js
  • node --check desktop-app/resources/js/script.js
  • node --check desktop-app/prepare.js
  • Local web smoke test confirmed the app loads, PDF controls are present, no console errors appear, and legacy PDF libraries remain unloaded before export.

@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 6, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
markdown-viwer Ready Ready Preview, Comment Jun 6, 2026 7:13pm

@ThisIs-Developer ThisIs-Developer deleted the codex/fast-pdf-export-engine branch June 7, 2026 11:08
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