Error by trying to convert from pdf

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Pablo_1985
Posts: 3
Joined: 2016-11-14T11:11:05-07:00
Authentication code: 1151

Error by trying to convert from pdf

Post by Pablo_1985 »

Hi all,

I have Ghostscript installed and ImageMagick-7.0.3-6-Q16-x64-dll.
Everything seems to work just fine, convert from pdf without any issues, but when trying to convert some final graphic arts in pdf format gives me some errors, I upload the PDF file so you can try and see what´s going on.

http://www.filedropper.com/2_168

I am doing it from the CMD, and the message i get is (there I called it 4.pdf):

Code: Select all

C:\Users\prcenteno.PANORAMA>magick "C:\Users\prcenteno.PANORAMA\Desktop\Escritor
io\Borrador\Nueva carpeta\4.pdf" "C:\Users\prcenteno.PANORAMA\Desktop\Escritorio
\Borrador\Nueva carpeta\4.jpg"
magick: FailedToExecuteCommand `"C:/Program Files (x86)/gs/gs9.09/bin/gswin32c.e
xe" -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlig
nToPixels=0 -dGridFitTT=2 "-sDEVICE=pamcmyk32" -dTextAlphaBits=4 -dGraphicsAlpha
Bits=4 "-r72x72" -dUseCIEColor  "-sOutputFile=C:/Users/PRCENT~1.PAN/AppData/Loca
l/Temp/magick-10288mxMLzH4RVhPL%d" "-fC:/Users/PRCENT~1.PAN/AppData/Local/Temp/m
agick-10288-_wME71vP3Nz" "-fC:/Users/PRCENT~1.PAN/AppData/Local/Temp/magick-1028
8xjU8gVU6sIi9"' (255) @ error/pdf.c/InvokePDFDelegate/233.
magick: PDFDelegateFailed `Unrecoverable error: invalidaccess in put
Operand stack:
    true  false  --nostringval--  --nostringval--  --nostringval--  --nostringva
l--  --nostringval--  OutputAttributes  --nostringval--  --nostringval--  Output
Attributes  --nostringval--
' @ error/pdf.c/ReadPDFImage/783.
magick: no image to apply a property "%w" @ warning/property.c/GetMagickProperty
Letter/2550.
magick: unknown image property "%w" @ warning/property.c/InterpretImagePropertie
s/3488.
magick: no image to apply a property "%h" @ warning/property.c/GetMagickProperty
Letter/2438.
magick: unknown image property "%h" @ warning/property.c/InterpretImagePropertie
s/3488.
magick: no image to apply a property "%m" @ warning/property.c/GetMagickProperty
Letter/2469.
magick: unknown image property "%m" @ warning/property.c/InterpretImagePropertie
s/3488.
Anybody knows what´s going on?

Thanks a lot in advance

Pablo
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Error by trying to convert from pdf

Post by fmw42 »

Post your PDF image. That link does not seem to allow download of your PDF only of the download tool.

Also always provide your IM version and platform.

What do you get from

convert -version

does it list gs or gslib? If not, then perhaps you do not have Ghostscript where IM can find it.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Error by trying to convert from pdf

Post by snibgo »

IM is running Ghostscript, but GS is writing an error message while processing the PDF:

Code: Select all

invalidaccess in put Operand stack:
I suppose the PDF is bad.
snibgo's IM pages: im.snibgo.com
Pablo_1985
Posts: 3
Joined: 2016-11-14T11:11:05-07:00
Authentication code: 1151

Re: Error by trying to convert from pdf

Post by Pablo_1985 »

Let´s see if you can take it from my drive:

https://drive.google.com/open?id=0ByscS ... 1JoUlN1NFU

The PDF is just fine and I have a bunch like that we use for printing.

Regards,

Pablo
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Error by trying to convert from pdf

Post by snibgo »

It converts fine for me, Ghostscript v9.19. Try an upgrade.
snibgo's IM pages: im.snibgo.com
Pablo_1985
Posts: 3
Joined: 2016-11-14T11:11:05-07:00
Authentication code: 1151

Re: Error by trying to convert from pdf

Post by Pablo_1985 »

And that was all!!! thank you this is incredible! now i have to just understand the command line so I can limit the pixels of the image. The whole idea is to create thumbnails as a preview of the file.

Really it is incredible that things like this are free, I love the Internet!

EDIT: I am converting all the first pages of all the PDFs in a folder to 240x240 png files by wrritting:

Code: Select all

mogrify -format png -resize 240x240*.pdf[0]
I put this in a bat file and today this little application made my day :)
Post Reply