Warning: This guide contains system-level modifications. Some steps are irreversible or can render your system unbootable. Read every section fully before executing any command. Know what you are doing, or do not proceed.
All examples are written for runit. Adapt service commands for OpenRC or s6 as needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pdftk original.pdf output uncompressed.pdf uncompress | |
| LANG=C sed -n '/^\/Annots/!p' uncompressed.pdf > stripped.pdf | |
| pdftk stripped.pdf output final.pdf compress |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| #!/usr/bin/env vim | |
| #! This is a bash script that executes itself as a vimscript to do its work | |
| #! vim:ft=vim:ts=2:sts=2:sw=2 | |
| : if 0 | |
| tmpfile=$(mktemp -t vimcat.XXXXXXXX) | |
| exec 9<>"$tmpfile" | |
| rm "$tmpfile" |