Created
July 15, 2020 01:44
-
-
Save algal/dffb48ce09740dbc3b5cd92384669781 to your computer and use it in GitHub Desktop.
Add wide margins to a PDF for annotations
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 | |
if [ "$#" -ne 1 ]; then | |
echo "usage: $0 PDF_filename..." | |
echo | |
echo "This script takes a PDF file as command line arguments," | |
echo "and generates a new, landscape-formatted PDF file, where every " | |
echo "page has very large margins which may be useful for editorial notes" | |
echo | |
echo "Requires: pdfjam" | |
echo | |
echo "Install pdfjam on ubuntu 18.04" | |
echo " sudo apt intsll texlive-extra-utils" | |
echo | |
echo "Install pdfjam and basic latex on macOS:" | |
echo " brew cask install basictex" | |
echo " brew tap FLEWID-AB/homebrew-pdfjam" | |
echo " brew install pdfjam" | |
exit 1 | |
fi | |
command -v pdfjam >/dev/null 2>&1 || { echo >&2 "I require pdfjam but it's not installed. Do an apt install of texlive-extra-utils to get it on Ubuntu. Aborting."; exit 1; } | |
exec pdfjam --batch --nup 1x1 --suffix widemargin --landscape "$@" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment