Live data from Hacker News

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

github.com

91–100 of 191 posts

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

#91

May I ask, why do we still need PDFs? I know they are still popular, I just don't understand why.

There are many reasons behind it, to name a few: files are self-contained(*) and easily portable, can guarantee some security features, the format is easily extended, and the ecosystem is very large.

It seems that a better format should exist, but the fact that PDF is the de-facto for portable documents make it unlikely things can change overnight.

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

#92

Looks awesome, will keep this in mind - every so often you need to create complex documents in code, and it's always a pain. Doing it with a familiar modern programming interface would be nice.

Exactly, that's one of the main reasons we began working on this. We aim to bring the modern web technologies used for website design into the document world. This includes enabling the use of React and, of course, Tailwind, Chakra UI, etc.

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

#94

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?

Great question! We actually just use the static assets (stylesheets, images) from our public asset CDN. The generated HTML points to the latest version of those assets, which means we can always use all the latest styling/assets in our generated PDF files.

To give you an idea, this is the kind of PDF files we generate that way: https://assets.walterliving.com/documents/walter-charlotte-d...

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

#95
post #51

Earlier quoted context omitted.

(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?

I'm not sure - we don't do color correction on our PDFs because we don't have photos in them and color rendering is not mission critical - but paged.js is focused on the concern of layout for print media. I would imagine color rendering can be solved orthogonally to what paged.js does for you, as long as you specify the color data in CSS. I'm pretty sure paged.js will pass it through without messing with it, so you'r…

It's certainly an area with more depth than I anticipated when I first started getting into it. Adobe is still pretty much the only one that can get a PDF compliant with print standards.

As far as I know, there's no way to currently get colors adhering to print color profiles in CMYK out of browsers.

Indeed, if color correctness isn't mission critical, I can imagine that going with Paged.js can be a nice experience!

(Edit: in my experience so far, it's been really really hard to 'correct' colors from an existing PDF in a way that gets a satisfying end result---the colors are usually muted/washed out)

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

#97
Congratulations on the launch — it looks fantastic! My company is also developing a similar product. We've chosen to create a visual report designer that enables end-users (non-developers) to create and tweak PDF reports, and integrate with the existing IT infrastructure via the API. Our experience is that users want changes in reports very often and that it's best to allow them do it on their own.

https://www.cx-reports.com

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

#98
post #51

Earlier quoted context omitted.

I'm not sure - we don't do color correction on our PDFs because we don't have photos in them and color rendering is not mission critical - but paged.js is focused on the concern of layout for print media. I would imagine color rendering can be solved orthogonally to what paged.js does for you, as long as you specify the color data in CSS. I'm pretty sure paged.js will pass it through without messing with it, so you'r…

It's certainly an area with more depth than I anticipated when I first started getting into it. Adobe is still pretty much the only one that can get a PDF compliant with print standards. As far as I know, there's no way to currently get colors adhering to print color profiles in CMYK out of browsers. Indeed, if color correctness isn't mission critical, I can imagine that going with Paged.js can be a nice experience!…

I was curious and searched around and found this presentation: https://www.w3.org/Graphics/Color/Workshop/slides/Erias.pdf

You're right - although many of the building blocks are there, it appears there is no way to specify a colorspace or print profile when asking Chrome to emit a PDF (and I doubt the other browsers are any better). Skia (the PDF rendering engine that Chromium uses) actually supports colorspace transforms, but Chromium doesn't seem to hook that up to CSS or even support non-RGBA colors in its rendering pipeline.

Post reply on HN