frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: A graph paper generator that renders vector PDFs in the browser

https://freegraphpaper.net/
29•lam_hg94•2h ago

Comments

lam_hg94•2h ago
I got tired of graph-paper sites that print at the wrong scale, hide the PDF behind a signup, or slap a watermark on it. So I built one that's free, has no login, and prints true-to-scale.

The interesting part for me was the architecture: a single pure function buildPaper(config) emits geometric primitives (lines / circles / text), and everything is derived from it - the on-screen SVG preview, the in-browser PDF, and the build-time PDF and OG-image generation. No drawing logic is duplicated across output formats, so adding a new paper style is one renderer function plus about five one-line registrations, and it automatically gets a live preview, a downloadable PDF, an OG image, and SEO pages across every paper size.

Everything is true-to-scale: the SVG viewBox and the PDF are both in millimetres, so a 5 mm grid measures exactly 5 mm on paper when you print at 100%.

It's fully static - no backend, no database, no runtime. About 1,900 pages are prerendered to HTML, ~1,700 PDFs are pre-generated at build time (reusing the exact same draw logic as the browser), and it all deploys to a CDN as plain files.

Tech stack:

- Nuxt 4 / Vue 3 (script setup, TypeScript), Nitro static generation (nuxt generate) - Tailwind CSS v4 plus scoped CSS with a small design-token system - Paper engine: one pure buildPaper() -> primitives; one renderer per style. Single source of truth for preview + PDF + images - Preview: pure renderPaperSvg() -> inline SVG baked into the prerendered HTML, so previews render with zero client JS - PDF: jsPDF (dynamic import) for arbitrary custom configs in the browser; a Bun script reuses the same primitives to pre-build the static PDFs - Social images: SVG -> PNG at build time with @resvg/resvg-js (1200x630 OG per style + full A4 sheets) - Data-driven pSEO: ~40 styles across the full ISO A/B/C and US/Imperial sizes -> ~1,900 pages generated from one data table; JSON-LD (WebSite/HowTo/FAQ/Breadcrumb); selective noindex on low-demand size combos so thin pages don't dilute the site - Tooling: Bun (package manager + native-TS runner for all the generators) - Hosting: Cloudflare Pages, pure static (no worker)

There's also a custom editor (tweak spacing, color and margins, then export) and a virtual graph-paper canvas you can draw on, where the logical drawing space is decoupled from the pixel buffer so it stays crisp on any DPR.

One war story: because Cloudflare Pages serves pages at trailing-slash URLs, the client router saw /foo/ while my lookup table keyed on /foo - so pages rendered correctly server-side, then hydrated straight into a 404. Classic "works with JS off, breaks with JS on."

Happy to answer anything about the rendering pipeline or the static-generation setup.

genewitch•30m ago
is there a way to export the .svg so i can load them into a plotter to make the graph paper? Since you've expended all the effort to ensure proper sizing and whatnot. It even looks like it has the same margins as my plotter!
chrisweekly•31m ago
Cool! Thanks for creating and sharing this!
ChrisMarshallNY•27m ago
Very cool.

However, on Safari, in the Mac, I don't see any graph on the first two (standard North-South/East-West graph).

I do see the isometric and hexagonal ones, though. Maybe the lines are too thin/light.

smalltorch•24m ago
This is a nice sharply pointed tool. Thanks for the nice supply of pre configured styles!

Since Linux 6.9, LUKS suspend stopped wiping disk-encryption keys from memory

https://mathstodon.xyz/@iblech/116769502749142438
65•IngoBlechschmid•53m ago•8 comments

Launch HN: Manufact (YC S25) – MCP Cloud

https://manufact.com
40•pzullo•1h ago•21 comments

Android Developer Verification: Threat masquerading as protection

https://f-droid.org/2026/07/01/adv-malware.html
1264•drewfax•13h ago•522 comments

Show HN: Mail Memories – A desktop app to rescue photos from Gmail

https://mailmemories.com
57•ltiger•2h ago•17 comments

AI can't be listed as inventor on patent applications, Japan's top court rules

https://japannews.yomiuri.co.jp/science-nature/technology/20260306-314930/
146•mushstory•2h ago•56 comments

How to ask for help from people who don't know you

https://pradyuprasad.com/writings/how-to-ask-for-help/
68•FigurativeVoid•2h ago•3 comments

German button maker searched rivers of American Midwest for valuable shells

https://www.smithsonianmag.com/smithsonian-institution/how-one-german-button-maker-searched-the-r...
60•bookofjoe•4d ago•15 comments

Is One Layer Enough? A Single Transformer Layer Matches Full-Parameter RL Train

https://arxiv.org/abs/2607.01232
70•tcp_handshaker•4h ago•15 comments

PeerTube is a free, decentralized and federated video platform

https://github.com/Chocobozzz/PeerTube
71•doener•5h ago•9 comments

Show HN: ZeroFS – A log-structured filesystem for S3

https://www.zerofs.net/
69•Eikon•2h ago•35 comments

Kimi K2.7 Code is generally available in GitHub Copilot

https://github.blog/changelog/2026-07-01-kimi-k2-7-is-now-available-in-github-copilot/
306•unliftedq•11h ago•128 comments

Hazel (YC W24) Is Hiring for Our Largest Government Contract

https://www.ycombinator.com/companies/hazel-2/jobs/3epPWgu-full-stack-engineer-ts-sci
1•augustschen•3h ago

The Egg Bandits Made a Thousand Times the Fine They Just Paid for Price Fixing

https://www.thebignewsletter.com/p/crime-pays-the-egg-bandits-made-a
111•toomuchtodo•2h ago•30 comments

The fall of the theorem economy

https://davidbessis.substack.com/p/the-fall-of-the-theorem-economy
173•varjag•8h ago•73 comments

The primary purpose of code review is to find code that will be hard to maintain

https://mathstodon.xyz/@mjd/115096720350507897
181•ColinWright•4h ago•108 comments

Show HN: CLI tool for detecting non-exact code duplication with embedding models

https://github.com/rafal-qa/slopo
19•rkochanowski•1h ago•5 comments

Oomwoo, an open-source robot vacuum you build yourself

https://makerspet.com/blog/building-an-open-source-robot-vacuum-meet-oomwoo/
422•devicelimit•15h ago•82 comments

ZCode – Harness for GLM-5.2

https://zcode.z.ai/en
479•chvid•18h ago•320 comments

Show HN: A graph paper generator that renders vector PDFs in the browser

https://freegraphpaper.net/
29•lam_hg94•2h ago•6 comments

Show HN: Claudoro, Pomodoro timer embedded in the Claude Code statusline

https://github.com/emson/claudoro
23•emson•1d ago•19 comments

Vite+ Beta

https://voidzero.dev/posts/announcing-vite-plus-beta
168•Erenay09•4h ago•98 comments

CursorBench 3.1

https://cursor.com/evals
109•handfuloflight•10h ago•68 comments

The Meadows of Medieval Summer

https://www.historytoday.com/archive/out-margins/meadows-medieval-summer
11•lermontov•6d ago•9 comments

WinPE as a stateless harness for Windows driver testing and fuzzing

https://bednars.me/blog/winpe-harness
46•piotrbednarsalt•3d ago•2 comments

Germany’s Infineon opens major chip plant as EU seeks tech autonomy

https://www.rfi.fr/en/international-news/20260702-germany-s-infineon-opens-major-chip-plant-as-eu...
92•giuliomagnifico•3h ago•22 comments

Senior SWE-Bench: open-source benchmark that assesses agents as senior engineers

https://senior-swe-bench.snorkel.ai/
126•matt_d•13h ago•94 comments

Comparing Fable and 10 other LLMs on refactoring a LangGraph god node

https://wtf.korridzy.com/twilight-of-the-gods/
21•Korridzy•2h ago•8 comments

Winamp Skin Museum

https://skins.webamp.org
78•sarah-robiin•3h ago•40 comments

Asymmetric Quantization: Near-Lossless Retrieval with 97% Storage Reduction

https://www.mixedbread.com/blog/asymmetric-quant
82•breadislove•2d ago•30 comments

Bring back crappy forums

https://tedium.co/2026/07/01/online-web-forums-retrospective/
463•pentagrama•13h ago•293 comments