Live data from Hacker News

Launch HN: Onedoc (YC W24) – A better way to create PDFs

github.com

41–50 of 191 posts

Re: Launch HN: Onedoc (YC W24) – A better way to create PDFs

#41
post #28

Earlier quoted context omitted.

I'm with you.. We ended up writing a similar wrapper around https://github.com/jung-kurt/gofpdf library. We haven't open sourced it yet. But it's made it a lot easier to deal with rendering a PDF, especially over pagebreaks ect.

Yes, page breaks are probably the most significant difference between the layout of a web page and a PDF document, and thereby a major drawback when using HTML-to-PDF. There is little to no tooling for this in the web. If you want granular control over how your PDF will look with content that is more than one page long, you will have a hard time using html.

That's what we are trying to solve at Onedoc, we want developers to be able to have full control over the PDF layout as they write content. react-print is built with the intention of creating the illusion that React was meant for PDFs.

Re: Launch HN: Onedoc (YC W24) – A better way to create PDFs

#42
FYI: the open source state of the art in this area is Playwright (the successor to Puppeteer) with Paged.js (https://pagedjs.org/). I highly recommend that everyone check out and donate to paged.js, it's a fantastic project with lots to like. It certainly blows commercial alternatives like Prince XML out of the water.

That forms a solid foundation that I find it hard to imagine paying for. The things where you might still command a premium are basically safety mechanisms/CI checks/library components that ensure the PDF renders correctly in the presence of variable-length content, etc. as well as maybe PDF-specific features like metadata and fillable forms. Naive ways to format headers, footers, tables/grids/flexboxes etc. often fail in PDFs because of unexpected layout complications. So having a methodology, process, and validation system for ensuring that a mission critical piece of information appears on a PDF in the presence of these constraints could be attractive.

Re: Launch HN: Onedoc (YC W24) – A better way to create PDFs

#43

We're using Gotenberg[1] to convert a rendered web page (with Elixir/Phoenix, in our case) to PDF. Works like a charm and we can use our existing frontend code/styling (including SVG graph generators) which is a huge bonus. 1: https://gotenberg.dev/

We actually experimented with Gotenberg! Ultimately it is a layer on top of Chromium for conversion and we were dissatisfied with the results. I am curious so as to how are you handling assets and other static media / attachments: do you embed everything in a single HTML file or do you use some kind of bucketing system to resolve URLs?

Re: Launch HN: Onedoc (YC W24) – A better way to create PDFs

#44
post #4

May be this is just me but this looks extremely costly to me! It will cost $2,500 to generate 50,000 PDFs. Are edits/corrections additional cost?

This is a good point, and we are still trying to figure out how to price things fairly. Depending on the type of PDF, whether it is a simple receipt or a large multi-pages report, associated costs are very different on our side. At this time, we rely on other proprietary software that we are aiming to replace but that incur high costs on our side as well. Edits and corrections on generated PDFs is not provided as the…

As a point of reference on pricing, convertAPI charges $0.05 per document conversion at their most expensive tier, and with any level of fixed commitment ($80 - $300 per month) it goes down to $0.016-0.006 per document.

Their PDF conversion is pretty good (I use it for PPT/Word -> PDF conversion), though your product is obviously different and has different/better capabilities for programmatic PDF creation. Still, a reference point.

Pricing page: https://www.convertapi.com/prices

Re: Launch HN: Onedoc (YC W24) – A better way to create PDFs

#45
post #38

Earlier quoted context omitted.

Yes, our focus is on programmatic interactions with PDFs, form filling is on our roadmap, alongside programmatic digital signature and many more.

Amazing, is there anywhere I can follow along to find out when form filling will be available?

Sure! Feel free to join our Discord, we post announcements as soon as new features are released. You can also ask for features, we prioritise these requests with enterprise customer's in our development roadmap.

Re: Launch HN: Onedoc (YC W24) – A better way to create PDFs

#46

May be this is just me but this looks extremely costly to me! It will cost $2,500 to generate 50,000 PDFs. Are edits/corrections additional cost?

We use https://www.api2pdf.com/pricing/ and it's priced per bandwidth and usage - ($.001 per mb bandwidth and $0.00019551 per second of computation)

You can choose which API to use: Headless Chrome, Wkhtmltopdf, Libreoffice, etc.

Re: Launch HN: Onedoc (YC W24) – A better way to create PDFs

#47

Can we not have an alternative to PDFs? I get that they're more standardized but why would everyone let adobe have the hammer for a file type that's so important

PDF is an open format in the sense that you don't need to pay Adobe a license fee for generating PDFs, or for reading and rendering PDFs. The format is fully documented, although the specification is controlled by Adobe.

Re: Launch HN: Onedoc (YC W24) – A better way to create PDFs

#48
post #42

FYI: the open source state of the art in this area is Playwright (the successor to Puppeteer) with Paged.js ( https://pagedjs.org/ ). I highly recommend that everyone check out and donate to paged.js, it's a fantastic project with lots to like. It certainly blows commercial alternatives like Prince XML out of the water. That forms a solid foundation that I find it hard to imagine paying for. The things where you migh…

We are currently experimenting with this approach. A good thing about paged.js is that we would be able to provide hot-reload and live preview of files without actually converting to PDF.

Your second point is very interesting, seems like some kind of .assert('text').isVisible() API. We may want to dig into that further!

Re: Launch HN: Onedoc (YC W24) – A better way to create PDFs

#49
post #42

FYI: the open source state of the art in this area is Playwright (the successor to Puppeteer) with Paged.js ( https://pagedjs.org/ ). I highly recommend that everyone check out and donate to paged.js, it's a fantastic project with lots to like. It certainly blows commercial alternatives like Prince XML out of the water. That forms a solid foundation that I find it hard to imagine paying for. The things where you migh…

(How) does it handle CMYK and print PDFs? I see images of printed books created by Paged.js, were these post-processed, or printed using a printer that does a best-effort RGB conversion?

Re: Launch HN: Onedoc (YC W24) – A better way to create PDFs

#50
How is this better than writing out an HTML file, then using headless chrome to export to PDF, like this:

    "C:\Program Files\Google\Chrome\Application\chrome.exe" --headless --disable-gpu --print-to-pdf=C:\temp\foo.pdf --no-margins --print-to-pdf-no-header C:\temp\test.mhtml
Post reply on HN