Live data from Hacker News

Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS

htmldocs.com

21–30 of 94 posts

Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS

#21

Oh, is this like a paid version of pandoc?

You can probably get away with Pandoc depending on your use-case, this is primarily built for:

- having a web editor interface without needing to re-run a CLI command

- people who don't want to deal with packages/dependencies on their own system

- users that just want an affordable and easy-to-use API to generate PDF documents instead of having to set up their own server task queue worker system which would usually cost more

- in the future, teams that want to collaborate together on a document

Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS

#22
post #5
post #3

Some people might be interested in https://weasyprint.org/

Interesting, I'm looking for a solution to render PDFs at the moment, it looks like that one actually does not use chromium, unlike most tools that I've seen that render HTML to PDFs. What's the advantage? Is it more lightweight / faster / reliable?

We're using weasyprint to generate pdf files from data of our websites. It works great, made huge progress those past few years.

Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS

#24
I have been building a custom PDF generator for my Remarkable tablet using jsPDF. Something that has surprised me is how hard it is to keep the file size small with tools like this.

Its fun and fast to generate things but when you get to 1000+ pages for something like a year long planner the document can quickly balloon past 70 MB.

So far I have kept my 750-1300 page planner between 3-7 MB.

I will give this a try and compare.

Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS

#25

I have been building a custom PDF generator for my Remarkable tablet using jsPDF. Something that has surprised me is how hard it is to keep the file size small with tools like this. Its fun and fast to generate things but when you get to 1000+ pages for something like a year long planner the document can quickly balloon past 70 MB. So far I have kept my 750-1300 page planner between 3-7 MB. I will give this a try and…

Please report back and let us know!

Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS

#27
Prince has been doing this for 20 years and is in my opinion the gold standard, with good support for footnotes, endnotes, page headers and other little extensions that are only relevant for printing. https://www.princexml.com/

But I'll be giving this a try!

Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS

#28
post #16
post #5

Earlier quoted context omitted.

Interesting, I'm looking for a solution to render PDFs at the moment, it looks like that one actually does not use chromium, unlike most tools that I've seen that render HTML to PDFs. What's the advantage? Is it more lightweight / faster / reliable?

wkhtmltopdf[1] uses the QT WebKit renderer. I used it as part of my job hut work-flow with pandoc to get pdf resumes from markdown. It got me a job, so there's that. [1] https://wkhtmltopdf.org/

I used the same [0], however wkhtmltopdf stopped working correctly at some point, so I am stuck printing the pdf manually with chrome at the moment. Probably an update that broke some stuff.

[0] https://blog.horaceg.xyz/posts/resume/

Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS

#29
See also native CSS support for paged media:

https://www.w3.org/TR/css-page-3/

When I looked into it several years ago, browser support for some critical features wasn't there yet. Not sure whether this has improved.

In principle, this would be a great alternative to proprietary PDF rendering libraries which require you to design your document completely in (e.g. Java) code, and to the typical LaTeX approach. You really appreciate the elegance of HTML+CSS once you had the misfortune of having to do a simple fucking table in LaTeX.

Re: Show HN: Htmldocs – Typeset and generate pdfs with HTML/CSS

#30
post #29

See also native CSS support for paged media: https://www.w3.org/TR/css-page-3/ When I looked into it several years ago, browser support for some critical features wasn't there yet. Not sure whether this has improved. In principle, this would be a great alternative to proprietary PDF rendering libraries which require you to design your document completely in (e.g. Java) code, and to the typical LaTeX approach. You rea…

Support is getting better, there is also a poly fill of sorts https://pagedjs.org
Post reply on HN