convert a pdf/djvu file to png's under Linux how?

Posted by user62367 on Super User See other posts from Super User or by user62367
Published on 2011-01-16T18:21:01Z Indexed on 2011/01/16 18:55 UTC
Read the original article Hit count: 244

Filed under:

Imagemagick doesn't work (Fedora 14) on one PDF file:

$ convert -density 300 INPUT.PDF out.png
Error: /ioerror in --showpage--
Operand stack:
1 true
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1878 1 3 %oparray_pop 1877 1 3 %oparray_pop 1861 1 3 %oparray_pop --nostringval-- --nostringval-- 141 1 319 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- 1761 0 9 %oparray_pop --nostringval-- --nostringval--
Dictionary stack:
--dict:1157/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:108/127(ro)(G)-- --dict:288/300(ro)(G)-- --dict:22/25(L)-- --dict:6/8(L)-- --dict:22/40(L)--
Current allocation mode is local
Last OS error: 27
GPL Ghostscript 8.71: Unrecoverable error, exit code 1
convert: Postscript delegate failed INPUT.PDF': @ error/pdf.c/ReadPDFImage/645.<br> convert: missing an image filenameout.png' @ error/convert.c/ConvertImageCommand/2953.
$

And it doesn't work on a djvu file:

$ convert -density 300 INPUT.DJVU out.png
convert: no decode delegate for this image format INPUT.DJVU' @ error/constitute.c/ReadImage/532.<br> convert: missing an image filenameout.png' @ error/convert.c/ConvertImageCommand/2953.
$


an extra: the output filenames.
out-0.png
out-1.png
...
out-9.png
out-10.png
out-11.png
..
out-123.png
out-124.png

is there a way to be like this?:
out-000.png
out-001.png
...
out-009.png
out-010.png
out-011.png
..
out-123.png
out-124.png

because they would be in wrong order:
out-0.png
out-1.png
out-10.png
out-11.png
out-123.png
out-124.png
out-9.png

thank you :\

© Super User or respective owner

convert a pdf/djvu file to png's under Linux how?

Posted by user62367 on Super User See other posts from Super User or by user62367
Published on 2011-01-16T18:21:26Z Indexed on 2011/01/16 18:55 UTC
Read the original article Hit count: 244

Filed under:

Imagemagick doesn't work (Fedora 14) on one PDF file:

$ convert -density 300 INPUT.PDF out.png
Error: /ioerror in --showpage--
Operand stack:
1 true
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1878 1 3 %oparray_pop 1877 1 3 %oparray_pop 1861 1 3 %oparray_pop --nostringval-- --nostringval-- 141 1 319 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- 1761 0 9 %oparray_pop --nostringval-- --nostringval--
Dictionary stack:
--dict:1157/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:108/127(ro)(G)-- --dict:288/300(ro)(G)-- --dict:22/25(L)-- --dict:6/8(L)-- --dict:22/40(L)--
Current allocation mode is local
Last OS error: 27
GPL Ghostscript 8.71: Unrecoverable error, exit code 1
convert: Postscript delegate failed INPUT.PDF': @ error/pdf.c/ReadPDFImage/645.<br> convert: missing an image filenameout.png' @ error/convert.c/ConvertImageCommand/2953.
$

And it doesn't work on a djvu file:

$ convert -density 300 INPUT.DJVU out.png
convert: no decode delegate for this image format INPUT.DJVU' @ error/constitute.c/ReadImage/532.<br> convert: missing an image filenameout.png' @ error/convert.c/ConvertImageCommand/2953.
$


an extra: the output filenames.
out-0.png
out-1.png
...
out-9.png
out-10.png
out-11.png
..
out-123.png
out-124.png

is there a way to be like this?:
out-000.png
out-001.png
...
out-009.png
out-010.png
out-011.png
..
out-123.png
out-124.png

because they would be in wrong order:
out-0.png
out-1.png
out-10.png
out-11.png
out-123.png
out-124.png
out-9.png

thank you :\

© Super User or respective owner

Related posts about fedora