Když to provedeš jednou ručně, tak pdftk spojí pdfka v jedno pdf? Aneb překonvertování souboru jpg přes imagemagick do pdf souboru vznikne opravdu soubor formátu pdf? Chybu určitě hlásí pdftk, pokud ano, pak to není chyba scriptu.
www.jpegtopdf.com
@echo off
for %%H in (*.zip) do (
unzip -o %%H
FOR %%G IN (*.jpg) DO echo convert" %%G" -strip -interlace plane "%%~nG.pdf"
echo pdftk 0.pdf 1.pdf 2.pdf 3.pdf 4.pdf 5.pdf 6.pdf 7.pdf 8.pdf 9.pdf 10.pdf 11.pdf 12.pdf cat output %%~nH.pdf
del /f *.jpg
)
Výstup scriptu:E:\Temp\!Tmp>.\cc
Archive: Druhy.zip
inflating: 3d_509.jpg
inflating: 3d_510.jpg
inflating: 3d_511.jpg
inflating: 3d_514.jpg
inflating: 3d_529.jpg
convert"3d_509.jpg" -strip -interlace plane "3d_509.pdf"
convert"3d_510.jpg" -strip -interlace plane "3d_510.pdf"
convert"3d_511.jpg" -strip -interlace plane "3d_511.pdf"
convert"3d_514.jpg" -strip -interlace plane "3d_514.pdf"
convert"3d_529.jpg" -strip -interlace plane "3d_529.pdf"
pdftk 0.pdf 1.pdf 2.pdf 3.pdf 4.pdf 5.pdf 6.pdf 7.pdf 8.pdf 9.pdf 10.pdf 11.pdf
12.pdf cat output Druhy.pdf
Archive: prvni.zip
inflating: 3d_183.jpg
inflating: 3d_283.jpg
inflating: 3d_351.jpg
convert"3d_183.jpg" -strip -interlace plane "3d_183.pdf"
convert"3d_283.jpg" -strip -interlace plane "3d_283.pdf"
convert"3d_351.jpg" -strip -interlace plane "3d_351.pdf"
pdftk 0.pdf 1.pdf 2.pdf 3.pdf 4.pdf 5.pdf 6.pdf 7.pdf 8.pdf 9.pdf 10.pdf 11.pdf
12.pdf cat output prvni.pdf
Archive: Treti.zip
inflating: 3d_581.jpg
inflating: 3d_583.jpg
convert"3d_581.jpg" -strip -interlace plane "3d_581.pdf"
convert"3d_583.jpg" -strip -interlace plane "3d_583.pdf"
pdftk 0.pdf 1.pdf 2.pdf 3.pdf 4.pdf 5.pdf 6.pdf 7.pdf 8.pdf 9.pdf 10.pdf 11.pdf
12.pdf cat output Treti.pdf
E:\Temp\!Tmp>