Last active
April 27, 2022 19:21
-
-
Save giordanocardillo/37272e794a844ecb42574e987daf3750 to your computer and use it in GitHub Desktop.
Installing pdf2htmlEX on Ubuntu Server 14.04
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
RESTORE=$(echo '\033[0m') | |
BOLD=$(echo '\033[1m') | |
GREEN=$(echo '\033[1;32m') | |
echo | |
echo ${GREEN} | |
echo "------------------------------" | |
echo " Installing prerequisites " | |
echo "------------------------------" | |
echo | |
echo ${RESTORE} | |
apt-get update | |
apt-get install -y build-essential checkinstall git cmake | |
apt-get install -y poppler-data autotools-dev libjpeg-dev libtiff4-dev libpng12-dev libgif-dev libxt-dev autoconf automake libtool bzip2 libxml2-dev libuninameslist-dev libspiro-dev python-dev libpango1.0-dev libcairo2-dev chrpath uuid-dev uthash-dev libopenjpeg-dev | |
cd ~ | |
mkdir src | |
cd src/ | |
echo ${GREEN} | |
echo | |
echo "--------------------------" | |
echo " Downloading sources " | |
echo "--------------------------" | |
echo | |
echo ${RESTORE} | |
wget http://poppler.freedesktop.org/poppler-0.26.5.tar.xz | |
wget http://download.savannah.gnu.org/releases-noredirect/freetype/freetype-2.6.3.tar.gz | |
wget http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.12.0.tar.bz2 | |
git clone https://github.com/coolwanglu/fontforge.git | |
git clone https://github.com/coolwanglu/pdf2htmlEX.git | |
echo ${GREEN} | |
echo | |
echo "------------------------" | |
echo " Installing poppler " | |
echo "------------------------" | |
echo | |
echo ${RESTORE} | |
tar xf poppler-0.26.5.tar.xz | |
cd poppler-0.26.5 | |
./configure --prefix=/usr --enable-xpdf-headers && make && make install | |
cd .. | |
echo ${GREEN} | |
echo | |
echo "-------------------------" | |
echo " Installing freetype " | |
echo "-------------------------" | |
echo | |
echo ${RESTORE} | |
tar -zvxf freetype-2.6.3.tar.gz | |
cd freetype-2.6.3 | |
./configure && make && make install | |
cd .. | |
echo ${GREEN} | |
echo | |
echo "---------------------------" | |
echo " Installing fontconfig " | |
echo "---------------------------" | |
echo | |
echo ${RESTORE} | |
tar jxvf fontconfig-2.12.0.tar.bz2 | |
cd fontconfig-2.12.0 | |
./configure && make && make install | |
cd .. | |
echo ${GREEN} | |
echo | |
echo "-------------------------------------------" | |
echo " Installing fontforge " | |
echo | |
echo " This will take a while, grab a coffee " | |
echo "-------------------------------------------" | |
echo | |
echo ${RESTORE} | |
cd fontforge | |
git checkout pdf2htmlEX | |
./autogen.sh | |
./configure --prefix=/usr && make && make install | |
cd .. | |
echo ${GREEN} | |
echo | |
echo "---------------------------" | |
echo " Installing pdf2htmlEX " | |
echo "---------------------------" | |
echo | |
echo ${RESTORE} | |
cd pdf2htmlEX | |
cmake . && make && make install | |
echo ${GREEN} | |
echo | |
echo "------------------------------------------------" | |
echo " FINISHED! " | |
echo "------------------------------------------------" | |
echo | |
echo ${RESTORE} | |
echo ${BOLD} | |
pdf2htmlEX --version | |
echo ${RESTORE} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Instructions