How To Install webkit2pdf on Debian 9

In this tutorial we learn how to install webkit2pdf on Debian 9. webkit2pdf is export web pages to PDF files or printer

Introduction

In this tutorial we learn how to install webkit2pdf on Debian 9.

What is webkit2pdf

webkit2pdf is:

Webkit2pdf is a little GTK+ tool designed to fetch web pages and export them to numbered PDF files (or to print them directly).

Despite being small it sports a minimalistic GUI for previewing the final result before exporting or printing. It can also work without GUI if the right parameters are supplied on invocation.

Specifying paper size and output directory is also supported.

There are three methods to install webkit2pdf on Debian 9. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install webkit2pdf Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install webkit2pdf using apt-get by running the following command:

sudo apt-get -y install webkit2pdf

Install webkit2pdf Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install webkit2pdf using apt by running the following command:

sudo apt -y install webkit2pdf

Install webkit2pdf Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install webkit2pdf using aptitude by running the following command:

sudo aptitude -y install webkit2pdf

How To Uninstall webkit2pdf on Debian 9

To uninstall only the webkit2pdf package we can use the following command:

sudo apt-get remove webkit2pdf

Uninstall webkit2pdf And Its Dependencies

To uninstall webkit2pdf and its dependencies that are no longer needed by Debian 9, we can use the command below:

sudo apt-get -y autoremove webkit2pdf

Remove webkit2pdf Configurations and Data

To remove webkit2pdf configuration and data from Debian 9 we can use the following command:

sudo apt-get -y purge webkit2pdf

Remove webkit2pdf configuration, data, and all of its dependencies

We can use the following command to remove webkit2pdf configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge webkit2pdf

Dependencies

webkit2pdf have the following dependencies:

References

Summary

In this tutorial we learn how to install webkit2pdf package on Debian 9 using different package management tools: apt, apt-get and aptitude.