Weneedu 2021. 1. 29. 02:17

20210128 1211 

 

pdf merge does not work

 

▶ Run CMD as admin

"www.autohotkey.com/boards/viewtopic.php?t=19010"

 

▶ direct way..this does not work

RunWait %comspec% /c pdftk.exe %myString% cat output MTR_%myDate%.pdf

"www.donationcoder.com/forum/index.php?topic=32871.0" Using AHK and PDFTK to combine daily pdf's 

 

▶ detour way

run, cmd.exe /k
WinActivate, ahk_exe cmd.exe
sleep, 5000 ;should be long enough so the PDF cna be made and released from certain apps
send, pdftk.exe  C:\zTemp\*.pdf cat output C:\zTemp\output.pdf
sleep, 500
send, {enter}

-> this does not work either.

 

▶ bat file works; zPDF_merge.bat

"musma.github.io/2019/02/21/making-simple-batch-file.html" 유용하게 활용 가능한 배치 파일 만들기

pdftk.exe  C:\zTemp\*.pdf cat output C:\zTemp\output.pdf