Live data from Hacker News

Show HN: SnazzyPDF – Convert Any JSON Data to Beautifully Formatted PDFs

snazzypdf.com

1–10 of 19 posts

Show HN: SnazzyPDF – Convert Any JSON Data to Beautifully Formatted PDFs

#1
Hi HN,

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!

Show HN: SnazzyPDF – Convert Any JSON Data to Beautifully Formatted PDFs
snazzypdf.com

Re: Show HN: SnazzyPDF – Convert Any JSON Data to Beautifully Formatted PDFs

#2
Looks nice, well done.

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.

Re: Show HN: SnazzyPDF – Convert Any JSON Data to Beautifully Formatted PDFs

#3
Neat but as others are saying this is for a technical audience and there is a lot of other options for this.

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…

Re: Show HN: SnazzyPDF – Convert Any JSON Data to Beautifully Formatted PDFs

#4
I think this is great but you might need to think about your point of difference. I suspect you have a product here but it might need some refining.

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)

    # Create PDF document
    doc = SimpleDocTemplate(pdf_file, pagesize=letter)
    elements = []

    # Add title
    styles = getSampleStyleSheet()
    elements.append(Paragraph("JSON Data Report", styles['Title']))
    elements.append(Paragraph("\n", styles['Normal']))

    # Create table data
    table_data = [["Key", "Value"]]
    for key, value in data.items():
        table_data.append([str(key), str(value)])

    # Create table
    table = Table(table_data, colWidths=[200, 300])
    table.setStyle(TableStyle([
        ('BACKGROUND', (0, 0), (-1, 0), colors.grey),
        ('TEXTCOLOR', (0, 0), (-1, 0), colors.whitesmoke),
        ('ALIGN', (0, 0), (-1, -1), 'CENTER'),
        ('FONTNAME', (0, 0), (-1, 0), 'Helvetica-Bold'),
        ('FONTSIZE', (0, 0), (-1, 0), 14),
        ('BOTTOMPADDING', (0, 0), (-1, 0), 12),
        ('BACKGROUND', (0, 1), (-1, -1), colors.beige),
        ('TEXTCOLOR', (0, 1), (-1, -1), colors.black),
        ('ALIGN', (0, 0), (-1, -1), 'CENTER'),
        ('FONTNAME', (0, 1), (-1, -1), 'Helvetica'),
        ('FONTSIZE', (0, 1), (-1, -1), 12),
        ('TOPPADDING', (0, 1), (-1, -1), 6),
        ('BOTTOMPADDING', (0, 1), (-1, -1), 6),
        ('GRID', (0, 0), (-1, -1), 1, colors.black)
    ]))

    elements.append(table)

    # Build PDF
    doc.build(elements)
if __name__ == "__main__": create_pdf_from_json("input.json", "output.pdf")

Re: Show HN: SnazzyPDF – Convert Any JSON Data to Beautifully Formatted PDFs

#5
post #4

I think this is great but you might need to think about your point of difference. I suspect you have a product here but it might need some refining. 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…

That's awesome! Mind sharing the prompt you used? I'm working on something pretty similar but a little more complex—looking to convert from an Excel sheet to Markdown or JSON.

Re: Show HN: SnazzyPDF – Convert Any JSON Data to Beautifully Formatted PDFs

#6
post #4

I think this is great but you might need to think about your point of difference. I suspect you have a product here but it might need some refining. 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…

That's awesome! Mind sharing the prompt you used? I'm working on something pretty similar but a little more complex—looking to convert from an Excel sheet to Markdown or JSON.

Sure, here is the prompt.

Can you write me a program that can generate formatted PDFs from JSON? Preferably using the simplest of tools

Re: Show HN: SnazzyPDF – Convert Any JSON Data to Beautifully Formatted PDFs

#7
post #4

I think this is great but you might need to think about your point of difference. I suspect you have a product here but it might need some refining. 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…

Not really. The code, as is, doesn't run.

`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.

Re: Show HN: SnazzyPDF – Convert Any JSON Data to Beautifully Formatted PDFs

#8
post #4

I think this is great but you might need to think about your point of difference. I suspect you have a product here but it might need some refining. 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…

That's awesome! Mind sharing the prompt you used? I'm working on something pretty similar but a little more complex—looking to convert from an Excel sheet to Markdown or JSON.

If it was just that, I'd probably load onto a pandas df, then export the df to json. There's other ways, but this would be a simple enough way.

Check,

- https://pandas.pydata.org/pandas-docs/stable/reference/api/p...

- https://pandas.pydata.org/pandas-docs/stable/reference/api/p...

Try something like,

    import pandas as pd

    file_path = 'excel_file.xlsx'
    df = pd.read_excel(file_path, sheet_name='WORKSHEET NAME')
    df.to_json('output.json', orient='records', indent=4)

Re: Show HN: SnazzyPDF – Convert Any JSON Data to Beautifully Formatted PDFs

#10

Looks nice, well done. 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 extern…

Thanks for the feedback! You're right, many technical users could likely roll their own solution, and for one-off projects, that's a valid approach. However, after working on this for a while, I've found that building a more generic and flexible solution is definitely not a simple task. The goal with SnazzyPDF is to hide the more complicated bits like the layout and consistent formatting of deeply nested JSON, without the need for maintenance. It's aimed for the people who value saving time over building from scratch. I know, maybe it's not really for the most hacker-minded.

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.

Post reply on HN