Debian Codegraph @

cgi-bin/topdf

raw
1 #!/bin/sh
2 #
3 # Sample "portal" script to convert the named HTML file to PDF on-the-fly.
4 #
5 # Usage: http://www.domain.com/path/topdf/path/filename.html
6 #
7
8 #
9 # The "options" variable contains any options you want to pass to HTMLDOC.
10 #
11
12 options="-t pdf --quiet --jpeg --webpage --header .t. --footer .1."
13
14 #
15 # Tell the browser to expect a PDF file...
16 #
17
18 echo "Content-Type: application/pdf"
19 echo ""
20
21 #
22 # Run HTMLDOC to generate the PDF file...
23 #
24
25 htmldoc $options http://${SERVER_NAME}:${SERVER_PORT}${PATH_INFO}?$QUERY_STRING