mutool

Convert PDF files, query information and extract data. More information: <https://mupdf.com/docs>.

Install

All systems
curl cmd.cat/mutool.sh
Debian Debian
apt-get install mupdf-tools
Ubuntu
apt-get install mupdf-tools
Alpine
apk add mupdf-tools
Arch Arch Linux
pacman -S mupdf-tools
image/svg+xml Kali Linux
apt-get install mupdf-tools
Fedora
dnf install mupdf
Windows (WSL2)
sudo apt-get update sudo apt-get install mupdf-tools
OS X
brew install mupdf-tools
Raspbian
apt-get install mupdf-tools
Docker
docker run cmd.cat/mutool mutool powered by Commando

Convert PDF files, query information and extract data. More information: <https://mupdf.com/docs>.

  • Convert pages 1-10 into 10 PNGs:
    mutool convert -o image%d.png file.pdf 1-10
  • Convert pages 2, 3 and 5 of a PDF into text in the standard output:
    mutool draw -F txt file.pdf 2,3,5
  • Concatenate two PDFs:
    mutool merge -o output.pdf input1.pdf input2.pdf
  • Query information about all content embedded in a PDF:
    mutool info input.pdf
  • Extract all images, fonts and resources embedded in a PDF out into the current directory:
    mutool extract input.pdf
  • Print the outline (table of contents) of a PDF:
    mutool show input.pdf outline

© tl;dr; authors and contributors