Created
October 27, 2015 12:25
-
-
Save NigelThorne/e81a91fa2b30a721e201 to your computer and use it in GitHub Desktop.
Shell script to take two pdfs (one all odd pages, one all even) and merge them then rescale the images to reduce the file size for emailing.
This file contains 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
# Example script to collate and reduce size of scanned pdf. Idea taken from Stackoverflow answers | |
# interleave two pdfs as one | |
pdftk A=Emma\ front\ half.pdf B=Emma\ back\ half.pdf shuffle A B output Emma.pdf | |
# convert to postscript | |
pdf2ps Emma.pdf Emma.ps | |
# convert back with defined resolution 150 | |
ps2pdf -dPDFSETTINGS=/screen -dDownsampleColorImages=false -dColorImageResolution=150 -dColorImageDownsampleType=/Bicubic Emma.ps Emma_ps150b.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment