An interactive bash script that makes the creation and editing of PDF bookmarks easier.
- Automatically detects your Linux distribution (Debian, Fedora, Arch, Alpine, etc.) and offers to install
pdftkif missing. - Automatically removes bloatware metadata lines that clutter the file.
- Asks interactively for bookmark name, page and level.
- Opens your system's default text editor for review.
- Creates a new
_fixed.pdffile version to avoid overwriting the original file.
- Save the script code into a file named
metapdfunder the~/.local/bin/directory. - Make it executable by running on the terminal:
chmod +x metapdf
- Reload you bash by running:
source ~/.bashrc
Pass the PDF file you want to edit as an argument:
metapdf my_document.pdfThe script was made with AI assistance and for personal use. Please check the code before running it.