Created
February 15, 2015 12:19
-
-
Save LeoHuckvale/b0ec42fdec3107fe4d3d to your computer and use it in GitHub Desktop.
Compile a PDF from a directory of JPG images using ghostscript
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
#! /bin/sh | |
parallel -j 6 jpg2pdf -- *.JPG | |
gs -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -dSAFER -sOutputFile=combined.pdf `ls -1 *.pdf` | |
mv combined.pdf combined.pdf.bak | |
rm *.pdf | |
foo="`basename "$PWD"`" | |
mv combined.pdf.bak "$foo.pdf" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment