:: Script for making a PDF file for Gamers' Workshop :: Requires installation of Image Magick http://imagemagick.org/script/binary-releases.php :: Converted with ImageMagick-6.9.0-4-Q16-x64-dll.exe :: http://imagemagick.org/script/command-line-processing.php :: http://imagemagick.org/script/command-line-options.php :: http://stackoverflow.com/questions/5560371/windows-batch-file-script-to-copy-every-tenth-file-from-a-folder-to-another-fold :: https://www.experts-exchange.com/questions/26558163/Copy-even-or-odd-files.html :: Copy this script and rename to PDFConvert.bat :: Extract a zip-archive with jpg files and copy the bat file inside it :: Do not display the commands @echo off :: Make a temp directory mkdir output :: Counter set cc=0 :: Iterate over all JPG files for %%a in (*.jpg) do call :myone %%a goto mytwo :: Iterate through odd and even files separately - use xx=cc%2 to check :myone set /a cc+=1 set /a xx=cc %% 2 ::if %xx%==0 (echo even %1) else echo odd %1 if %xx%==0 ( convert -crop 2456x3392+0+0 -resize "70%%" -strip %1 output\%1 ) else ( convert -crop 2456x3392+0+92 -resize "70%%" -strip %1 output\%1 ) goto :eof :: Create the PDF file :mytwo ::convert -crop 2456x3392+0+0 -resize "70%%" -strip GW48_001.jpg output\GW48_001.jpg convert -quality 70 -strip output\*.jpg GW48.pdf goto :eof :: Paper :: A4 = 2456x3484 :: Letter = 2526x3276 :: Parameters :: 04, 05, 06, 08, 25_86 - 33_94 - remove crop command :: 07 - 2456x3320+0+80 2456x3320+0+80 :: 09 - 2406x3276+0+0 2406x3276+120+0 :: 12 - 2413x3276+0+0 2413x3276+113+0 :: 18 - 2456x3400+0+0 2456x3400+0+84; pages 44-69 2456x3400+0+0 2456x3400+0+0 :: 19 - 2456x3420+0+0 2456x3420+0+64 :: 21 - 2456x3372+0+0 2456x3372+0+112 :: 22 - 2456x3312+0+0 2456x3312+0+172 :: 23, 24, 26 - 2456x3320+0+0 2456x3320+0+164 :: 25, 31 - 2456x3325+0+0 2456x3325+0+159 :: 27 - 2456x3354+0+0 2456x3354+0+130 :: 28 - 2456x3342+0+0 2456x3342+0+142 :: 29 - 2400x3342+0+0 2400x3342+56+142 :: 30, 32 - 2456x3340+0+0 2456x3340+0+144 :: 35, 37 - 2456x3350+0+0 2456x3350+0+134 :: 36, 38 - 2456x3384+0+0 2456x3384+0+100 :: 20, 39 - 2456x3400+0+0 2456x3400+0+84 :: 34, 40 - 2456x3380+0+0 2456x3380+0+104 :: 16, 41 - 2456x3374+0+0 2456x3374+0+110 :: 42 - 2456x3390+0+0 2456x3390+0+94 :: 43 - 2456x3375+0+0 2456x3375+0+109 :: 44 - 2456x3382+0+50 2456x3382+0+50 :: 45, 01_62 - 2456x3362+0+0 2456x3362+0+122 :: 46, 49 - 2456x3382+0+0 2456x3382+0+102; 46 - pages 5-40 2456x3382+0+50 2456x3382+0+50 :: 17, 47, 48, 51 - 55, 57 - 2456x3392+0+0 2456x3392+0+92 :: 33, 50 - 2456x3360+0+0 2456x3360+0+124 :: 56 - 2456x3430+0+0 2456x3430+0+54 :: 58 - 2456x3405+0+0 2456x3405+0+79 :: 59 - 2456x3400+0+50 2456x3400+0+50 :: 60 - 2456x3410+0+0 2456x3410+0+74 :: 61 - 2456x3390+0+0 2456x3390+0+94 :: 02_63 - 2526x3235+0+0 2526x3235+0+41 :: 03_64 - 2526x3242+0+0 2526x3242+0+34 :: 04_65 - 17_78, 19_80, 23_84 - 2526x3230+0+0 2526x3230+0+46 :: 18_79, 22_83 - 2526x3240+0+0 2526x3240+0+36 :: 20_81, 21_82 - 2526x3220+0+0 2526x3220+0+56 :: 24_85 - 2526x3260+0+0 2526x3260+0+16