SVG in Custom PDF Templates
summary
Exports SVG from the browser, posts it as multipart to a Clojure backend built with reagent/re-frame, converts SVG to PNG with a Batik wrapper inside pdfboxing + Batik render (had to scale up images to avoid fuzziness), injects PNGs and field values into a PDF template, flattens the form, stores the PDF on S3 and returns a pre-signed S3 URL for display in an iframe. End-to-end takes about 6 seconds.
AI-written summary · about
chapters (4)
- 0:00Project introduction
- 1:32Generating chart images
- 2:57Populating and flattening PDF
- 3:52Rendering report in browser








