Create a gist now

Instantly share code, notes, and snippets.

@ivan /pad-pdf
Last active Oct 5, 2017

What would you like to do?
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