Convert JPEG to PDF never finishes.

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
SergioO

Convert JPEG to PDF never finishes.

Post by SergioO »

Hi, I'm using ImageMagick 6.2.8 03/31/08 on a RHEL 5, Kernel 2.6.18-128.1.1.el5 #1 SMP.

I'm used to convert JPEGs to PDFs using a very simple command like.

Code: Select all

convert Image.jpg File.pdf
When trying to use the same commands on this new environment (detailed above), It seems that the 'convert' commands never finishes.

I proceeded with the test below:

Code: Select all

convert -size 210x297 xc:green ./green.jpg
It produced a correct jpg file. Then...

Code: Select all

convert -verbose ./green.jpg ./green.pdf
The output was:

Code: Select all

./green.jpg JPEG 210x297 210x297+0+0 DirectClass 6.9e+02
I waited more than 10 minutes, nothing happened.
I tried using the same commands but replacing the JPEG by TIFF files, all worked OK.
What can be done to solve the problem of JPEG -> PDF conversion?
Thank you very much. Help is much appreciated.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Convert JPEG to PDF never finishes.

Post by magick »

We're sure what you say is happening but it defies all logic. We have never seen this issue before. Add -debug all,trace to your command line to see where the process is hanging.

Can you upgrade? The current release of ImageMagick is 6.5.0.
SergioO

Re: Convert JPEG to PDF never finishes.

Post by SergioO »

@magick

Hi, Thank you for your reply.

I used that option that you told me. Here's the output.

Code: Select all

[sergio@base tmp]$ convert -debug all ./green.jpg  ./green.pdf
09:23:49 0:01 0.000u 6.2.8 Configure convert[8702]: utility.c/ExpandFilenames/803/Configure
  Command line: convert{-debug}{all}{./green.jpg}{./green.pdf}
09:23:49 0:01 0.000u 6.2.8 Configure convert[8702]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/lib64/ImageMagick-6.2.8/config/coder.xml"
09:23:49 0:01 0.000u 6.2.8 Configure convert[8702]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/config/coder.xml"
09:23:49 0:01 0.000u 6.2.8 Configure convert[8702]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/doc/ImageMagick-6.2.8/coder.xml"
09:23:49 0:01 0.000u 6.2.8 Configure convert[8702]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/coder.xml"
09:23:49 0:01 0.000u 6.2.8 Configure convert[8702]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/home/sergio/.magick/coder.xml"
09:23:49 0:01 0.000u 6.2.8 Configure convert[8702]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "coder.xml"
09:23:49 0:01 0.000u 6.2.8 Configure convert[8702]: coder.c/LoadCoderList/612/Configure
  Loading coder file "/usr/share/ImageMagick-6.2.8/config/coder.xml" ...
09:23:49 0:01 0.000u 6.2.8 Module convert[8702]: module.c/OpenModule/1063/Module
  Searching for module "JPEG" using filename "jpeg.la"
09:23:49 0:01 0.000u 6.2.8 Module convert[8702]: module.c/GetMagickModulePath/583/Module
  Searching for coder module file "jpeg.la" ...
09:23:49 0:01 0.000u 6.2.8 Module convert[8702]: module.c/OpenModule/1083/Module
  Opening module at path "/usr/lib64/ImageMagick-6.2.8/modules-Q16/coders/jpeg.la"
09:23:49 0:01 0.000u 6.2.8 Module convert[8702]: module.c/OpenModule/1118/Module
  Method "RegisterJPEGImage" in module "JPEG" at address 0x2ac498da2e60
09:23:49 0:01 0.000u 6.2.8 Module convert[8702]: module.c/OpenModule/1133/Module
  Method "UnregisterJPEGImage" in module "JPEG" at address 0x2ac498da2e40
09:23:49 0:01 0.000u 6.2.8 Blob convert[8702]: blob.c/OpenBlob/2021/Blob
    read 686 magic header bytes
09:23:49 0:01 0.000u 6.2.8 Cache convert[8702]: cache.c/DestroyCacheInfo/1763/Cache
  destroy
09:23:49 0:01 0.000u 6.2.8 Configure convert[8702]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/lib64/ImageMagick-6.2.8/config/magic.xml"
09:23:49 0:01 0.000u 6.2.8 Configure convert[8702]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/config/magic.xml"
09:23:49 0:01 0.000u 6.2.8 Configure convert[8702]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/doc/ImageMagick-6.2.8/magic.xml"
09:23:49 0:01 0.000u 6.2.8 Configure convert[8702]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/magic.xml"
09:23:49 0:01 0.000u 6.2.8 Configure convert[8702]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/home/sergio/.magick/magic.xml"
09:23:49 0:01 0.000u 6.2.8 Configure convert[8702]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "magic.xml"
09:23:49 0:01 0.000u 6.2.8 Configure convert[8702]: magic.c/LoadMagicList/671/Configure
  Loading magic file "/usr/share/ImageMagick-6.2.8/config/magic.xml" ...
09:23:49 0:01 0.000u 6.2.8 Blob convert[8702]: blob.c/OpenBlob/2021/Blob
    read 686 magic header bytes
09:23:49 0:01 0.000u 6.2.8 Coder convert[8702]: jpeg.c/ReadJPEGImage/815/Coder
  Interlace: nonprogressive
09:23:49 0:01 0.000u 6.2.8 Coder convert[8702]: jpeg.c/ReadJPEGImage/817/Coder
  Data precision: 8
09:23:49 0:01 0.000u 6.2.8 Coder convert[8702]: jpeg.c/ReadJPEGImage/819/Coder
  Geometry: 210x297
09:23:49 0:01 0.000u 6.2.8 Coder convert[8702]: jpeg.c/ReadJPEGImage/899/Coder
  Quality: 100
09:23:49 0:01 0.000u 6.2.8 Coder convert[8702]: jpeg.c/ReadJPEGImage/992/Coder
  Colorspace: RGB
09:23:49 0:01 0.000u 6.2.8 Coder convert[8702]: jpeg.c/ReadJPEGImage/1019/Coder
  Sampling Factors: 2x2,1x1,1x1
09:23:49 0:01 0.000u 6.2.8 Resource convert[8702]: resource.c/AcquireMagickResource/216/Resource
  Area: 4.9e+02kb/4.9e+02kb/16gb
09:23:49 0:01 0.000u 6.2.8 Resource convert[8702]: resource.c/AcquireMagickResource/216/Resource
  Memory: 4.9e+02kb/4.9e+02kb/12gb
09:23:49 0:01 0.000u 6.2.8 Cache convert[8702]: cache.c/OpenCache/3035/Cache
  open ./green.jpg[0] (anonymous memory, 4.9e+02kb)
09:23:49 0:01 0.000u 6.2.8 Module convert[8702]: module.c/OpenModule/1063/Module
  Searching for module "PDF" using filename "pdf.la"
09:23:49 0:01 0.000u 6.2.8 Module convert[8702]: module.c/GetMagickModulePath/583/Module
  Searching for coder module file "pdf.la" ...
09:23:49 0:01 0.010u 6.2.8 Module convert[8702]: module.c/OpenModule/1083/Module
  Opening module at path "/usr/lib64/ImageMagick-6.2.8/modules-Q16/coders/pdf.la"
09:23:49 0:01 0.010u 6.2.8 Module convert[8702]: module.c/OpenModule/1118/Module
  Method "RegisterPDFImage" in module "PDF" at address 0x2ac499026230
09:23:49 0:01 0.010u 6.2.8 Module convert[8702]: module.c/OpenModule/1133/Module
  Method "UnregisterPDFImage" in module "PDF" at address 0x2ac499026210
09:23:49 0:01 0.010u 6.2.8 Configure convert[8702]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/lib64/ImageMagick-6.2.8/config/delegates.xml"
09:23:49 0:01 0.010u 6.2.8 Configure convert[8702]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/config/delegates.xml"
09:23:49 0:01 0.010u 6.2.8 Configure convert[8702]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/doc/ImageMagick-6.2.8/delegates.xml"
09:23:49 0:01 0.010u 6.2.8 Configure convert[8702]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/usr/share/ImageMagick-6.2.8/delegates.xml"
09:23:49 0:01 0.010u 6.2.8 Configure convert[8702]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "/home/sergio/.magick/delegates.xml"
09:23:49 0:01 0.010u 6.2.8 Configure convert[8702]: configure.c/GetConfigureOptions/486/Configure
  Searching for configure file: "delegates.xml"
09:23:49 0:01 0.010u 6.2.8 Configure convert[8702]: delegate.c/LoadDelegateList/1126/Configure
  Loading delegate file "/usr/lib64/ImageMagick-6.2.8/config/delegates.xml" ...
It hanged on the last line, forever...

Does this output indicate something wrong?

Thank you.
SergioO

Re: Convert JPEG to PDF never finishes.

Post by SergioO »

The only way I could solve this problem was to disregard the version that came with RHEL and compile the last stable version (6.5.0 as today).

As I don't need any PERL related function, I used the --without-perl flag.

After installing the compile version. Everything worked fine.

The above procedure solved my problem, but I still would like to use the RedHat packaged version.

Thanks.
Post Reply