pstotext command not found

In this troubleshooting guide we learn how to fix pstotext command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

pstotext: command not found

or when using sudo you get the following error message

sudo: pstotext: command not found

Solutions to pstotext: command not found

How To Fix pstotext: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu pstotext is provided by pstotext package.

pstotext is:

pstotext extracts text (in the ISO 8859-1 character set) from a PostScript or PDF (Portable Document Format) file. Thus, pstotext is similar to the ps2ascii program that comes with ghostscript. The output of pstotext is however better than that of ps2ascii, because pstotext deals better with punctuation and ligatures.

To fix this problem, we can install more using the command below.

sudo apt-get -y install pstotext

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install pstotext.

sudo apt -y install pstotext

Or if you have aptitude installed you can use the following command.

sudo aptitude install pstotext

Summary

In this tutorial we learn how to fix pstotext command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.