diff --git a/bin/pdf2htmlEX b/bin/pdf2htmlEX index 8469cdc..a6e5682 100755 --- a/bin/pdf2htmlEX +++ b/bin/pdf2htmlEX @@ -1,6 +1,12 @@ #!/bin/bash set -e +TMPDIR=/tmp/pdf2htmlEX + +# prepare the temporary directory +test -d $TMPDIR || mkdir -p $TMPDIR +rm -f $TMPDIR/* 2>/dev/null + # Get directory of the script SOURCE="${BASH_SOURCE[0]}" while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done @@ -8,13 +14,13 @@ SCRIPT_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"/ # Execute ${SCRIPT_DIR}/pdftohtmlEX $* -if [ -f convert.pe ]; then +if [ -f $TMPDIR/convert.pe ]; then echo -n "Converting fonts: " - fontforge -script convert.pe 2>/dev/null + fontforge -script $TMPDIR/convert.pe 2>/dev/null echo "." -# rm convert.pe fi -rm *.encoding 2>/dev/null +#clean +rm -f $TMPDIR/* 2>/dev/null echo "Done." diff --git a/src/Consts.cc b/src/Consts.cc index 87ee1cf..07abc62 100644 --- a/src/Consts.cc +++ b/src/Consts.cc @@ -9,7 +9,7 @@ const double EPS = 1e-6; -const char * HTML_HEAD = "\n\ +const std::string HTML_HEAD = "\n\ \ \