Skip to content

Instantly share code, notes, and snippets.

@ivan
Last active December 9, 2017 08:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivan/0356a4d7a39996153102990785d5a4c2 to your computer and use it in GitHub Desktop.
Save ivan/0356a4d7a39996153102990785d5a4c2 to your computer and use it in GitHub Desktop.
Add a lot of margin to the left and right side of a PDF, because PDF viewers on iOS/iPad won't let you stay zoomed out
#!/bin/bash
set -eu
# Add a lot of margin to the left and right side of a PDF, because PDF
# viewers on iOS won't let you stay zoomed out & read with smaller fonts.
#
# Requirements: apt-get install texlive-extra-utils
#
# Note: unfortunately, may sometimes reveal printing instructions
# outside of the existing margin.
input=$1
output=$(basename -- "$input" .pdf)_PADDED.pdf
pdfcrop --margin '200 10 200 10' -- "$input" "$output"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment