Live data from Hacker News

Generating PDF invoices using Lago

getlago.com

11–20 of 56 posts

Re: Generating PDF invoices using Lago

#11

Generating a custom PDF is just such a pain. You don't know it before you tried to do it. I've seen Anvil (a YC co) is building a product dedicated to this challenge, check it out!

If you're OK with paying ~£0.05 per PDF you can just use Adobe's PDF API where you supply a word document with {{ name }} like variables in it and a JSON file and you get back a PDF with it all filled in. This way you just change the styling and layout with a word editor.

Yep I should have added it as well in my prev answer, and doing it for a reasonable cost at scale is not trivial!

Re: Generating PDF invoices using Lago

#12

Generating a custom PDF is just such a pain. You don't know it before you tried to do it. I've seen Anvil (a YC co) is building a product dedicated to this challenge, check it out!

If I needed to generate PDFs, I would use ReportLab[1]. The core is open source and there's a great company behind it. The product appears easy and mature. What am I missing?

1. https://docs.reportlab.com/

Re: Generating PDF invoices using Lago

#13

Generating a custom PDF is just such a pain. You don't know it before you tried to do it. I've seen Anvil (a YC co) is building a product dedicated to this challenge, check it out!

I wrote some C# code a couple of years ago to generate PDF invoices. Has been running fine since then generating tens of thousands of PDFs. It was pretty straight forward back then, only annoying thing were page breaks when there were a lot of line items, but apart from that I would not consider it a "pain". What issue have you had? What do you mean by "custom"?

The pain in there is that every time you want to have a PDF generation system, you have to do the same stuff, it's not "complex" at all, but it definitely takes time, whatever the technology you use. On my experience, having ten thousand PDF generating at the same time was a very high load for our infrastructure and the cost was enormous, that is one of the main thing I'll focus on today : the scalability of it. It also depending on the way you create your template, hard coded with pixels or HTML!

Re: Generating PDF invoices using Lago

#15

Generating a custom PDF is just such a pain. You don't know it before you tried to do it. I've seen Anvil (a YC co) is building a product dedicated to this challenge, check it out!

I just use headless chromium to "print" a generated HTML page as a PDF, works great.

Lago actually use Gotenberg, it's very nice to manage the headless chromium state without any headache!

Re: Generating PDF invoices using Lago

#18

Generating a custom PDF is just such a pain. You don't know it before you tried to do it. I've seen Anvil (a YC co) is building a product dedicated to this challenge, check it out!

If you're OK with paying ~£0.05 per PDF you can just use Adobe's PDF API where you supply a word document with {{ name }} like variables in it and a JSON file and you get back a PDF with it all filled in. This way you just change the styling and layout with a word editor.

Yep, that’s a solution. But editing millions of invoices would cost way to much I guess. Depending on your company size and what you want to achieve though

Re: Generating PDF invoices using Lago

#19

Generating a custom PDF is just such a pain. You don't know it before you tried to do it. I've seen Anvil (a YC co) is building a product dedicated to this challenge, check it out!

I just use headless chromium to "print" a generated HTML page as a PDF, works great.

Did you face any implementation difficulties with your solution?

Re: Generating PDF invoices using Lago

#20

Generating a custom PDF is just such a pain. You don't know it before you tried to do it. I've seen Anvil (a YC co) is building a product dedicated to this challenge, check it out!

I just use headless chromium to "print" a generated HTML page as a PDF, works great.

My shot-scraper CLI tool has an option that can do exactly that: https://shot-scraper.datasette.io/en/stable/pdf.html

    shot-scraper pdf myfile.html -o output.pdf
Post reply on HN