convert -ping option not working for certain PDF files

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
senthilkumartk
Posts: 6
Joined: 2013-04-03T23:31:23-07:00
Authentication code: 6789

convert -ping option not working for certain PDF files

Post by senthilkumartk »

we are using the imagemagick convert to get the details about a pdf file.
We are using the command imconvert -ping test.pdf info:
This command seems to not work for some of the pdfs.
The command is stuck forever.
Below is the debug output when we ran the command.
C:\Users\smunagal\Downloads>imconvert -ping "test.pdf" -units PixelsPerInch -format " %w \n %h %x \n %[colorspace]" info: -debug all
2013-11-14T11:18:50+06:00 0:00.002 0.000u 6.8.0 Configure imconvert.exe[5788]:
utility.c/ExpandFilenames/939/Configure
Command line: imconvert {-ping} {test.pdf} {-units} {PixelsPerInch} {-format} { %w \n %h %x \n %[colorspace]} {info:} {-debug} {all}
2013-11-14T11:18:50+06:00 0:00.010 0.000u 6.8.0 Configure imconvert.exe[5788]:
nt-base.c/NTRegistryKeyLookup/1714/Configure
SOFTWARE\ImageMagick\6.8.0\Q:16
2013-11-14T11:18:50+06:00 0:00.014 0.000u 6.8.0 Configure imconvert.exe[5788]:
nt-base.c/NTRegistryKeyLookup/1735/Configure
ConfigurePath
2013-11-14T11:18:50+06:00 0:00.024 0.000u 6.8.0 Configure imconvert.exe[5788]:
nt-base.c/NTRegistryKeyLookup/1714/Configure
SOFTWARE\ImageMagick\6.8.0\Q:16
2013-11-14T11:18:50+06:00 0:00.029 0.000u 6.8.0 Configure imconvert.exe[5788]:
nt-base.c/NTRegistryKeyLookup/1735/Configure
ConfigurePath
2013-11-14T11:18:50+06:00 0:00.032 0.000u 6.8.0 Configure imconvert.exe[5788]:
configure.c/GetConfigureOptions/564/Configure
Searching for configure file: "C:\Program Files\ImageMagick-6.8.0-Q16\coder.xml"
2013-11-14T11:18:50+06:00 0:00.036 0.000u 6.8.0 Configure imconvert.exe[5788]:
configure.c/GetConfigureOptions/564/Configure
Searching for configure file: "C:\Users\smunagal\.magick\coder.xml"
2013-11-14T11:18:50+06:00 0:00.042 0.000u 6.8.0 Configure imconvert.exe[5788]:
coder.c/LoadCoderList/694/Configure
Loading coder configuration file "C:\Program Files\ImageMagick-6.8.0-Q16\coder.xml" ...
2013-11-14T11:18:50+06:00 0:00.048 0.000u 6.8.0 Module imconvert.exe[5788]: module.c/OpenModule/1264/Module
Searching for module "PDF" using filename "IM_MOD_RL_PDF_.dll"
2013-11-14T11:18:50+06:00 0:00.053 0.000u 6.8.0 Module imconvert.exe[5788]: module.c/GetMagickModulePath/565/Module
Searching for coder module file "IM_MOD_RL_PDF_.dll" ...
2013-11-14T11:18:50+06:00 0:00.057 0.000u 6.8.0 Configure imconvert.exe[5788]:
nt-base.c/NTRegistryKeyLookup/1714/Configure
SOFTWARE\ImageMagick\6.8.0\Q:16
2013-11-14T11:18:50+06:00 0:00.061 0.000u 6.8.0 Configure imconvert.exe[5788]:
nt-base.c/NTRegistryKeyLookup/1735/Configure
CoderModulesPath
2013-11-14T11:18:50+06:00 0:00.066 0.000u 6.8.0 Module imconvert.exe[5788]: module.c/OpenModule/1273/Module
Opening module at path "C:\Program Files\ImageMagick-6.8.0-Q16\modules\coders\IM_MOD_RL_PDF_.dll"
2013-11-14T11:18:50+06:00 0:00.072 0.000u 6.8.0 Module imconvert.exe[5788]: module.c/OpenModule/1300/Module
Method "RegisterPDFImage" in module "PDF" at address 0000000051696E40
2013-11-14T11:18:50+06:00 0:00.077 0.000u 6.8.0 Module imconvert.exe[5788]: module.c/OpenModule/1314/Module
Method "UnregisterPDFImage" in module "PDF" at address 00000000516925C0
2013-11-14T11:18:50+06:00 0:00.084 0.000u 6.8.0 Policy imconvert.exe[5788]: policy.c/IsRightsAuthorized/485/Policy
Domain: Path; rights=Read; pattern="test.pdf" ...
2013-11-14T11:18:50+06:00 0:00.091 0.000u 6.8.0 Blob imconvert.exe[5788]: blob.c/OpenBlob/2530/Blob
read 3 magic header bytes
2013-11-14T11:18:50+06:00 0:00.096 0.016u 6.8.0 Configure imconvert.exe[5788]:
nt-base.c/NTRegistryKeyLookup/1714/Configure
SOFTWARE\ImageMagick\6.8.0\Q:16
2013-11-14T11:18:50+06:00 0:00.100 0.016u 6.8.0 Configure imconvert.exe[5788]:
nt-base.c/NTRegistryKeyLookup/1735/Configure
ConfigurePath
2013-11-14T11:18:50+06:00 0:00.104 0.016u 6.8.0 Configure imconvert.exe[5788]:
nt-base.c/NTRegistryKeyLookup/1714/Configure
SOFTWARE\ImageMagick\6.8.0\Q:16
2013-11-14T11:18:50+06:00 0:00.108 0.016u 6.8.0 Configure imconvert.exe[5788]:
nt-base.c/NTRegistryKeyLookup/1735/Configure
ConfigurePath
2013-11-14T11:18:50+06:00 0:00.112 0.016u 6.8.0 Configure imconvert.exe[5788]:
configure.c/GetConfigureOptions/564/Configure
Searching for configure file: "C:\Program Files\ImageMagick-6.8.0-Q16\magic.xml"
2013-11-14T11:18:50+06:00 0:00.118 0.016u 6.8.0 Configure imconvert.exe[5788]:
configure.c/GetConfigureOptions/564/Configure
Searching for configure file: "C:\Users\smunagal\.magick\magic.xml"
2013-11-14T11:18:50+06:00 0:00.123 0.016u 6.8.0 Configure imconvert.exe[5788]:
magic.c/LoadMagicList/681/Configure
Loading magic configure file "C:\Program Files\ImageMagick-6.8.0-Q16\magic.xml" ...
2013-11-14T11:18:50+06:00 0:00.129 0.016u 6.8.0 Policy imconvert.exe[5788]: policy.c/IsRightsAuthorized/485/Policy
Domain: Coder; rights=Read; pattern="PDF" ...
2013-11-14T11:18:50+06:00 0:00.133 0.016u 6.8.0 Policy imconvert.exe[5788]: policy.c/IsRightsAuthorized/485/Policy
Domain: Path; rights=Read; pattern="test.pdf" ...
2013-11-14T11:18:50+06:00 0:00.140 0.016u 6.8.0 Blob imconvert.exe[5788]: blob.c/OpenBlob/2530/Blob
read 3 magic header bytes
2013-11-14T11:18:51+06:00 0:00.143 0.016u 6.8.0 Policy imconvert.exe[5788]: policy.c/IsRightsAuthorized/485/Policy
Domain: Path; rights=Read; pattern="test.pdf" ...
2013-11-14T11:18:51+06:00 0:00.150 0.016u 6.8.0 Blob imconvert.exe[5788]: blob.c/OpenBlob/2530/Blob
read 3 magic header bytes
2013-11-14T11:18:51+06:00 0:00.153 0.016u 6.8.0 Resource imconvert.exe[5788]: resource.c/AcquireUniqueFileResource/441/Resource

2013-11-14T11:18:51+06:00 0:00.164 0.016u 6.8.0 Resource imconvert.exe[5788]: resource.c/AcquireUniqueFileResource/482/Resource
C:/Users/smunagal/AppData/Local/Temp/magick-5788BM2JjFGH3gWT
2013-11-14T11:18:51+06:00 0:00.251 0.109u 6.8.0 Resource imconvert.exe[5788]: resource.c/AcquireUniqueFileResource/441/Resource
àO4á_
2013-11-14T11:18:51+06:00 0:00.256 0.109u 6.8.0 Resource imconvert.exe[5788]: resource.c/AcquireUniqueFileResource/482/Resource
C:/Users/smunagal/AppData/Local/Temp/magick-5788m1SIsKac4XfP
2013-11-14T11:18:51+06:00 0:00.261 0.109u 6.8.0 Configure imconvert.exe[5788]:
nt-base.c/NTRegistryKeyLookup/1714/Configure
SOFTWARE\ImageMagick\6.8.0\Q:16
2013-11-14T11:18:51+06:00 0:00.265 0.109u 6.8.0 Configure imconvert.exe[5788]:
nt-base.c/NTRegistryKeyLookup/1735/Configure
ConfigurePath
2013-11-14T11:18:51+06:00 0:00.268 0.109u 6.8.0 Configure imconvert.exe[5788]:
nt-base.c/NTRegistryKeyLookup/1714/Configure
SOFTWARE\ImageMagick\6.8.0\Q:16
2013-11-14T11:18:51+06:00 0:00.272 0.109u 6.8.0 Configure imconvert.exe[5788]:
nt-base.c/NTRegistryKeyLookup/1735/Configure
ConfigurePath
2013-11-14T11:18:51+06:00 0:00.275 0.109u 6.8.0 Configure imconvert.exe[5788]:
configure.c/GetConfigureOptions/564/Configure
Searching for configure file: "C:\Program Files\ImageMagick-6.8.0-Q16\delegates.xml"
2013-11-14T11:18:51+06:00 0:00.281 0.109u 6.8.0 Configure imconvert.exe[5788]:
configure.c/GetConfigureOptions/564/Configure
Searching for configure file: "C:\Users\smunagal\.magick\delegates.xml"
2013-11-14T11:18:51+06:00 0:00.287 0.109u 6.8.0 Configure imconvert.exe[5788]:
delegate.c/LoadDelegateList/1228/Configure
Loading delegate configuration file "C:\Program Files\ImageMagick-6.8.0-Q16\delegates.xml" ...
2013-11-14T11:18:51+06:00 0:00.293 0.109u 6.8.0 Configure imconvert.exe[5788]:
nt-base.c/NTLocateGhostscript/1010/Configure
Ghostscript (GPL Ghostscript) version 9.10
2013-11-14T11:18:51+06:00 0:00.297 0.109u 6.8.0 Configure imconvert.exe[5788]:
nt-base.c/NTGhostscriptGetString/1106/Configure
registry: "HKEY_CURRENT_USER\SOFTWARE\GPL Ghostscript\9.10\GS_DLL" (failed)
2013-11-14T11:18:51+06:00 0:00.301 0.109u 6.8.0 Configure imconvert.exe[5788]:
nt-base.c/NTGhostscriptGetString/1102/Configure
registry: "HKEY_LOCAL_MACHINE\SOFTWARE\GPL Ghostscript\9.10\GS_DLL"="C:\Program Files\gs\gs9.10\bin\gsdll64.dll"
2013-11-14T11:18:51+06:00 0:00.307 0.109u 6.8.0 Resource imconvert.exe[5788]: resource.c/AcquireUniqueFileResource/441/Resource
test.pdf
2013-11-14T11:18:51+06:00 0:00.312 0.109u 6.8.0 Resource imconvert.exe[5788]: resource.c/AcquireUniqueFileResource/482/Resource
C:/Users/smunagal/AppData/Local/Temp/magick-5788dK-Fu5zVw6Qr
2013-11-14T11:18:51+06:00 0:00.316 0.109u 6.8.0 Configure imconvert.exe[5788]:
nt-base.c/NTGhostscriptGetString/1106/Configure
registry: "HKEY_CURRENT_USER\SOFTWARE\GPL Ghostscript\9.10\GS_DLL" (failed)
2013-11-14T11:18:51+06:00 0:00.320 0.109u 6.8.0 Configure imconvert.exe[5788]:
nt-base.c/NTGhostscriptGetString/1102/Configure
registry: "HKEY_LOCAL_MACHINE\SOFTWARE\GPL Ghostscript\9.10\GS_DLL"="C:\Program Files\gs\gs9.10\bin\gsdll64.dll"
Any idea on what could be causing this?

Thanks in Advance,
Senthil.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: convert -ping option not working for certain PDF files

Post by snibgo »

Can you put your pdf somewhere like dropbox.com and paste the link here?
snibgo's IM pages: im.snibgo.com
senthilkumartk
Posts: 6
Joined: 2013-04-03T23:31:23-07:00
Authentication code: 6789

Re: convert -ping option not working for certain PDF files

Post by senthilkumartk »

Sorry for the delayed reply.
The PDF having problems can be found at
https://dl.dropboxusercontent.com/u/157 ... .25.13.pdf
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: convert -ping option not working for certain PDF files

Post by dlemstra »

Are you using the x64 or the x86 version of ImageMagick?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: convert -ping option not working for certain PDF files

Post by snibgo »

Using a shorter filename, the command ...

Code: Select all

convert -ping 001586.pdf info:
... with IM v6.8.7-0 and Ghostscopt 9.07 works fine for me. It takes about 30 seconds on a very busy laptop.

EDIT: My successful test was on x64.
snibgo's IM pages: im.snibgo.com
Post Reply