How To Install pkpgcounter on Debian 9

In this tutorial we learn how to install pkpgcounter on Debian 9. pkpgcounter is computes number of pages or quantity of ink needed to print documents

Introduction

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

What is pkpgcounter

pkpgcounter is:

pkpgcounter is a generic Page Description Language parser which can either count the number of pages or compute the percent of ink coverage needed to print various types of documents. It is written in Python.

It currently recognizes the following file formats :

  • PostScript (both DSC compliant and binary)
  • PDF
  • PCL3/4/5
  • PCLXL (aka PCL6)
  • DVI
  • OpenDocument (ISO/IEC DIS 26300)
  • Microsoft Word (c) (tm) (r) (etc…)
  • Plain text
  • TIFF
  • Several other image formats
  • ESC/P2
  • Zenographics ZjStream
  • Samsung QPDL (aka SPL2)
  • Samsung SPL1
  • ESC/PageS03
  • Brother HBP
  • Hewlett-Packard Lightweight Imaging Device Interface Language
  • Structured Fax
  • Canon BJ/BJC
  • ASCII PNM (Netpbm)

The ten latter ones, as well as some TIFF documents, are currently only supported in page counting mode.

pkpgcounter is often used in combination with print accounting solutions like PyKota or JasMine.

There are three methods to install pkpgcounter 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 pkpgcounter Using apt-get

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

sudo apt-get update

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

sudo apt-get -y install pkpgcounter

Install pkpgcounter Using apt

Update apt database with apt using the following command.

sudo apt update

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

sudo apt -y install pkpgcounter

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

sudo aptitude -y install pkpgcounter

How To Uninstall pkpgcounter on Debian 9

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

sudo apt-get remove pkpgcounter

Uninstall pkpgcounter And Its Dependencies

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

sudo apt-get -y autoremove pkpgcounter

Remove pkpgcounter Configurations and Data

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

sudo apt-get -y purge pkpgcounter

Remove pkpgcounter configuration, data, and all of its dependencies

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

sudo apt-get -y autoremove --purge pkpgcounter

Dependencies

pkpgcounter have the following dependencies:

References

Summary

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