Skip to content

feat: documents to PDF - #106

Merged
Chimi6 merged 1 commit into
mainfrom
pdf-layout
Sep 28, 2026
Merged

Chimi6 merged 1 commit into
mainfrom
pdf-layout

Conversation

@Chimi6

@Chimi6 Chimi6 commented Sep 28, 2026

Copy link
Copy Markdown
Owner

Step 1 of documents to PDF (temp plan): base-14 fonts.

  • src/io/pdf/compose.rs: an event sink that sets any reader's Markdown event stream on Letter pages with one-inch margins: headings, paragraphs broken first fit on AFM widths, nested bullet and numbered lists, block quotes, code blocks, tables (content widths, wrapping, alignment, grid), rules, links (URI annotations), footnotes; a page is written when full.
  • PdfDocument::text_page, base-14 font resources, link annotations, /Info title.
  • Converters markdown/html/text/docx/pages -> pdf.
  • Tests (tests/to_pdf.rs): Markdown round-trips through PDF and our reader unchanged; a long document keeps every word inside the margins; links; WinAnsi losses; every document format reaches PDF. All Pages and Word fixtures convert and read/render in poppler without errors.
  • Size budgets raised 2.55 -> 2.70 MB (binary) and 1.30 -> 1.40 MB (wasm); binary 2,601,232, wasm 1,298,229.
  • STATE records the owner's font decision (system fonts, nothing bundled).

@Chimi6
Chimi6 merged commit a499cfd into main Sep 28, 2026
16 checks passed
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