frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: TinyPDF – 3kb pdf library (70x smaller than jsPDF)

https://github.com/Lulzx/tinypdf
61•lulzx•1d ago
I needed to generate invoices in a Node.js app. jsPDF is 229KB. I only needed text, rectangles, lines, and JPEG images.

  So I wrote tinypdf: <400 lines of TypeScript, zero dependencies, 3.3KB minified+gzipped.

  What it does:
  - Text (Helvetica, colors, alignment)
  - Rectangles and lines
  - JPEG images
  - Multiple pages, custom sizes

  What it doesn't do:
  - Custom fonts, PNG/SVG, forms, encryption, HTML-to-PDF

  That's it. The 95% use case for invoices, receipts, reports, tickets, and labels.

  GitHub: https://github.com/Lulzx/tinypdf
  npm: npm install tinypdf

Comments

IntelliAvatar•1d ago
3KB is wild. What features did you intentionally leave out to get this small?
wonger_•1h ago
Not the author, but generating PDFs is much, much simpler than parsing PDFs
lysace•35m ago
Support for more than 7-bit ASCII characters. :)
anilgulecha•9h ago
Great exercize, but for most use cases - people will continue reaching for jsPDF.

I think if you have a markdown->PDF function included, where I can send in markdown and get PDF, that would solve quite many needs, and would be useful.

lulzx•8h ago
I have added it!
croisillon•1h ago
is it related to one of the other 10 products called TinyPDF?
esafak•44m ago
Yes, obviously: it's a tiny PDF library.
andai•11m ago
Back in the day I needed PDF export for some client thing. I can't remember if I was using pdfjs or jspdf. I do however remember that it was many thousands of lines of code, and yet, I had to lay out the lines of text on the page manually.

My page layout code was like 50 lines of code. And I remember thinking... OK they already wrote 8,000 lines of code... They couldn't have added 50 more?!

400 lines though. Respect. I will take a proper look at this when I recover from burnout :)

Mistral OCR 3

https://mistral.ai/news/mistral-ocr-3
235•pember•1d ago•29 comments

Garage – An S3 object store so reliable you can run it outside datacenters

https://garagehq.deuxfleurs.fr/
355•ibobev•6h ago•80 comments

TP-Link Tapo C200: Hardcoded Keys, Buffer Overflows and Privacy

https://www.evilsocket.net/2025/12/18/TP-Link-Tapo-C200-Hardcoded-Keys-Buffer-Overflows-and-Priva...
165•sibellavia•3h ago•41 comments

8-bit Boléro

https://linusakesson.net/music/bolero/index.php
90•Aissen•10h ago•14 comments

Graphite is joining Cursor

https://cursor.com/blog/graphite
128•fosterfriends•6h ago•151 comments

GotaTun -- Mullvad's WireGuard Implementation in Rust

https://mullvad.net/en/blog/announcing-gotatun-the-future-of-wireguard-at-mullvad-vpn
498•km•10h ago•105 comments

Amazon will allow ePub and PDF downloads for DRM-free eBooks

https://www.kdpcommunity.com/s/article/New-eBook-Download-Options-for-Readers-Coming-in-2026?lang...
475•captn3m0•12h ago•258 comments

Performance Hints (2023)

https://abseil.io/fast/hints.html
16•danlark1•4h ago•17 comments

Buteyko Method

https://en.wikipedia.org/wiki/Buteyko_method
6•rzk•18m ago•1 comments

Show HN: Stickerbox, a kid-safe, AI-powered voice to sticker printer

https://stickerbox.com/
29•spydertennis•2h ago•29 comments

Show HN: TinyPDF – 3kb pdf library (70x smaller than jsPDF)

https://github.com/Lulzx/tinypdf
61•lulzx•1d ago•8 comments

Qwen-Image-Layered: transparency and layer aware open diffusion model

https://huggingface.co/papers/2512.15603
12•dvrp•18h ago•2 comments

Rust's Block Pattern

https://notgull.net/block-pattern/
69•zdw•17h ago•22 comments

Believe the Checkbook

https://robertgreiner.com/believe-the-checkbook/
97•rg81•6h ago•38 comments

NOAA deploys new generation of AI-driven global weather models

https://www.noaa.gov/news-release/noaa-deploys-new-generation-of-ai-driven-global-weather-models
34•hnburnsy•1d ago•17 comments

The FreeBSD Foundation's Laptop Support and Usability Project

https://github.com/FreeBSDFoundation/proj-laptop
115•mikece•7h ago•41 comments

Ask HN: How are you LLM-coding in an established code base?

39•adam_gyroscope•3d ago•25 comments

Reverse Engineering US Airline's PNR System and Accessing All Reservations

https://alexschapiro.com/security/vulnerability/2025/11/20/avelo-airline-reservation-api-vulnerab...
69•bearsyankees•3h ago•31 comments

The pitfalls of partitioning Postgres yourself

https://hatchet.run/blog/postgres-partitioning
22•abelanger•3d ago•3 comments

Lite^3, a JSON-compatible zero-copy serialization format

https://github.com/fastserial/lite3
104•cryptonector•6d ago•29 comments

Wall Street Ruined the Roomba and Then Blamed Lina Khan

https://www.thebignewsletter.com/p/how-wall-street-ruined-the-roomba
138•connor11528•3h ago•87 comments

Show HN: I Made Loom for Mobile

https://demoscope.app
48•admtal•5h ago•31 comments

Postfix Macros and Let Place

https://nadrieril.github.io/blog/2025/12/09/postfix-macros-and-let-place.html
8•todsacerdoti•5d ago•1 comments

You can now play Grand Theft Auto Vice City in the browser

https://dos.zone/grand-theft-auto-vice-city/
205•Alifatisk•2h ago•57 comments

Response Healing: Reduce JSON defects by 80%+

https://openrouter.ai/announcements/response-healing-reduce-json-defects-by-80percent
17•numlocked•1d ago•13 comments

Detailed balance in large language model-driven agents

https://arxiv.org/abs/2512.10047
10•Anon84•3d ago•0 comments

Prompt caching for cheaper LLM tokens

https://ngrok.com/blog/prompt-caching/
252•samwho•3d ago•62 comments

History LLMs: Models trained exclusively on pre-1913 texts

https://github.com/DGoettlich/history-llms
726•iamwil•23h ago•357 comments

Getting bitten by Intel's poor naming schemes

https://lorendb.dev/posts/getting-bitten-by-poor-naming-schemes/
268•LorenDB•16h ago•141 comments

Show HN: Stepped Actions – distributed workflow orchestration for Rails

https://github.com/envirobly/stepped
77•klevo•5d ago•11 comments