pdftotext
Convert PDF files to plain text format. More information: <https://www.xpdfreader.com/pdftotext-man.html>.
Install
- All systems
-
curl cmd.cat/pdftotext.sh
- Debian
-
apt-get install poppler-utils
- Ubuntu
-
apt-get install poppler-utils
- Alpine
-
apk add poppler
- Arch Linux
-
pacman -S poppler
- Kali Linux
-
apt-get install poppler-utils
- CentOS
-
yum install poppler-utils
- Fedora
-
dnf install poppler-utils
- Windows (WSL2)
-
sudo apt-get update
sudo apt-get install poppler-utils
- OS X
-
brew install poppler
- Raspbian
-
apt-get install poppler-utils
- Dockerfile
- dockerfile.run/pdftotext
- Docker
-
docker run cmd.cat/pdftotext pdftotext
powered by Commando
Convert PDF files to plain text format. More information: <https://www.xpdfreader.com/pdftotext-man.html>.
-
Convert `filename.pdf` to plain text and print it to `stdout`:
pdftotext filename.pdf -
-
Convert `filename.pdf` to plain text and save it as `filename.txt`:
pdftotext filename.pdf
-
Convert `filename.pdf` to plain text and preserve the layout:
pdftotext -layout filename.pdf
-
Convert `input.pdf` to plain text and save it as `output.txt`:
pdftotext input.pdf output.txt
-
Convert pages 2, 3 and 4 of `input.pdf` to plain text and save them as `output.txt`:
pdftotext -f 2 -l 4 input.pdf output.txt
© tl;dr; authors and contributors