May I ask, why do we still need PDFs? I know they are still popular, I just don't understand why.
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.
91–100 of 191 posts
May I ask, why do we still need PDFs? I know they are still popular, I just don't understand why.
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.
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.
May I ask, why do we still need PDFs? I know they are still popular, I just don't understand why.
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?
To give you an idea, this is the kind of PDF files we generate that way: https://assets.walterliving.com/documents/walter-charlotte-d...
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…
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)
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!…
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.
This is a good problem to tackle. The hours i've sunk...
May I ask, why do we still need PDFs? I know they are still popular, I just don't understand why.