summaryrefslogtreecommitdiff
path: root/graphics/pdf2html
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pdf2html')
-rwxr-xr-xgraphics/pdf2html28
1 files changed, 28 insertions, 0 deletions
diff --git a/graphics/pdf2html b/graphics/pdf2html
new file mode 100755
index 0000000..1e53501
--- /dev/null
+++ b/graphics/pdf2html
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+filter='./pbm2png'
+ghostscript='gs'
+basename='letters'
+titlestring='Letters generated for Links'
+bottom=''
+pageoffset='0'
+
+PATH=$PATH:./
+hdpi=`expr $hundred_dpi '*' 17 '/' 100`
+vdpi=`expr $hundred_dpi '*' 15 '/' 100`
+start=$2
+if [ "$start" = "" ]; then
+ start=0
+fi
+start1=`expr $start + 1`
+
+pname="/tmp/.pdf2html_pipe_$$"
+function delete () { rm -f $pname; }
+trap delete SIGINT
+
+rm -f $pname
+mkfifo $pname
+$ghostscript -q -dFirstPage=$start1 -dNOPAUSE -dBATCH -sDEVICE=pbmraw -sPAPERSIZE=a4 -sOutputFile="$pname" -r"$hdpi"x"$vdpi" $1 &
+$filter "$hundred_dpi" "$basename" "$titlestring" "$bottom" "$pageoffset" "$pname" $start
+rm -f $pname
+