How To Install xhtml2ps on Debian 11

In this tutorial we learn how to install xhtml2ps on Debian 11. xhtml2ps is HTML to PostScript converter (Tcl/Tk GUI frontend)

Introduction

In this tutorial we learn how to install xhtml2ps on Debian 11.

What is xhtml2ps

xhtml2ps is:

This program converts HTML directly to PostScript. The HTML code can be retrieved from one or more URLs or local files, specified as parameters on the command line. A comprehensive level of HTML is supported, including inline images, CSS 1.0, and some features of HTML 4.0.

This package provides an (outdated) GUI frontend to the html2ps converter.

This is our justification for the suggests list:

We suggest weblint-perl because it is the default method for checking HTML syntax (see Operations | Preferences).

We suggest lpr because it is the default printing command (see Operations | Preferences).

We suggest mailcap because see is the default command used to open the postscript viewer (see Operations | Preferences).

We suggest postscript-viewer because this package generates postscripts which can be viewed with postscript-viewer (see Operations | Preferences).

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

Install xhtml2ps Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install xhtml2ps

Install xhtml2ps Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install xhtml2ps

Install xhtml2ps 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 xhtml2ps using aptitude by running the following command:

sudo aptitude -y install xhtml2ps

How To Uninstall xhtml2ps on Debian 11

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

sudo apt-get remove xhtml2ps

Uninstall xhtml2ps And Its Dependencies

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

sudo apt-get -y autoremove xhtml2ps

Remove xhtml2ps Configurations and Data

To remove xhtml2ps configuration and data from Debian 11 we can use the following command:

sudo apt-get -y purge xhtml2ps

Remove xhtml2ps configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge xhtml2ps

Dependencies

xhtml2ps have the following dependencies:

References

Summary

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