Best command line tool to convert a webpage to a pdf file?

Peter Flynn peter at silmaril.ie
Sat Feb 10 20:45:47 UTC 2018


On 10/02/18 07:15, Michael Welle wrote:
> Hello,
> 
> Peng Yu <pengyu.ut at gmail.com> writes:
> 
>> Hi, I have tried wkhtmltopdf. But it can not always guarantee to
>> generate the pdf correctly. Does anybody know a tool that can generate
>> a pdf from a URL reliably?
> 
> currently I'm experimenting with changing my slide producing process
> from Org -> PDF -> HTML to Org -> HTML -> PDF. For the last step
> https://github.com/astefanutti/decktape looks promising. I use the
> pre-prepared docker container.

Install the Vivaldi browser. It has a neat capture facility designed for
screenshotting which creates a JPG or PNG from the *whole* page (ie tall
and narrow)...but then it's easy to cut it up and make a PDF.

It won't of course be a real typeset PDF...for that you would indeed
have to use a renderer like *htmltopdf but the problem is that they are
really not enabled for modern HTML5 pages: the markup is simply too sloppy.

///Peter





More information about the ubuntu-users mailing list