frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Folio: PDF generation for Go with an in-browser WASM playground

https://github.com/carlos7ags/folio
3•carlos7ags•1h ago

Comments

carlos7ags•1h ago
Hi HN, I'm Carlos. I built Folio because the PDF generation landscape hasn't changed in years.

In Go: gofpdf was the standard library but it was archived in 2021 and never had a real layout engine. Nothing serious filled the gap.

In Java: iText is excellent but switched to AGPL. Using it commercially without their license is a violation. Apache PDFBox exists but the API is genuinely painful for anything beyond basic use.

The common workaround is Puppeteer. Spin up headless Chrome, render HTML, print to PDF. It works but you're shipping a 300MB Chrome binary, cold starts are 2-5 seconds, and it can't do digital signatures, AcroForms, or PDF/A compliance.

So I built Folio against the ISO 32000 spec. Full layout engine, HTML to PDF converter, PDF reader/merger, forms, barcodes, signatures, and PDF/A. Apache 2.0, no fees.

The part I'm most happy with is the WASM build. The whole library compiles to WebAssembly and runs in the browser. The playground at https://folio-playground.pages.dev lets you paste any HTML and get a PDF in milliseconds, no server, no signup, your documents never leave your machine. No other PDF library has this.

A few technical notes for those curious:

The layout engine is plan-based. Layout is a pure function with no mutation during rendering. This makes page break splitting clean and lets elements be measured multiple times safely.

Font subsetting was the hardest part. Getting TTF parsing, glyph ID mapping, and CMap generation right took longer than everything else combined.

One external dependency: golang.org/x/image. That's it.

What's next: a template library (invoice, report, resume, the shadcn model where you own the code), a Java SDK via Panama FFI, and a hosted API for teams that don't want to self-host.

Playground: https://folio-playground.pages.dev Repo: https://github.com/carlos7ags/folio

Happy to talk about the PDF internals, the WASM build, or the layout engine architecture.

Roundcube Snoozed Messages Support

https://packagist.org/packages/poremland/snoozed_messages
1•oremlandp•49s ago•0 comments

Three anesthesia drugs all have the same effect in the brain

https://news.mit.edu/2026/three-anesthesia-drugs-all-have-same-effect-brain-0317
1•gmays•1m ago•0 comments

Can Before and After Be Superposed?

https://physics.aps.org/articles/v19/38
1•bikenaga•2m ago•0 comments

A survey on LLMs for spreadsheet intelligence

https://orbilu.uni.lu/handle/10993/67962
1•teleforce•2m ago•0 comments

King opens world's longest coastal path around England

https://www.bbc.co.uk/news/articles/cy0dxexdd8xo
1•mellosouls•2m ago•0 comments

The age verification status of Open Source Operating Systems

https://github.com/BryanLunduke/DoesItAgeVerify
1•LorenDB•3m ago•0 comments

Versioned repo files as shared memory for multi-agent coding workflows

https://github.blog/ai-and-ml/github-copilot/how-squad-runs-coordinated-ai-agents-inside-your-rep...
2•spboyer•6m ago•0 comments

Communication Is Surveillance by Design

https://idiallo.com/blog/communication-is-surveillance-by-design
2•Brajeshwar•6m ago•0 comments

The Future of Spreadsheets in the Big Data Era (2017) [pdf]

https://eusprig.org/wp-content/uploads/1801.10231.pdf
3•teleforce•6m ago•0 comments

NCCL EP: Towards a Unified Expert Parallel Communication API for NCCL

https://arxiv.org/abs/2603.13606
2•matt_d•7m ago•0 comments

Trump administration seeks billions in military funding in wake of Iran war

https://www.bbc.com/news/articles/c5y73gwk1qdo
3•tartoran•7m ago•0 comments

Facebook offering TikTok and YouTube creators $3k to post content

https://www.bbc.com/news/articles/c895wwp3kqlo
2•tartoran•7m ago•0 comments

Love of corporate bullshit is correlated with bad judgment

https://pluralistic.net/2026/03/19/jargon-watch/
2•hn_acker•7m ago•0 comments

Vectorization of Verilog Designs and its Effects on Verification and Synthesis

https://arxiv.org/abs/2603.17099
2•matt_d•8m ago•0 comments

The companies that win with AI may not look like companies at all

https://www.fastcompany.com/91510062/companies-that-win-with-ai-may-not-look-like-companies-at-all
1•edans•8m ago•0 comments

360° character viewers from a single image using AI video generation

https://anenduringspark.com/360-tutorial/
1•NDowbiggin•10m ago•0 comments

David Zaslav Will Soon Get $550M for Disastrous Warner Bros Reign

https://www.techdirt.com/2026/03/19/david-zaslav-will-soon-get-550-million-for-disastrous-warner-...
1•hn_acker•10m ago•0 comments

I built an invisible interview assistant (yes, like Cluely – but better)

1•krvvko•12m ago•0 comments

Show HN: AgentClick – Human-in-the-loop review UI for AI coding agents

https://github.com/agentlayer-io/AgentClick
2•harvenstar•13m ago•0 comments

How QR Codes Work

https://www.guidavid.com/writing/qr-codes
1•gdss•13m ago•0 comments

The Government Surveillance Reform Act of 2026 [pdf]

https://www.wyden.senate.gov/imo/media/doc/government_surveillance_reform_act_of_2026pdf.pdf
2•jesseendahl•13m ago•1 comments

Section 230's Application to Account Terminations, CSAM, and More

https://blog.ericgoldman.org/archives/2026/03/section-230s-application-to-account-terminations-cs...
1•hn_acker•16m ago•0 comments

Is Using Airplane Mode on Flights Still Necessary?

https://www.insidehook.com/travel/airplane-mode-still-necessary
2•RickJWagner•16m ago•1 comments

Preventing agent drift: A guide to shipping serious code via vibe-coding

1•surajkrajan•17m ago•0 comments

Ask HN: How could a Starlink IPO possibly work?

2•infinitewars•17m ago•0 comments

We're writing agent grammar before the language exists

https://mvrckhckr.com/articles/were-writing-grammar-before-the-language-exists
2•mvrckhckr•19m ago•0 comments

The new economics of sex work

https://www.economist.com/finance-and-economics/2026/03/19/the-new-economics-of-sex-work
1•thunderbong•19m ago•0 comments

Show HN: Revspec – Review AI specs in the terminal with live AI replies

https://github.com/icyrainz/revspec-py
1•icyrainz•20m ago•0 comments

Composer 2

https://cursor.com/blog/composer-2
12•meetpateltech•23m ago•2 comments

Vivaldi 7.8 Is Here

https://vivaldi.com/blog/vivaldi-on-desktop-7-8/
1•andhuman•24m ago•1 comments