This repository contains a shell script that automates the installation of PDFtk (PDF Toolkit) across various Linux distributions. The script first attempts to install PDFtk using the system's native package manager. If that fails, it falls back to installing the Java version of PDFtk directly from the project's GitLab repository.
- Detects the operating system and package manager automatically
- Installs the Java Runtime Environment (JRE) if not present
- Attempts to install PDFtk using the system's package manager
- Falls back to downloading and setting up the Java version of PDFtk if the package manager installation fails
- Works on multiple Linux distributions, including Debian/Ubuntu, Red Hat/CentOS, Fedora, openSUSE, Arch Linux, and Alpine Linux
You can run this script directly using either wget
or curl
:
curl -s https://raw.githubusercontent.com/dev-kraken/pdftk-installer/main/install_pdftk.sh | sudo bash
wget -qO- https://raw.githubusercontent.com/dev-kraken/pdftk-installer/main/install_pdftk.sh | sudo bash
- Detects the operating system and package manager
- Installs Java JRE if not already present
- Attempts to install PDFtk using the system's package manager
- If the package manager installation fails, it downloads the PDFtk JAR from GitLab and sets up a wrapper script
- Verifies the installation by running
pdftk --version
- Bash shell
- sudo privileges
- Internet connection
- Debian/Ubuntu (apt)
- Red Hat/CentOS (yum)
- Fedora (dnf)
- openSUSE (zypper)
- Arch Linux (pacman)
- Alpine Linux (apk)
Contributions, issues, and feature requests are welcome! Feel free to check issues page.
Give a ⭐️ if this project helped you!