Show HN: SnazzyPDF – Convert Any JSON Data to Beautifully Formatted PDFs
27 points| patafemma | 1 year ago |snazzypdf.com
I'm a freelance developer, and I built SnazzyPDF in my spare time to solve a problem I encountered frequently: converting structured data into PDF documents. The existing solutions I found either required manually creating a template or forced you to transform your data into a specific structure. I wanted a tool where you could simply input arbitrary JSON data and get a decent-looking document out. That's why I built SnazzyPDF.
* Works with any JSON: No need to restructure your data. SnazzyPDF handles (almost) any JSON data, including deeply nested arrays and objects.
* Use REST API or drag & drop web interface.
* Zero configuration: Convert your JSON to a finished PDF in seconds. Start simple and incrementally add customization.
* Save time: Automate PDF generation for reports, logs, or other structured data. No more manual formatting or custom export workflows.
* Free tier for testing or light use, paid plans that scale for larger needs.
I'd love to hear feedback from the HN community. Check it out, and let me know what you think! I'm happy to answer any questions. Thanks!
xupybd|1 year ago
I asked Claude to create me something to do this. It worked first go.
import json from reportlab.lib.pagesizes import letter from reportlab.platypus import SimpleDocTemplate, Table, TableStyle, Paragraph from reportlab.lib.styles import getSampleStyleSheet from reportlab.lib import colors
def create_pdf_from_json(json_file, pdf_file): # Read JSON data with open(json_file, 'r') as file: data = json.load(file)
if __name__ == "__main__": create_pdf_from_json("input.json", "output.pdf")patafemma|1 year ago
Where it gets tricky is handling more complex data structures: deeply nested objects and arrays, different date formats, varying element types and adapting the layout based on the structure. SnazzyPDF's layout engine automates those decisions. The configuration options are still limited but that's what I'm focusing on improving next.
its_down_again|1 year ago
rovr138|1 year ago
`data` isn't defined. It missed loading the json into it.
Edit here,
I've been testing some models today. It's a great solution, easy to fix. I like the package it chose.
My head is simply on evaluating things and code. Criticizing the model and output, not directed at you.
godzillabrennus|1 year ago
I could see some devs opting to use an open source software version and electing to host with your cloud hosting when devs do not want to bother keeping it securely hosted.
Small market though. Better to create a bunch of freemium sites to help normies do things with pdfs like convert them to docx or other image types… normies pay a fee to do a bunch of them, a big one, or to unlock a password protected one…
patafemma|1 year ago
Open sourcing the project is not something that I have decided against. Maybe it could drive more adoption. I've found Chrome to be the best tool for PDF creation in this use case, so the API is actually running a pool of Chrome instances that are used for the rendering. This makes self-hosting slightly more complicated.
sylviangth|1 year ago
2Gkashmiri|1 year ago
mstijak|1 year ago
https://cx-reports.com/
https://cx-reports.com/templates/invoices
aszen|1 year ago
aszen|1 year ago
RadiozRadioz|1 year ago
Though I worry about the narrowness and "whip-up-ability" for the price and target market. It's a small enough featureset in a domain that skews technical, many would be inclined to template an HTML table to wkhtml2pdf and call it a day. Maybe they'd open source it after. I suppose you're aiming for the people who wouldn't do that, but would still expend the effort of integrating with an external HTTP API (and paying monthly for it)
I know a measure of a project's usefulness is "if a HN commenter says they could make it in a weekend but haven't, you've got something!", so maybe I'm wrong.
P.s. 50 pages / 1Mb per PDF is ludicrously far too small for a business tier.
patafemma|1 year ago
Regarding the page/file size limits, that's helpful input. I have set the current limits based on my own experience but haven't had much opportunity to validate them yet. I’ll definitely take another look and try to find a good balance.
guyfromfargo|1 year ago
[deleted]