Different behavior on "convert" command from PDF to JPEG
Posted: 2018-12-17T07:05:00-07:00
Hello,
I have a problem when I try to convert the first page of a PDF file to JPEG format (My PDF has only one page).
The problem is Debian Stetch (9.6) but works perfectly on Debian Jessie (8.11)
On Debian 9.6: ImageMagik v6.9.7.4 and ghostscript v9.26
On Debian 8.11: ImageMagik 6.8.9.9 and ghostscript v9.06
My commande is:
I get the following error (debian 9.6):
If I remove the brackets ( [0] ), it works ! I don't have any issue in previous version (On jessie)
It works with simple PDF file (without large image), I don't understand where there's a problem...
Command without brackets :
Results:
> It works fine.. Any idea ? I don't find any issue talking about this...
Thanks a lot !
I have a problem when I try to convert the first page of a PDF file to JPEG format (My PDF has only one page).
The problem is Debian Stetch (9.6) but works perfectly on Debian Jessie (8.11)
On Debian 9.6: ImageMagik v6.9.7.4 and ghostscript v9.26
On Debian 8.11: ImageMagik 6.8.9.9 and ghostscript v9.06
My commande is:
Code: Select all
convert -background white -flatten -verbose my_document.pdf[0] first_page_image.jpg
Code: Select all
'gs' -sstdout=%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4 -dGraphicsAlphaBits=4 '-r72x72' -dFirstPage=1 -dLastPage=1 '-sOutputFile=/tmp/magick-24544bcD8YtyhXQl6%d' '-f/tmp/magick-24544nUmUzh3QTriM' '-f/tmp/magick-24544gES4ltaz3bfs'
convert-im6.q16: FailedToExecuteCommand `'gs' -sstdout=%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4 -dGraphicsAlphaBits=4 '-r72x72' -dFirstPage=1 -dLastPage=1 '-sOutputFile=/tmp/magick-24544bcD8YtyhXQl6%d' '-f/tmp/magick-24544nUmUzh3QTriM' '-f/tmp/magick-24544gES4ltaz3bfs'' (-1)
@ error/delegate.c/ExternalDelegateCommand/462.
It works with simple PDF file (without large image), I don't understand where there's a problem...
Command without brackets :
Code: Select all
convert -background white -flatten -verbose my_document.pdf first_page_image.jpg
Code: Select all
'gs' -sstdout=%stderr -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 '-sDEVICE=pngalpha' -dTextAlphaBits=4 -dGraphicsAlphaBits=4 '-r72x72' '-sOutputFile=/tmp/magick-246685XMcGXEIFltr%d' '-f/tmp/magick-24668DrKi6QQcaRoP' '-f/tmp/magick-24668mhqyYAQB3ukd'
/tmp/magick-246685XMcGXEIFltr1 PNG 595x842 595x842+0+0 8-bit sRGB 192KB 0.010u 0:00.010
my_document.pdf PDF 595x842 595x842+0+0 16-bit sRGB 192KB 0.000u 0:00.000
my_document.pdf=>first_page_image.jpg PDF 595x842 595x842+0+0 16-bit sRGB 81.7KB 0.040u 0:00.019
Thanks a lot !