converting pdf text pages to images

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
VanGog
Posts: 308
Joined: 2012-02-05T02:46:58-07:00
Authentication code: 8675308

converting pdf text pages to images

Post by VanGog »

Pls,

Code: Select all

convert exner.pdf -density 250 -quality 100% exner.jpg
this prints report "no decode dellegate for this image format 'exner.pdf'

can IM convert pdf? I forgot.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: converting pdf text pages to images

Post by fmw42 »

Yes, IM can convert PDFs, but it uses Ghostscript. Most likely you do not have it installed or not installed properly or where IM expects to find it.

Also the density should be set before reading any vector image such as pdf.
VanGog
Posts: 308
Joined: 2012-02-05T02:46:58-07:00
Authentication code: 8675308

Re: converting pdf text pages to images

Post by VanGog »

I have set the path and restart. The gswin32 program works now. But still I have problem with this:

Code: Select all

convert -density 250 -quality 100 exner.pdf exner.jpg
convert.exe: RegistryKeyLookupFailed `CoderModulesPath' @ error/module.c/GetMagickModulePath/673.
convert.exe: no decode delegate for this image format `exner.pdf' @ error/constitute.c/ReadImage/544.
convert.exe: no images defined `exner.jpg' @ error/convert.c/ConvertImageCommand/3021.
Do you think I need to use ghostscript installer? I can run the ghostscript console, so I could try to write some command, if you know it. I do not know how to use GS... I belive It should run from the directory where it is... Lets try console
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: converting pdf text pages to images

Post by snibgo »

The first error is "RegistryKeyLookupFailed", so it seems IM can't find something in the registry. I suggest you re-install IM.
snibgo's IM pages: im.snibgo.com
VanGog
Posts: 308
Joined: 2012-02-05T02:46:58-07:00
Authentication code: 8675308

Re: converting pdf text pages to images

Post by VanGog »

I can yet trsy different version : ImageMagick-6.7.5-Q8

convert -density 250 -quality 100 exner.pdf exner.jpg
convert.exe: no decode delegate for this image format `exner.pdf' @ error/constitute.c/ReadImage/532.
convert.exe: missing an image filename `exner.jpg' @ error/convert.c/ConvertImageCommand/3016.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: converting pdf text pages to images

Post by fmw42 »

run

convert -list configure

Look at the line starting with DELEGATES. If it does not have gs or ghostscript listed, then IM cannot find it or it is not installed or not installed correctly.
VanGog
Posts: 308
Joined: 2012-02-05T02:46:58-07:00
Authentication code: 8675308

Re: converting pdf text pages to images

Post by VanGog »

Code: Select all

convert -list configure
DELEGATES bzlib freetype jpeg jp2 lcms png tiff x11 xml wmf zlib

Good tip. Thanks

So I will reinstall gs definately
VanGog
Posts: 308
Joined: 2012-02-05T02:46:58-07:00
Authentication code: 8675308

Re: converting pdf text pages to images

Post by VanGog »

I've just install gs (gs904w32.exe) but the command still does not show gs delegate.

I read the manual of gs:
http://ghostscript.com/doc/current/Install.htm

They write "To install a self-extracting Ghostscript archive on Windows, you need just this self-extracting archive file. Run this file to install Ghostscript. "

Also I can see the registry key:

HKEY_CURRENT_USER\Software\GPL Ghostscript

with two items:
image
text
and (standard) contains nothing

... Maybe is there some problem with the registry, coz there is in the manual something about GS version item in registry, which I dont see:
If Ghostscript fails to find an environment variable, it looks for a registry value of the same name under the key

HKEY_CURRENT_USER\Software\GPL Ghostscript\#.##

or if that fails, under the key

HKEY_LOCAL_MACHINE\SOFTWARE\GPL Ghostscript\#.##

where #.## is the Ghostscript version number."
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: converting pdf text pages to images

Post by fmw42 »

You have to re-install IM after installing a delegate, at least on unix. I am not sure about windows.
Post Reply