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

NoOp glgxg at sbcglobal.net
Mon Feb 12 02:00:40 UTC 2018


On 02/10/2018 12:45 PM, Peter Flynn wrote:
> 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
> 
> 

Also not CLI, but:

Opera Browser
Version information
Version:	51.0.2830.26 - Opera is up to date
Update stream:	Stable
System:	Ubuntu 16.04.3 LTS (x86_64; GNOME-Flashback:Unity)

Page|Save as PDF

Does a nice job of saving to a single page PDF.

opera-stable:
  Installed: 51.0.2830.26
  Candidate: 51.0.2830.26
  Version table:
 *** 51.0.2830.26 500
        500 https://deb.opera.com/opera-stable stable/non-free amd64
Packages
        100 /var/lib/dpkg/status

Opera comes in a pre-packaged deb: https://www.opera.com/ and will
automatically set up the deb.opera.com repository for updates upon install.






More information about the ubuntu-users mailing list