pdftotext command not found

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

Introduction

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

pdftotext: command not found

or when using sudo you get the following error message

sudo: pdftotext: command not found

Solutions to pdftotext: command not found

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

In Ubuntu pdftotext is provided by poppler-utils package.

poppler-utils is:

Poppler is a PDF rendering library based on Xpdf PDF viewer.

This package contains command line utilities (based on Poppler) for getting information of PDF documents, convert them to other formats, or manipulate them:

  • pdfdetach – lists or extracts embedded files (attachments)
  • pdffonts – font analyzer
  • pdfimages – image extractor
  • pdfinfo – document information
  • pdfseparate – page extraction tool
  • pdfsig – verifies digital signatures
  • pdftocairo – PDF to PNG/JPEG/PDF/PS/EPS/SVG converter using Cairo
  • pdftohtml – PDF to HTML converter
  • pdftoppm – PDF to PPM/PNG/JPEG image converter
  • pdftops – PDF to PostScript (PS) converter
  • pdftotext – text extraction
  • pdfunite – document merging tool

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

sudo apt-get -y install poppler-utils

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

You can also use apt command to install poppler-utils.

sudo apt -y install poppler-utils

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

sudo aptitude install poppler-utils

Summary

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