I'm not sure if you found a solution, and also aware this is a very old post and since there might be someone else needing an insight on this, I would like to share a possible solution.
As an assumption. It seems like you are trying to work with a document that has more than one page. Neither is clear if the other PDF the command worked on were single page.
But based on assumptions only, just want to clarify, I'm guessing that the only issue with your command is not specifying what page of the PDF document you intend to convert into an image. As in many tutorials throughout the web, you have to do something like this:
convert "multipage.pdf[0]" multipage.jpg
The command is specifying that the first page would be rendered as an image then converted into a JPEG file.
Now also be aware, that new installations of ImageMagick prohibit the process of PostScript files. If you get an error like the following:
attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/408
You need to open the policy.xml
file which is located at /etc/ImageMagick-6
depending on version installed, and comment the following statements:
<!-- disable ghostscript format types -->
<policy domain="coder" rights="none" pattern="PS" />
<policy domain="coder" rights="none" pattern="PS2" />
<policy domain="coder" rights="none" pattern="PS3" />
<policy domain="coder" rights="none" pattern="EPS" />
<policy domain="coder" rights="none" pattern="PDF" />
<policy domain="coder" rights="none" pattern="XPS" />
But be aware, this is a very important note, if you have an older version of GhostScript installed this is not recommended since there's a serious security hole for older versions. I recommend to always keep GhostScript and ImageMagick always up to date and fix your code accordingly.