extractpdfmark command not found

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

Introduction

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

extractpdfmark: command not found

or when using sudo you get the following error message

sudo: extractpdfmark: command not found

Solutions to extractpdfmark: command not found

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

In Ubuntu extractpdfmark is provided by extractpdfmark package.

extractpdfmark is:

When you create a PDF document using a TeX system, you may include many small PDF files in the main PDF file. It is common for each of those files to use the same fonts.

If the small PDF files contain embedded font subsets, the TeX system includes them as-is in the main PDF. As a result, several subsets of the same font are embedded in the main PDF. It is not possible to remove the duplicates since they are different subsets. This vastly increases the size of the main PDF file.

On the other hand, if the small PDF files contain embedded full font sets, the TeX system also includes all of them in the main PDF. This time, the main PDF contains duplicates of the same full sets of fonts. Therefore, Ghostscript can remove the duplicates. This may considerably reduce the main PDF-file’s size.

Finally, if the small PDF files contain some fonts that are not embedded, the TeX system outputs the main PDF file with some fonts missing. In this case, Ghostscript can embed the necessary fonts. It can significantly reduce the required disk size.

Either way, when Ghostscript reads the main PDF produced by the TeX system and outputs the final PDF it does not preserve PDF page-mode and named-destinations etc. As a result, when you open the final PDF, it is not displayed correctly. Also, remote PDF links will not work.

This program is able to extract page mode and named destinations as PDFmark from PDF. By using this you can get the small PDF files that have preserved them.

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

sudo apt-get -y install extractpdfmark

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

You can also use apt command to install extractpdfmark.

sudo apt -y install extractpdfmark

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

sudo aptitude install extractpdfmark

Summary

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