Page 1 of 1

PDF to tiff not working

Posted: 2018-11-21T14:03:40-07:00
by clabrecq
Hello I am entering

convert -density 300 DisabilityManagementGuide.pdf -depth 8 -strip -background white -alpha off out.tiff

as my terminal command line but I am getting the error
convert-im6.q16: no images defined `out.tiff' @ error/convert.c/ConvertImageCommand/3258.

I have looked up all the possible solutions but none of them have worked for me.

I am using Ubuntu 18

Re: PDF to tiff not working

Posted: 2018-11-21T15:30:03-07:00
by fmw42
What version of ImageMagick? Your -background white does nothing. It is a setting and not followed by any operator to use that setting. If your pdf is transparent, then try

Code: Select all

convert -density 300 DisabilityManagementGuide.pdf -depth 8 -strip -background white -alpha background -alpha off out.tiff
or

Code: Select all

convert -density 300 DisabilityManagementGuide.pdf -depth 8 -strip -background white -flatten out.tiff
You need Ghostscript as a delegate to imagemagick when processing PDFs. Also there was a recent addition to the policy.xml file to restrict the use of PDF at the time there was a security bug in Ghostscript, which has now been fixed with the latest Ghostscript. So you need to edit your policy.xml file to re-enable the use of PDF. See https://imagemagick.org/script/resources.php