CentOS 5.5 PDF to TXT
Install djvulibre-3.5.24
: Http://djvu.sourceforge.net/
Download and decompress the compressed package
#./Configure
# Make & make install & make clean
Install poppler-0.18.3.tar.gz
: Http://poppler.freedesktop.org/
#./Configure -- enable-xpdf-headers -- disable-poppler-qt4 -- disable-cms -- disable-poppler-cpp
# Make & make install & make clean
Error Handling During poppler installation:
Package requirements (fontconfig> = 2.0.0) were not met:
Solution: Install fontconfig-devel through yum and then use configure.
You must add the -- enable-xpdf-headers parameter When configuring; otherwise, the fatal error: GfxState. h: No such file or directory prompt appears when installing the pdf2djvu-0.7.12.
Install pdf2djvu-0.7.12
: Http://code.google.com/p/pdf2djvu/
#./Configure -- prefix =/usr/local/pdf2djvu-0.7.12 -- without-graphicsmagick -- without-xslt
# Make & make install & make clean
Compiler that can be specified
#. /Configure CFLAGS = "-O3" CC = "gcc462" CXXFLAGS = "-O3" CXX = "g ++ 462" -- prefix =/usr/local/pdf2djvu-0.7.12 -- without-graphicsmagick -- without-xslt
Set the path for the header file of the library, which is useful to the current shell in the following way:
Export PKG_CONFIG_PATH =/usr/local/lib/pkgconfig: $ PKG_CONFIG_PATH
Export PKG_CONFIG_PATH =/usr/lib/pkgconfig: $ PKG_CONFIG_PATH
Error handling:
Checking for DJVULIBRE... no
Configure: error: Package requirements (ddjvuapi> = 3.5.17) were not met:
No package 'ddjvuapi' found
Set the path for searching the header file of the Library
Export PKG_CONFIG_PATH =/usr/local/lib/pkgconfig: $ PKG_CONFIG_PATH
Prompt that the version of POPPLER is too low
Checking for POPPLER... no
Configure: error: Package requirements (poppler-splash> = 0.7.3) were not met:
Download new version installation
The error message "GfxState. h" is not found.
G ++-fopenmp-g-O2-Wall-Werror = overloaded-virtual-pthread-I/usr/local/include/poppler-c- o config. o config. cc
Cc1plus: error: unrecognized command line option "-Werror = overloaded-virtual"
Reinstall poppler-0.18.3.tar.gz and add the -- enable-xpdf-headers parameter.
Gcc compiler version is too low
For how to install the latest gcc version, see "manually install GCC4.6.2 in CentOS 5.5"
Usage:
#./Ipv2djvu-o/data/sphinx_doc_zhcn_0.9.djvu/data/sphinx_doc_zhcn_0.9.pdf
# Djvutxt/data/sphinx_doc_zhcn_0.9.djvu/data/sphinx_doc_zhcn_0.9.txt
Djvutxt is in the/usr/bin directory by default.