getpdftext command not found

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

Introduction

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

getpdftext: command not found

or when using sudo you get the following error message

sudo: getpdftext: command not found

Solutions to getpdftext: command not found

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

In Ubuntu getpdftext is provided by libcam-pdf-perl package.

libcam-pdf-perl is:

CAM::PDF reads and writes any document that conforms to the PDF specification generously provided by Adobe at https://www.adobe.com/devnet/pdf/pdf_reference.html (link last checked Feb 2013).

The file format through PDF 1.5 is well-supported, with the exception of the “linearized” or “optimized” output format, which this module can read but not write. Many specific aspects of the document model are not manipulable with this package (like fonts), but if the input document is correctly written, then this module will preserve the model integrity.

The PDF writing feature saves as PDF 1.4-compatible. That means that compressed object streams cannot be written. The consequence is that reading and then writing a PDF 1.5+ document may enlarge the resulting file by a fair margin.

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

sudo apt-get -y install libcam-pdf-perl

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

You can also use apt command to install libcam-pdf-perl.

sudo apt -y install libcam-pdf-perl

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

sudo aptitude install libcam-pdf-perl

Summary

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