I've finished the code to Win/DOS batch but I got many errors, and only 8 files successfully converted. Any idea where could be problem?
Code: Select all
for /r %%F in (*.pdf) do ^
"c:\program files\ImageMagick-6.7.5-Q8\convert.exe" -density 400 -shave 30%%x30%% -quality 34%% %%F %%F.jpg
**** Warning: File has insufficient data for an image.
libpng error: Write Error
Error: /VMerror in --showpage--
VM status: 3 935695 2253216
Current allocation mode is local
Last OS error: 28
GPL Ghostscript 9.04: Unrecoverable error, exit code 1
convert.exe: `%s': %s "C:/program files/GhostScript9.04/bin/gswin32c.exe" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dEPS
Crop -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pngalpha" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r400x400" -g67533x50656 "-sOutputFile=C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/magick-zVIp4tf7-12275968" "-fC:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/magick-njK22eLq" "-fC:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/magick-XXK6mIPn" @ error/pdf.c/InvokePDFDelegate/199.convert.exe:
Postscript delegate failed `D:\Europe\Cyprus\enroute.pdf':
No such file or directory @ error/pdf.c/ReadPDFImage/667. convert.exe:
unable to open image `D:\Europe\Cyprus\enroute.pdf.jpg': No such file or directory @ error/blob.c/OpenBlob/2614.
D:\Europe>"c:\program files\ImageMagick-6.7.5-Q8\convert.exe"
-density 400 -shave 30%x30% -quality 34% D:\Europe\Czech_republic\lower.pdf D:\Europe\Czech_republic\lower.pdf.jpg
-density 400 -shave 30%x30% -quality 34%
D:\Europe\Austria\upper.pdf D:\Europe\Austria\upper.pdf.jpg
convert.exe: unable to open image `D:\Europe\Czech_republic\lower.pdf.jpg':
No such file or directory @ error/blob.c/OpenBlob/2614.
D:\Europe>"c:\program files\ImageMagick-6.7.5-Q8\convert.exe"
-density 400 -shave 30%x30% -quality 34%
D:\Europe\Czech_republic\upper.pdf D:\Europe\Czech_republic\upper.pdf.jpg -density 400 -shave 30%x30% -quality 34%
D:\Europe\Austria\upper.pdf D:\Europe\Austria\upper.pdf.jpg
**** Warning: xref subsection header has extra characters.
**** Warning: An error occurred while reading an XREF table.
**** The file has been damaged. This may have been caused
**** by a problem while converting or transfering the file.
**** Ghostscript will attempt to recover the data.
**** Warning: There are objects with matching object and generation
**** numbers. The accuracy of the resulting image is unknown.
**** This file had errors that were repaired or ignored.
**** The file was produced by:
**** >>>> Acrobat Distiller 6.0 (Windows) <<<<
**** Please notify the author of the software that produced this
**** file that it does not conform to Adobe's published PDF
**** specification.
convert.exe: unable to open image `D:\Europe\Czech_republic\upper.pdf.jpg': No such file or directory @ error/blob.c/OpenBlob/2614.
D:\Europe>"c:\program files\ImageMagick-6.7.5-Q8\convert.exe"
-density 400 -shave 30%x30% -quality 34%
D:\Europe\Denmark\lower.pdf D:\Europe\Denmark\lower.pdf.jpg -density 400 -shave 30%x30% -quality 34%
D:\Europe\Austria\upper.pdf
D:\Europe\Austria\upper.pdf.jpg
convert.exe: unable to open image `D:\Europe\Denmark\lower.pdf.jpg': No such file or directory @ error/blob.c/OpenBlob/2614.
D:\Europe>"c:\program files\ImageMagick-6.7.5-Q8\convert.exe" -density 400 -shave 30%x30% -quality 34% D:\Europe\Denmark\upper.pdf D:\Europe\Denmark\upper.pdf.jpg -density 400 -shave 30%x30% -quality 34% D:\Europe\Austria\upper.pdf D:\Europe\Austria\upper.pdf.jpg
convert.exe: unable to open image `D:\Europe\Denmark\upper.pdf.jpg': No such file or directory @ error/blob.c/OpenBlob/2614.
D:\Europe>"c:\program files\ImageMagick-6.7.5-Q8\convert.exe" -density 400 -shave 30%x30% -quality 34% D:\Europe\Estonia\enroute.pdf D:\Estonia\enroute.pdf.jpg -density 400 -shave 30%x30% -quality 34% D:\Austria\upper.pdf D:\Europe\Austria\upper.pdf.jpg
**** Warning: File has unbalanced q/Q operators (too many q's)
**** This file had errors that were repaired or ignored.
**** Please notify the author of the software that produced this
**** file that it does not conform to Adobe's published PDF
**** specification.
convert.exe: unable to open image `D:\Europe\Estonia\enroute.pdf.jpg': No such file or directory @ error/blob.c/OpenBlob/2614.
D:\Europe>"c:\program files\ImageMagick-6.7.5-Q8\convert.exe" -density 400 -shave 30%x30% -quality 34% D:\Europe\Finland\lower.pdf D:\Europe\Finland\lower.pdf.jpg -density 400 -shave 30%x30% -quality 34% D:\Europe\Austria\upper.pdf D:\Europe\Austria\upper.pdf.jpg
Error: /ioerror in --showpage--
Operand stack:
1 true
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-
- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- fa
lse 1 %stopped_push 1926 1 3 %oparray_pop 1925 1 3 %oparray_
pop 1909 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1
1 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval--
1809 0 9 %oparray_pop --nostringval-- --nostringval--
Dictionary stack:
--dict:1170/1684(ro)(G)-- --dict:1/20(G)-- --dict:82/200(L)-- --dict:82
/200(L)-- --dict:108/127(ro)(G)-- --dict:291/300(ro)(G)-- --dict:24/30(L)-
- --dict:6/8(L)-- --dict:21/40(L)--
Current allocation mode is local
Last OS error: No space left on device
GPL Ghostscript 9.04: Unrecoverable error, exit code 1
convert.exe: `%s': %s "C:/program files/GhostScript9.04/bin/gswin32c.exe" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dEPS
Crop -dAlignToPixels=0 -dGridFitTT=2 "-sDEVICE=pamcmyk32" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r400x400" -g10394x14506 -dUseCIEColor "-sOutputFile=C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/magick-zyXkMOEq-12275968" "-fC:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/magick-ZpF7Sh2b" "-fC:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/magick-0DSQLmkI" @ error/pdf.c/InvokePDFDelegate/199.convert.exe: Postscript delegate failed `D:\Europe\Finland\lower.pdf': No such file or directory @ error/pdf.c/ReadPDFImage/667.convert.exe: unable to open image `D:\Europe\Finland\lower.pdf.jpg': No such file or directory @ error/blob.c/OpenBlob/2614.
D:\Europe>"c:\program files\ImageMagick-6.7.5-Q8\convert.exe" -density 400 -shave 30%x30% -quality 34% D:\Europe\Finland\upper.pdf D:\Europe\Finland\upper.pdf.jpg -density 400 -shave 30%x30% -quality 34% D:\Europe\Austria\upper.pdf D:\Europe\Austria\upper.pdf.jpg
convert.exe: unable to open image `D:\Europe\Finland\upper.pdf.jpg': No such file or directory @ error/blob.c/OpenBlob/2614.
****************************************************************************
Did you noticed that folder with Austria has been converted successfully and then Cyprus, Czech_republic and Denmark folders commands added part with -density -shave and with Austria folders/files?
How to solve this bug? Please help.