<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: lam_hg94</title><link>https://news.ycombinator.com/user?id=lam_hg94</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Thu, 02 Jul 2026 20:45:10 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=lam_hg94" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by lam_hg94 in "Show HN: A graph paper generator that renders vector PDFs in the browser"]]></title><description><![CDATA[
<p>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.<p>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.<p>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%.<p>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.<p>Tech stack:<p>- 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)<p>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.<p>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."<p>Happy to answer anything about the rendering pipeline or the static-generation setup.</p>
]]></description><pubDate>Thu, 02 Jul 2026 13:30:45 +0000</pubDate><link>https://news.ycombinator.com/item?id=48761320</link><dc:creator>lam_hg94</dc:creator><comments>https://news.ycombinator.com/item?id=48761320</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48761320</guid></item><item><title><![CDATA[Show HN: A graph paper generator that renders vector PDFs in the browser]]></title><description><![CDATA[
<p>Article URL: <a href="https://freegraphpaper.net/">https://freegraphpaper.net/</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=48761294">https://news.ycombinator.com/item?id=48761294</a></p>
<p>Points: 77</p>
<p># Comments: 17</p>
]]></description><pubDate>Thu, 02 Jul 2026 13:29:09 +0000</pubDate><link>https://freegraphpaper.net/</link><dc:creator>lam_hg94</dc:creator><comments>https://news.ycombinator.com/item?id=48761294</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=48761294</guid></item><item><title><![CDATA[Show HN: New Pomodoro Timer]]></title><description><![CDATA[
<p>Article URL: <a href="https://www.pomoduck.com">https://www.pomoduck.com</a></p>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=45411173">https://news.ycombinator.com/item?id=45411173</a></p>
<p>Points: 1</p>
<p># Comments: 0</p>
]]></description><pubDate>Mon, 29 Sep 2025 07:28:40 +0000</pubDate><link>https://www.pomoduck.com</link><dc:creator>lam_hg94</dc:creator><comments>https://news.ycombinator.com/item?id=45411173</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45411173</guid></item></channel></rss>