sghtmltopdf
waka/sghtmltopdf · Public GitHub repository
The second generation of wkhtmltopdf and wicked_pdf
Open the project to try its demo, view the repository, or save it to your collection. Repository and demo actions use RepoShelf’s sign-in flow.

About this project
Author-written excerpt from the project README.
An HTML-to-PDF renderer like wkhtmltopdf written in Rust that does not depend on Chromium, WebKit, or Gecko.
sghtmltopdf turns HTML into PDF without starting a browser process. It is aimed at documents that flow top to bottom with explicit breaks invoices, receipts, reports rather than at rendering arbitrary web pages.
That receipt is examples/receipt.html plus examples/main.css, rendered with one command and no browser:
- No browser process. One binary, or a native extension living inside your Ruby process.
- Fonts are resolved during rendering. There is no document.fonts.ready to wait for, so a PDF is never emitted with unresolved webfonts.
- Streaming. HTML is read in chunks and each page is written out as soon as its layout is final, so memory does not grow with document size (measured: 228MB → 28MB on a 60,000-element document).
- Page breaks are first class. CSS Fragmentation (break-before, break-inside, orphans, widows) and @page are implemented directly.
Requirements and intended audience
An HTML-to-PDF renderer like wkhtmltopdf written in Rust that does not depend on Chromium, WebKit, or Gecko.
Not recorded: account, external api key, paid service, self-hosting. Missing information does not mean there are no requirements.
Statements extracted from the author’s documentation · Checked 2026-10-15. Source: https://github.com/waka/sghtmltopdf/blob/main/README.md
Recorded maintenance information
Last recorded source update: 2026-11-01. Saved release: v0.5.1 · 2026-09-23. These dates do not guarantee ongoing maintenance.
- Technologies
- Rust
- Licence
- MIT. Generally permits modification and commercial use, subject to the licence’s notices and conditions.
- Demo check
- A public page loaded on 2026-11-06. This does not test every feature.
Browse related categories
More projects to explore
iptv
iptv-org/iptv
Collection of publicly available IPTV channels from all over the world
HowToLiveBetter
eternity4719/HowToLiveBetter
高性价比人生指南: 长寿防病、急救、省钱理财、法律红线、失业与工伤、医保社保、恋爱婚育、怀孕育儿、创业与做平台合规、出国与技能。每条写明成本、收益、证据等级和原始出处,只引期刊论文与官方文件。
OpenManus
FoundationAgents/OpenManus
No fortress, purely open ground. OpenManus is Coming.
JavaScript30
wesbos/JavaScript30
30 Day Vanilla JS Challenge