[SOLVED]convert PDF files - error: pdf.la not found
Posted: 2014-06-29T09:13:05-07:00
EDIT:
Quick solution: Install ghostscript.
Hello,
I tried to convert PDF to png today and unfortunately I'm getting this error:
$ convert example.pdf -thumbnail 500x500 example.png
convert: unable to load module `/usr/lib/ImageMagick-6.8.9//modules-Q16HDRI/coders/pdf.la': file not found @ error/module.c/OpenModule/1282.
convert: no decode delegate for this image format `PDF' @ error/constitute.c/ReadImage/501.
convert: no images defined `ated.png' @ error/convert.c/ConvertImageCommand/3187.
I checked it pdf.la exists and it does:
$ ls -l /usr/lib/ImageMagick-6.8.9/modules-Q16HDRI/coders/pdf.la
-rwxr-xr-x 1 root root 1.1K Jun 27 03:02 /usr/lib/ImageMagick-6.8.9/modules-Q16HDRI/coders/pdf.la*
Here is output of:
$ convert -list configure
Path: /usr/lib/ImageMagick-6.8.9//config-Q16HDRI/configure.xml
Name Value
-------------------------------------------------------------------------------
CC gcc -std=gnu99 -std=gnu99
CFLAGS -I/usr/include/lqr-1 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -fopenmp -march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -Wall -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16
CODER_PATH /usr/lib/ImageMagick-6.8.9/modules-Q16HDRI/coders
CONFIGURE ./configure '--prefix=/usr' '--sysconfdir=/etc' '--with-modules' '--enable-hdri' '--with-wmf' '--with-openexr' '--with-xml' '--with-lcms2' '--with-webp' '--with-gslib' '--with-gs-font-dir=/usr/share/fonts/Type1' '--with-perl' '--with-perl-options=INSTALLDIRS=vendor' '--with-lqr' '--with-rsvg' '--with-openjp2' '--without-gvc' '--without-djvu' '--without-autotrace' '--without-jbig' '--without-fpx' '--without-dps' '--without-fftw' 'CFLAGS=-march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector --param=ssp-buffer-size=4' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' 'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'CXXFLAGS=-march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector --param=ssp-buffer-size=4'
CONFIGURE_PATH /etc/ImageMagick-6/
COPYRIGHT Copyright (C) 1999-2014 ImageMagick Studio LLC
CPPFLAGS -I/usr/include/ImageMagick-6
CXX g++
CXXFLAGS -march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -pthread
DEFS -DHAVE_CONFIG_H
DELEGATES bzlib mpeg fontconfig freetype gslib jng jpeg lcms lqr lzma openjp2 pango png ps rsvg tiff webp wmf x xml zlib
DISTCHECK_CONFIG_FLAGS 'CFLAGS=-march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector --param=ssp-buffer-size=4' 'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' --disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-dps=no --with-djvu=no --with-fftw=no --with-fpx=no --with-fontpath= --with-gs-font-dir=/usr/share/fonts/Type1 --with-gvc=no
DOCUMENTATION_PATH /usr/share/doc/ImageMagick-6
EXEC-PREFIX /usr
EXECUTABLE_PATH /usr/bin
FEATURES DPC HDRI OpenMP Modules
FILTER_PATH /usr/lib/ImageMagick-6.8.9/modules-Q16HDRI/filters
HOST armv6l-unknown-linux-gnueabihf
INCLUDE_PATH /usr/include/ImageMagick-6
LDFLAGS -L/usr/lib -Wl,-O1,--sort-common,--as-needed,-z,relro
LIB_VERSION 0x689
LIB_VERSION_NUMBER 6,8,9,4
LIBRARY_PATH /usr/lib/ImageMagick-6.8.9
LIBS -llcms2 -lfreetype -llqr-1 -lglib-2.0 -lfontconfig -lfreetype -lXext -lX11 -lXt -llzma -lbz2 -lz -lltdl -lm -lgomp
NAME ImageMagick
PCFLAGS -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16
PREFIX /usr
QuantumDepth 16
RELEASE_DATE 2014-06-26
SHARE_PATH /usr/share/ImageMagick-6
SHAREARCH_PATH /usr/lib/ImageMagick-6.8.9/config-Q16HDRI
SVN_REVISION 16057
TARGET_CPU armv6l
TARGET_OS linux-gnueabihf
TARGET_VENDOR unknown
VERSION 6.8.9
WEBSITE http://www.imagemagick.org
Path: [built-in]
Name Value
-------------------------------------------------------------------------------
FEATURES OpenMP
NAME ImageMagick
QuantumDepth 16
I'm running version 6.8.9.4-1 on Archlinux ARM. On other PC with Archlinux (non-ARM) I have same version and it's working OK.
Maybe it can do something with this line:
DELEGATES bzlib mpeg fontconfig freetype gslib jng jpeg lcms lqr lzma openjp2 pango png ps rsvg tiff webp wmf x xml zlib
- there is no "pdf" in it. But it isn't on the second tested PC also and there it works. Here is output from the second PC
$ convert -list configure
Path: /usr/lib/ImageMagick-6.8.9//config-Q16HDRI/configure.xml
Name Value
-------------------------------------------------------------------------------
CC gcc -std=gnu99 -std=gnu99
CFLAGS -I/usr/include/lqr-1 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -pthread -fopenmp -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -Wall -march=x86-64 -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16
CODER_PATH /usr/lib/ImageMagick-6.8.9/modules-Q16HDRI/coders
CONFIGURE ./configure '--prefix=/usr' '--sysconfdir=/etc' '--with-modules' '--enable-hdri' '--with-wmf' '--with-openexr' '--with-xml' '--with-lcms2' '--with-webp' '--with-gslib' '--with-gs-font-dir=/usr/share/fonts/Type1' '--with-perl' '--with-perl-options=INSTALLDIRS=vendor' '--with-lqr' '--with-rsvg' '--enable-opencl' '--with-openjp2' '--without-gvc' '--without-djvu' '--without-autotrace' '--without-jbig' '--without-fpx' '--without-dps' '--without-fftw' '--with-gcc-arch=x86-64' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' 'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4'
CONFIGURE_PATH /etc/ImageMagick-6/
COPYRIGHT Copyright (C) 1999-2014 ImageMagick Studio LLC
CPPFLAGS -I/usr/include/ImageMagick-6
CXX g++
CXXFLAGS -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -pthread
DEFS -DHAVE_CONFIG_H
DELEGATES bzlib mpeg fontconfig freetype gslib jng jpeg lcms lqr lzma openjp2 pango png ps rsvg tiff webp wmf x xml zlib
DISTCHECK_CONFIG_FLAGS 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4' 'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' --disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-dps=no --with-djvu=no --with-fftw=no --with-fpx=no --with-fontpath= --with-gs-font-dir=/usr/share/fonts/Type1 --with-gvc=no
DOCUMENTATION_PATH /usr/share/doc/ImageMagick-6
EXEC-PREFIX /usr
EXECUTABLE_PATH /usr/bin
FEATURES DPC HDRI OpenCL OpenMP Modules
FILTER_PATH /usr/lib/ImageMagick-6.8.9/modules-Q16HDRI/filters
HOST x86_64-unknown-linux-gnu
INCLUDE_PATH /usr/include/ImageMagick-6
LDFLAGS -L/usr/lib -Wl,-O1,--sort-common,--as-needed,-z,relro
LIB_VERSION 0x689
LIB_VERSION_NUMBER 6,8,9,4
LIBRARY_PATH /usr/lib/ImageMagick-6.8.9
LIBS -llcms2 -lfreetype -llqr-1 -lglib-2.0 -lfontconfig -lfreetype -lXext -lX11 -lXt -llzma -lbz2 -lz -lltdl -lm -lgomp -lm
NAME ImageMagick
PCFLAGS -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16
PREFIX /usr
QuantumDepth 16
RELEASE_DATE 2014-06-25
SHARE_PATH /usr/share/ImageMagick-6
SHAREARCH_PATH /usr/lib/ImageMagick-6.8.9/config-Q16HDRI
SVN_REVISION 16057
TARGET_CPU x86_64
TARGET_OS linux-gnu
TARGET_VENDOR unknown
VERSION 6.8.9
WEBSITE http://www.imagemagick.org
Path: [built-in]
Name Value
-------------------------------------------------------------------------------
FEATURES OpenMP
NAME ImageMagick
QuantumDepth 16
So I think it's a bug. Thank you
Quick solution: Install ghostscript.
Hello,
I tried to convert PDF to png today and unfortunately I'm getting this error:
$ convert example.pdf -thumbnail 500x500 example.png
convert: unable to load module `/usr/lib/ImageMagick-6.8.9//modules-Q16HDRI/coders/pdf.la': file not found @ error/module.c/OpenModule/1282.
convert: no decode delegate for this image format `PDF' @ error/constitute.c/ReadImage/501.
convert: no images defined `ated.png' @ error/convert.c/ConvertImageCommand/3187.
I checked it pdf.la exists and it does:
$ ls -l /usr/lib/ImageMagick-6.8.9/modules-Q16HDRI/coders/pdf.la
-rwxr-xr-x 1 root root 1.1K Jun 27 03:02 /usr/lib/ImageMagick-6.8.9/modules-Q16HDRI/coders/pdf.la*
Here is output of:
$ convert -list configure
Path: /usr/lib/ImageMagick-6.8.9//config-Q16HDRI/configure.xml
Name Value
-------------------------------------------------------------------------------
CC gcc -std=gnu99 -std=gnu99
CFLAGS -I/usr/include/lqr-1 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -fopenmp -march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -Wall -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16
CODER_PATH /usr/lib/ImageMagick-6.8.9/modules-Q16HDRI/coders
CONFIGURE ./configure '--prefix=/usr' '--sysconfdir=/etc' '--with-modules' '--enable-hdri' '--with-wmf' '--with-openexr' '--with-xml' '--with-lcms2' '--with-webp' '--with-gslib' '--with-gs-font-dir=/usr/share/fonts/Type1' '--with-perl' '--with-perl-options=INSTALLDIRS=vendor' '--with-lqr' '--with-rsvg' '--with-openjp2' '--without-gvc' '--without-djvu' '--without-autotrace' '--without-jbig' '--without-fpx' '--without-dps' '--without-fftw' 'CFLAGS=-march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector --param=ssp-buffer-size=4' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' 'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'CXXFLAGS=-march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector --param=ssp-buffer-size=4'
CONFIGURE_PATH /etc/ImageMagick-6/
COPYRIGHT Copyright (C) 1999-2014 ImageMagick Studio LLC
CPPFLAGS -I/usr/include/ImageMagick-6
CXX g++
CXXFLAGS -march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -pthread
DEFS -DHAVE_CONFIG_H
DELEGATES bzlib mpeg fontconfig freetype gslib jng jpeg lcms lqr lzma openjp2 pango png ps rsvg tiff webp wmf x xml zlib
DISTCHECK_CONFIG_FLAGS 'CFLAGS=-march=armv6 -mfloat-abi=hard -mfpu=vfp -O2 -pipe -fstack-protector --param=ssp-buffer-size=4' 'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' --disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-dps=no --with-djvu=no --with-fftw=no --with-fpx=no --with-fontpath= --with-gs-font-dir=/usr/share/fonts/Type1 --with-gvc=no
DOCUMENTATION_PATH /usr/share/doc/ImageMagick-6
EXEC-PREFIX /usr
EXECUTABLE_PATH /usr/bin
FEATURES DPC HDRI OpenMP Modules
FILTER_PATH /usr/lib/ImageMagick-6.8.9/modules-Q16HDRI/filters
HOST armv6l-unknown-linux-gnueabihf
INCLUDE_PATH /usr/include/ImageMagick-6
LDFLAGS -L/usr/lib -Wl,-O1,--sort-common,--as-needed,-z,relro
LIB_VERSION 0x689
LIB_VERSION_NUMBER 6,8,9,4
LIBRARY_PATH /usr/lib/ImageMagick-6.8.9
LIBS -llcms2 -lfreetype -llqr-1 -lglib-2.0 -lfontconfig -lfreetype -lXext -lX11 -lXt -llzma -lbz2 -lz -lltdl -lm -lgomp
NAME ImageMagick
PCFLAGS -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16
PREFIX /usr
QuantumDepth 16
RELEASE_DATE 2014-06-26
SHARE_PATH /usr/share/ImageMagick-6
SHAREARCH_PATH /usr/lib/ImageMagick-6.8.9/config-Q16HDRI
SVN_REVISION 16057
TARGET_CPU armv6l
TARGET_OS linux-gnueabihf
TARGET_VENDOR unknown
VERSION 6.8.9
WEBSITE http://www.imagemagick.org
Path: [built-in]
Name Value
-------------------------------------------------------------------------------
FEATURES OpenMP
NAME ImageMagick
QuantumDepth 16
I'm running version 6.8.9.4-1 on Archlinux ARM. On other PC with Archlinux (non-ARM) I have same version and it's working OK.
Maybe it can do something with this line:
DELEGATES bzlib mpeg fontconfig freetype gslib jng jpeg lcms lqr lzma openjp2 pango png ps rsvg tiff webp wmf x xml zlib
- there is no "pdf" in it. But it isn't on the second tested PC also and there it works. Here is output from the second PC
$ convert -list configure
Path: /usr/lib/ImageMagick-6.8.9//config-Q16HDRI/configure.xml
Name Value
-------------------------------------------------------------------------------
CC gcc -std=gnu99 -std=gnu99
CFLAGS -I/usr/include/lqr-1 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -pthread -fopenmp -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -Wall -march=x86-64 -fexceptions -pthread -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16
CODER_PATH /usr/lib/ImageMagick-6.8.9/modules-Q16HDRI/coders
CONFIGURE ./configure '--prefix=/usr' '--sysconfdir=/etc' '--with-modules' '--enable-hdri' '--with-wmf' '--with-openexr' '--with-xml' '--with-lcms2' '--with-webp' '--with-gslib' '--with-gs-font-dir=/usr/share/fonts/Type1' '--with-perl' '--with-perl-options=INSTALLDIRS=vendor' '--with-lqr' '--with-rsvg' '--enable-opencl' '--with-openjp2' '--without-gvc' '--without-djvu' '--without-autotrace' '--without-jbig' '--without-fpx' '--without-dps' '--without-fftw' '--with-gcc-arch=x86-64' 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' 'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4'
CONFIGURE_PATH /etc/ImageMagick-6/
COPYRIGHT Copyright (C) 1999-2014 ImageMagick Studio LLC
CPPFLAGS -I/usr/include/ImageMagick-6
CXX g++
CXXFLAGS -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -pthread
DEFS -DHAVE_CONFIG_H
DELEGATES bzlib mpeg fontconfig freetype gslib jng jpeg lcms lqr lzma openjp2 pango png ps rsvg tiff webp wmf x xml zlib
DISTCHECK_CONFIG_FLAGS 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4' 'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' --disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-dps=no --with-djvu=no --with-fftw=no --with-fpx=no --with-fontpath= --with-gs-font-dir=/usr/share/fonts/Type1 --with-gvc=no
DOCUMENTATION_PATH /usr/share/doc/ImageMagick-6
EXEC-PREFIX /usr
EXECUTABLE_PATH /usr/bin
FEATURES DPC HDRI OpenCL OpenMP Modules
FILTER_PATH /usr/lib/ImageMagick-6.8.9/modules-Q16HDRI/filters
HOST x86_64-unknown-linux-gnu
INCLUDE_PATH /usr/include/ImageMagick-6
LDFLAGS -L/usr/lib -Wl,-O1,--sort-common,--as-needed,-z,relro
LIB_VERSION 0x689
LIB_VERSION_NUMBER 6,8,9,4
LIBRARY_PATH /usr/lib/ImageMagick-6.8.9
LIBS -llcms2 -lfreetype -llqr-1 -lglib-2.0 -lfontconfig -lfreetype -lXext -lX11 -lXt -llzma -lbz2 -lz -lltdl -lm -lgomp -lm
NAME ImageMagick
PCFLAGS -fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16
PREFIX /usr
QuantumDepth 16
RELEASE_DATE 2014-06-25
SHARE_PATH /usr/share/ImageMagick-6
SHAREARCH_PATH /usr/lib/ImageMagick-6.8.9/config-Q16HDRI
SVN_REVISION 16057
TARGET_CPU x86_64
TARGET_OS linux-gnu
TARGET_VENDOR unknown
VERSION 6.8.9
WEBSITE http://www.imagemagick.org
Path: [built-in]
Name Value
-------------------------------------------------------------------------------
FEATURES OpenMP
NAME ImageMagick
QuantumDepth 16
So I think it's a bug. Thank you