I've used flying saucer pdf[1] for this in the past, but the missing piece always seems to be a descent WYSIWYG template editor. Either open source or paid. Any suggestions on a web solution that allows non-devs to make great templates would be appreciated. Historically I've built something simple with Tiny and added a preview button to render, but that super clunky. [1] https://github.com/flyingsaucerproject/flyings…
Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS
71–80 of 94 posts
Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS
#72https://www.msweet.org/htmldoc/
It’s crazy fast, but doesn’t handle Unicode well or have much support for CSS.
Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS
#73Earlier quoted context omitted.
As the maintainer of wkhtmltopdf @ Odoo I can tell you it's not WebKit. Instead it's outdated WebKit from 2014 running on top of QT4 '^^
@monax Since you're the maintainer, I'll assume you no doubt will know more about it than me. But from what I (vaguely) recall, it's worse than that. Not at liberty to elaborate on exact details, but not so long ago I had to deal with wkhtmltopdf, when it turned out to be the (still preferred/recommended) PDF rendering solution as part of a major popular web middle-ware framework, at a large corporate client. I was r…
I find the bug you mentioned interesting, and I'll promptly investigate to determine if it still exists. If I remember correctly, there's a --dpi option that may have already resolved this issue.
I share your concern about the code's state; it's problematic as it's currently leaking file descriptors and memory all over the place. We experimented with Puppeteer as an alternative, but its speed and memory usage were too high for our specific use case, so we're currently stuck with the current wkhtmltopdf.
Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS
#74Earlier quoted context omitted.
@monax Since you're the maintainer, I'll assume you no doubt will know more about it than me. But from what I (vaguely) recall, it's worse than that. Not at liberty to elaborate on exact details, but not so long ago I had to deal with wkhtmltopdf, when it turned out to be the (still preferred/recommended) PDF rendering solution as part of a major popular web middle-ware framework, at a large corporate client. I was r…
It seems you have more information about this situation than I do, as I recently took on the role of project maintainer and wasn't involved from the start. I find the bug you mentioned interesting, and I'll promptly investigate to determine if it still exists. If I remember correctly, there's a --dpi option that may have already resolved this issue. I share your concern about the code's state; it's problematic as it'…
I'm not even concerned all that much about the code's state itself, rather that it still shows up today. In situations it was probably never designed for. Adding to that, it now often appears wrapped inside some interfacing layer/code, binding it to whatever other software it is embedded in. But then only exposing part of wkhtmltopdf. Case in point, the --dpi option you mentioned (which indeed might fix the mentioned bug), was simply inaccessible through how the framework interfaced with wkhtmltopdf (which was a design cluster-F# in its own right).
However, the bigger elephant in the room for me is that the HTML/CSS support has changed considerably over the last decade, with wkhtmltopdf pretty much stuck in time. It's just pretty much a random hit or miss when it comes to rendering any modern web content. Only for carefully crafted (legacy) content does it still make a good use case.
I won't blame wkhtmltopdf for that though, but I sure haves questions for those who apparently still consider it a valid tool for integration into modern web frameworks. I guess part of that comes down to unintentional ignorance, not knowing what they are actually integrating. Another reason might be that I've not seen much of a better sort-of-drop-in replacement for wkhtmltopdf, so people stick to it far a lack of a proper alternative. Maybe some of the people who integrated wkhtmltopdf elsewhere are even very well aware of all the limitations/dangers. Still, little use of that if that knowledge is lost on those who subsequently end up using it, primarily just as consumers.
Puppeteer is a very different beast in its own right, regardless which engine/browser you end up using. But if more modern html/css features are required, it can be a valid replacement (regardless of numerous downsides nonetheless). Still, I (also) doubt that it will work as a good replacement for all of wkhtmltopdf's use cases.
If nothing else, I got some free entertainment out of it all .. watching the shocked expression on the faces of top-level suits, when I explained to them what they had been blissfully unaware of. They had good reasons to be worried, because this exposure should have been caught by their rigorous technology-review procedures. However, it had been an ad-hock dependencies that was introduced as part of a legit feature request. The dev had probably never even noticed, because it appeared as a native framework functionality (hiding any obvious reference to using wkhtmltopdf under the hood). Anyways, wkhtmltopdf is certainly not to be blamed for that.
Still, it does illustrate the dangers of modern-day software integration. I think especially in (web) frameworks, where the name of the game often appears to have turned towards a popularity contest (with competing frameworks) and "making things as simple as possible". Something about a road paved with good intentions.
Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS
#75I've used flying saucer pdf[1] for this in the past, but the missing piece always seems to be a descent WYSIWYG template editor. Either open source or paid. Any suggestions on a web solution that allows non-devs to make great templates would be appreciated. Historically I've built something simple with Tiny and added a preview button to render, but that super clunky. [1] https://github.com/flyingsaucerproject/flyings…
Oh wow. I started Flying Saucer 20 years ago. I’m amazed it’s still in use.
Thanks for your long lived contribution.
Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS
#76Earlier quoted context omitted.
TeX at this point has entered computing legend. It has such a long and storied life. But it’s old. We need something modern, that represents current ways to make documents from code. And that way is CSS. I bet within my lifetime most scientific publications will move to a PDF tool that ingests CSS. We just need to find something open-source and clean that has no missing functionality.
What about https://typst.app ?
Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS
#77Earlier quoted context omitted.
What about https://typst.app ?
Is it open source ?
Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS
#78Earlier quoted context omitted.
TeX at this point has entered computing legend. It has such a long and storied life. But it’s old. We need something modern, that represents current ways to make documents from code. And that way is CSS. I bet within my lifetime most scientific publications will move to a PDF tool that ingests CSS. We just need to find something open-source and clean that has no missing functionality.
What about https://typst.app ?
Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS
#79Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS
#80@kelvinzhang Quite frankly, htmldocs is the exact project i'm looking for months. I'm tired of word and same alternative and wanted something i can write html and css3 to convert to PDF. You do and in a beautiful way ! Some question : i just want to use your product be also need to be sure my doc will by avaivable in futur. what's your plan ? - opensource ? - community/enterprise ? - close source but a docker version…
The web version is just the initial step, and will likely open source for people who want to self-host and to increase adoption. For pricing, will probably adopt a model similar to Overleaf where it’s free for most users and maybe charge for team collaboration or have an enterprise license.