So are you using PrinceXML for your "completely separate engine where typography is a first-class citizen"?
Yes, we use an API layer on top of PrinceXML with additional polyfills to support modern features. This is a meh solution but it allowed us to iterate quickly and get to work with customers without building a full blown PDF engine firsthand. However building this engine ourselves is the key to reduced latency and overall better feature support. But we need to engage with our users first and see exactly where we shoul…
Launch HN: Onedoc (YC W24) – A better way to create PDFs
131–140 of 191 posts
Re: Launch HN: Onedoc (YC W24) – A better way to create PDFs
#132This looks interesting! Especially the Markdown and LaTeX components in react-print-pdf. Could be a great way to streamline technical documentation generation in codebases. Would love to see some examples of those in action.
Re: Launch HN: Onedoc (YC W24) – A better way to create PDFs
#133Earlier quoted context omitted.
The problem with chrome is the performance, it is very slow and uses a bunch of memory. There was a neat post here awhile ago about generating pdfs faster https://news.ycombinator.com/item?id=39379690
Indeed, speed is an issue (and it's hard to tackle). Additionally, when using Chrome, what you see is not always what you get. The layout often doesn't match expectations, especially with complex elements. It's ok for simple use cases, but for professional and scalable solutions, you usually need to switch to something else!!
The speed issue is also real, but you can scale horizontally by spawning other chromium instances (with gotenberg containers for ex). Not really efficient but it can certainly help alleviate most of the load...
Re: Launch HN: Onedoc (YC W24) – A better way to create PDFs
#134Earlier quoted context omitted.
Indeed, speed is an issue (and it's hard to tackle). Additionally, when using Chrome, what you see is not always what you get. The layout often doesn't match expectations, especially with complex elements. It's ok for simple use cases, but for professional and scalable solutions, you usually need to switch to something else!!
Yes, that's a hard issue for arbitrary/user-provided HTML pages. But with templates under your control, the context is different. Your designers do not have to trust Chrome; they can preview, tweak using print media queries, and provide robust templates that print to acceptable PDF. The speed issue is also real, but you can scale horizontally by spawning other chromium instances (with gotenberg containers for ex). No…
Re: Launch HN: Onedoc (YC W24) – A better way to create PDFs
#135This looks interesting! Especially the Markdown and LaTeX components in react-print-pdf. Could be a great way to streamline technical documentation generation in codebases. Would love to see some examples of those in action.
FWIW I’ve had some good results for technical documentation in RST markdown with sphinx for generation. You can develop latex header details for detailed templating for pdf output, etc. while keeping the html more simple if you want .
Re: Launch HN: Onedoc (YC W24) – A better way to create PDFs
#136The main issue is conflating templating and pdf generation. Using html to pdf solutions allow to do the templating in html, where it is pretty much a solved issue. And as many said, headless chrome is a robust html to pdf solution, even though it feel like a hack. But, yeah, there seems to be a lack of awareness about these options within corporations. So, kudos to you for addressing a genuine problem!
Typst is a typesetting language that makes programmatic layout and processing JSON input pretty darn simple. I make invoices by having a Typst template read line items from a JSON file. https://github.com/typst/typst
Re: Launch HN: Onedoc (YC W24) – A better way to create PDFs
#137Re: Launch HN: Onedoc (YC W24) – A better way to create PDFs
#138Earlier quoted context omitted.
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!
Or maybe some visual diffing based on expected output, based on the template/layout/theme used, since you'd want to perform this check on every pdf generated in prod (that has real, sensitive data) , not just in CI or testing mode, if you're aiming for critical docs. Cool project btw, congrats for the launch!
WHen dealing with layouts and assurance, I would go way out to verify as close to print as possible.
there's also a discussion about color to black/grayscale printing where you want a document to stay in character at grayscale.
these would be premium features I'd think.
Re: Launch HN: Onedoc (YC W24) – A better way to create PDFs
#139neat. are there similar services / libs for generating word docs? this is a recurring problem for many
Re: Launch HN: Onedoc (YC W24) – A better way to create PDFs
#140neat. are there similar services / libs for generating word docs? this is a recurring problem for many
We do not work with docx and never did it myself but: "DOCX Template API is a tool that allows you to dynamically generate MS Word documents by replacing custom properties using a JSON object that contains your data." I assume this is more or less similar to what you are looking for (?)