pts / pdfsizeopt

PDF file size optimizer
GNU General Public License v2.0
750 stars 65 forks source link

batch file not working #168

Open StephanBusch opened 1 year ago

StephanBusch commented 1 year ago

Hello guys,

I am using the following commandline in windows 11:

pdfsizeopt --v=20 --use-pngout=No --use-image-optimizer="pingo -s4 %(targetfnq)s" --use-image-optimizer=ECT,zopflipng --do-optimize-objs=yes --do-remove-generational-objs=yes abc.pdf

it works, but not in a windows batch file. What am I doing wrong? My batchfile looks like this:

@echo off

FOR %%i IN (%*) DO (

pdfsizeopt --v=20 --use-pngout=No --use-image-optimizer="pingo -s4 %(targetfnq)s" --use-image-optimizer=ECT,zopflipng --do-optimize-objs=yes --do-remove-generational-objs=yes "%%i"

) pause

the error shown is that the input file is missing when I drag and drop a pdf on that batchfile.