Comments (4)
You should try poppler version 0.81 and fontforge tag 20170731.
To install poppler:
apt-get install pkg-config fontconfig libfontconfig1-dev libjpeg-dev libtiff5 libtiff5-dev libnss3 libnss3-dev libcairo2 libcairo2-dev cmake libopenjp2-7 libopenjp2-7-dev
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_UNSTABLE_API_ABI_HEADERS=ON ..
make
sudo make install
to install fontforge:
apt-get install libpango1.0-0 libpango1.0-dev libxml2 libxml2-dev libspiro-dev libgif-dev
git clone --depth 1 --single-branch --branch 20170731 https://github.com/fontforge/fontforge.git
cd fontforge/
git checkout tags/20170731
./bootstrap
./configure --without-x
make
make install
from pdf2htmlex.
Hey ik0,
This is a two part problem.
First part is installing to a different prefix.
CMake builds take INSTALL_PREFIX argument. For Poppler it will be
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/home/ik0/pdf2htmlEX_and_deps -DCMAKE_BUILD_TYPE=Release -DENABLE_UNSTABLE_API_ABI_HEADERS=ON ..
make
make install
Autotools takes --prefix argument, so you can
./configure --prefix=/home/ik0/pdf2htmlEX_and_deps
make
make install
Second part is telling pdf2htmlEX to consume libraries from /home/ik0/pdf2htmlEX_and_deps and
Most libraries produce either pkg-config.pc or CMake find_package configs.
The former available in /usr/lib/pkgconfig, the latter in /usr/lib/cmake.
To find these libraries pdf2htmlEX uses pkg_check_modules, which internally uses pkg-config,
so that's the only one that we need to worry about right now.
First verify that you can find them manually.
pkg-config accepts PKG_CONFIG_PATH environment variable to tell it where it should look for .pc files first, before trying /usr/lib/pkgconfig . If I recall correctly one of these dependencies is installed to lib, other is to lib64, so we need to pass both.
PKG_CONFIG_PATH=/home/ik0/pdf2htmlEX_and_deps/lib/pkgconfig:/home/ik0/pdf2htmlEX_and_deps/lib64/pkgconfig pkg-config --cflags poppler libfontforge
Once you know that they're both installed "correctly", you can compile pdf2htmlEX with them
cd pdf2htmlEX_sources
mkdir build
cd build
PKG_CONFIG_PATH=/home/ik0/pdf2htmlEX_and_deps/lib/pkgconfig:/home/ik0/pdf2htmlEX_and_deps/lib64/pkgconfig cmake -DCMAKE_INSTALL_PREFIX=/home/ik0/pdf2htmlEX_and_deps ..
make
At this point you may be greeted by an error, which tells you that some header from poppler can't find "poppler/GfxState.h". Poppler's pkgconfig.pc file defines it's include path as /home/ik0/pdf2htmlEX_and_deps/include/poppler/ and this requested file would look like /home/ik0/pdf2htmlEX_and_deps/include/poppler/poppler/GfxState.h
Edit Poppler's pkgconfig.pc ( /home/ik0/pdf2htmlEX_and_deps/lib64/pkgconfig/poppler.pc ), so it includes the root include dir too.
CFlags: -I${includedir}/poppler
becomes
CFlags: -I${includedir}/poppler -I${includedir}
Try buildinging pdf2htmlEX again
cd pdf2htmlEX_sources
mkdir build
cd build
PKG_CONFIG_PATH=/home/ik0/pdf2htmlEX_and_deps/lib/pkgconfig:/home/ik0/pdf2htmlEX_and_deps/lib64/pkgconfig cmake -DCMAKE_INSTALL_PREFIX=/home/ik0/pdf2htmlEX_and_deps ..
make
make install
Try running the newly installed pdf2htmlEX
/home/ik0/pdf2htmlEX_and_deps/bin/pdf2htmlEX
You might get an error complaining about libpoppler.so not being found.
LD_LIBRARY_PATH=/home/ik0/pdf2htmlEX_and_deps/lib:/home/ik0/pdf2htmlEX_and_deps/lib64 /home/ik0/pdf2htmlEX_and_deps/bin/pdf2htmlEX
from pdf2htmlex.
Hi, Guillermo,
thanks for reply. I've compiled poppler 0.81 and fontforge. How to tell pdf2htmlEX to use them in non standard path ? I do not want to overwrite my system libraries before I test everything .
from pdf2htmlex.
Hey Guillermo and Vilius
thanks a lot ! That should be written in some Howto or Wiki. Very useful !
a little details: i did not get error about "poppler/GfxState.h" . I've installed poppler in /usr/local/poppler-0.81 and add path to file in /etc/ld.so.conf.d/ so everyone could start pdf2htmlEX without adding LD_LIBRARY_PATH every time.
from pdf2htmlex.
Related Issues (20)
- CMake Deprecation Warning: Compatibility with CMake < 2.8.12 will be removed from a future version of CMake
- Feature Request: Open external links in New tab
- Feature Request: Save page state in URL
- Create a new latest docker image on docker hub HOT 4
- Maintaining the visible form of text when using cut-paste
- Heap-Buffer-Overflow in embed_font Function
- Doubt: Blocks order
- how to install it and can you tell how we can convert pdf to html HOT 3
- how to restore table structure HOT 1
- how to install on macos HOT 1
- Bug: Gen inside xref table too large (bigger than INT_MAX)
- libjpeg-turbo8 is not present on recent Debian versions HOT 1
- Rotated annotations
- Request: Support actionLaunch/actionGoToR links
- Why are the matrix styles needed?
- Why is some of the text not extracted and is basked into the generated images?
- TOC and many internal crossref links?
- Issue in selecting text HOT 1
- Converting error HOT 2
- convert all PDF content into one web page
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdf2htmlex.