|
|
|
|
|
by Titou325
846 days ago
|
|
Hey, Titouan part of the Onedoc team. You are absolutely correct and most existing tools do leverage a browser (sometimes headless) to convert HTML to PDF. However, browser's CSS print specification implementation is severely lacking and layout options are poor to say the least. There is a second option using libraries that abstract part of the layout process such as react-pdf but although it uses the JSX syntax, you can't port existing HTML components easily. Onedoc is able to take HTML + CSS as well, quite similarly to what you can do with Resend. React is mostly an abstraction layer that allows you to take advantage of all the existing SSG toolset (e.g. charts, existing frontend components, ...) without having to write things from scratch. The process is thus indeed similar to Astro if you omit any client: directives. We have put up a small comparison at onedoclabs.com/why-onedoc to show a bit better what capabilities this opens. Hope this clarifies things! |
|
Sounds like React JSX rendering while omitting any client-side JS could benefit from forking off React itself, no?
OTOH it's up to the user of course to choose components that do not require client JS and diagnose problems caused by components relying on it.