Last active
October 19, 2018 09:40
-
-
Save frame/280dcbade4eaeeb0a4b9fefff0eba836 to your computer and use it in GitHub Desktop.
Merge input/*.pdf into a single pdf
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
REM Create folders ./gs/ and ./input/ | |
REM Download Ghostscript (64bit) and extract to ./gs/ | |
REM Copy PDF files to be merged to ./input/ | |
REM Run merge-pdf.bat | |
@echo off | |
if exist input\input.txt del input\input.txt | |
for %%s in (input\*.pdf) do echo "%%s" >> input\input.txt | |
gs\bin\gswin64c.exe -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=output.pdf -dBATCH @input\input.txt | |
if exist input\input.txt del input\input.txt | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment