Re:Launch HN: Onedoc (YC W24) – A better way to create PDFs
by ak217 on Monday March 11, 2024 @02:54PM
(#39671992)
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.
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)