[HowTo] Convert Webpage/HTML to PDF on Ubuntu Linux




Twitter:
Google+:

There are numerous ways one can convert a web page (HTML) to PDF. Here is how to do it in Linux.

You could just, select “Print” (in Firefox: File .. Print) and then select “Print to file” and the output “PDF”.

But some pages with lots of CSS, javascript and so on won’t be displayed correctly. For this, see the second method of converting webpages (html) to PDF (below).

Using wkhtmltopdf

To install wkhtmltopdf in Ubuntu, run the following command in a terminal:

sudo apt-get install wkhtmltopdf

Then, to convert a webpage to PDF, open a terminal and type this:

wkhtmltopdf ~/Desktop/bbc.pdf

Replacing and bbc.pdf with the website you want to convert to PDF / the name you desire for the converted PDF file.

The output of wkhtmltopdf is pretty good. Take a look:

wkhtmltopdf result

With wkhtmltopdf, you can disable the javascript on the page if you want, change the quality, orientation (portrait or landscape), and more. Too see everything wkhtmltopdf can do, type:

wkhtmltopdf –help…(read more)


Convert Word 2 PDF: Word to PDF Converter

Convert PowerPoint 2 PDF: PPT to PDF Converter

Convert Excel 2 PDF: Excel to PDF Converter

Convert an Image 2 PDF: Image to PDF Converter

Convert HTML 2 PDF: HTML to PDF Converter

More Tools: PDF Converter