<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Delwire</title>
    <description>The latest articles on DEV Community by Delwire (@delwire).</description>
    <link>https://dev.to/delwire</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4087289%2F3db1e0d5-8a2d-473c-b512-284da8275415.png</url>
      <title>DEV Community: Delwire</title>
      <link>https://dev.to/delwire</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/delwire"/>
    <language>en</language>
    <item>
      <title>Why does every PDF API boot an entire Chrome browser to render an invoice?</title>
      <dc:creator>Delwire</dc:creator>
      <pubDate>Thu, 20 Aug 2026 23:39:27 +0000</pubDate>
      <link>https://dev.to/delwire/why-does-every-pdf-api-boot-an-entire-chrome-browser-to-render-an-invoice-1dnb</link>
      <guid>https://dev.to/delwire/why-does-every-pdf-api-boot-an-entire-chrome-browser-to-render-an-invoice-1dnb</guid>
      <description>&lt;p&gt;Most HTML-to-PDF services run headless Chromium farms. That works, but&lt;br&gt;
it's heavy. Cold starts, big containers, and for invoice-shaped documents&lt;br&gt;
it's overkill. I wanted to see how far pure JS could go, so I built the&lt;br&gt;
render engine for DocPuffin on pdf-lib instead.&lt;/p&gt;

&lt;p&gt;The model is template + data, not HTML. You POST a template id and a JSON&lt;br&gt;
payload, the function lays out the document programmatically and streams&lt;br&gt;
the PDF back:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -X POST https://docpuffin.com/api/render \
  -H "Content-Type: application/json" \
  -d '{"template":"invoice-eu","data":{"invoice":{"number":"2026-1042"}}}'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Server-side render time is about 35ms because there's no browser to boot,&lt;br&gt;
just deterministic layout code. The function is pinned to fra1, Frankfurt,&lt;br&gt;
and nothing is stored. The payload lives in memory for the render and&lt;br&gt;
then it's gone. That matters to me because the documents I generate are&lt;br&gt;
full of European customer data and I'd rather they never cross the&lt;br&gt;
Atlantic.&lt;/p&gt;

&lt;p&gt;The first templates are an EU-style invoice and a receipt, with fields&lt;br&gt;
mapped the way Fortnox and Visma workflows expect them. Org numbers, VAT&lt;br&gt;
rates, payment references. I'm in Sweden, that's the paperwork I know.&lt;br&gt;
These mappings are a formatting convenience, to be clear, not tax or&lt;br&gt;
compliance advice.&lt;/p&gt;

&lt;p&gt;You can try the real engine on the landing page. The demo box calls the&lt;br&gt;
same function the API exposes. Edit the JSON, hit render, download the&lt;br&gt;
PDF. Try to break it. Oversize payloads, bad JSON and unknown templates&lt;br&gt;
should all come back as clean 4xx errors, and if you find a way to make&lt;br&gt;
it do something uglier I genuinely want to know.&lt;/p&gt;

&lt;p&gt;Where this honestly is: preorder stage. The engine is live, but API keys,&lt;br&gt;
docs and the template editor ship in the coming weeks. I'm selling&lt;br&gt;
founding credit packs first, $39 once for 5,000 renders, refundable until&lt;br&gt;
launch with one email, because I'd rather find out from real developers&lt;br&gt;
whether this deserves to exist before building the rest of it. Credits&lt;br&gt;
rather than a subscription, because bursty workloads shouldn't pay&lt;br&gt;
monthly rent.&lt;/p&gt;

&lt;p&gt;What I'd love from dev.to: which document types you'd actually need&lt;br&gt;
beyond invoices and receipts, and whether template + JSON is the right&lt;br&gt;
abstraction or you'd rather bring your own HTML.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docpuffin.com/?utm_source=devto&amp;amp;utm_campaign=gate-b" rel="noopener noreferrer"&gt;https://docpuffin.com/?utm_source=devto&amp;amp;utm_campaign=gate-b&lt;/a&gt;&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>node</category>
      <category>api</category>
      <category>startup</category>
    </item>
  </channel>
</rss>
