html -> pdf conversion + pdf generation

Polytropon freebsd at
Thu Aug 3 03:37:30 UTC 2017

On Wed, 2 Aug 2017 23:27:52 -0400, William Dudley wrote:
> HTML conversion to anything is messy and inaccurate in my experience.

HTML is not "pixel perfect" and not "print ready" even though
there are means to achieve good formatting in CSS. However, just
let the user have a standard paper format like ISO A4 instead
of US Letter and you'll have the chance to get quite surprising
results. :-)

I think web browsers whose primary function is to render HTML
(and CSS and JS and images and media, to a certain extent) are
the best tool to generate PDFs from web pages (which is a good
term to summarize what "HTML" in the subject refers to, because
it _never_ is "just HTML"), and the browser's print function
can easily create PDF files, even with "extensions" like headers
or footers with title or page number. It probably is even possible
to use this approach in a "headless way", i. e., without user
interaction and driven from command line, so converting bigger
amounts of web pages to PDF can be done automatically.

This is all of course nonsense when you are a VC-backed startup
in the market of B2C leverage interactive social BS ninja agile
mobile web big data NoQSL real-time ad revenue organic unicorn
devops service-as-a-service service and you want to make yourself
fully dependent on 3rd party tools for anything you do... ;-)

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list