summaryrefslogtreecommitdiffstats
path: root/handbook/poky-doc-tools/poky-docbook-to-pdf.in
diff options
context:
space:
mode:
Diffstat (limited to 'handbook/poky-doc-tools/poky-docbook-to-pdf.in')
-rw-r--r--handbook/poky-doc-tools/poky-docbook-to-pdf.in44
1 files changed, 44 insertions, 0 deletions
diff --git a/handbook/poky-doc-tools/poky-docbook-to-pdf.in b/handbook/poky-doc-tools/poky-docbook-to-pdf.in
new file mode 100644
index 0000000000..cc999ab995
--- /dev/null
+++ b/handbook/poky-doc-tools/poky-docbook-to-pdf.in
@@ -0,0 +1,44 @@
1#!/bin/sh
2
3if [ -z "$1" ]; then
4 echo "usage: [-v] $0 <docbook file>"
5 echo
6 echo "*NOTE* you need xsltproc, fop and nwalsh docbook stylesheets"
7 echo " installed for this to work!"
8 echo
9 exit 0
10fi
11
12if [ "$1" = "-v" ]; then
13 echo "Version @version@"
14 exit 1
15fi
16
17BASENAME=`basename $1 .xml` || exit 1
18FO="$BASENAME.fo"
19PDF="$BASENAME.pdf"
20
21xsltproc -o /tmp/titlepage.xsl \
22 --xinclude \
23 /usr/share/xml/docbook/stylesheet/nwalsh/template/titlepage.xsl \
24 @datadir@/common/titlepage.templates.xml || exit 1
25
26xsltproc --xinclude \
27 --stringparam hyphenate false \
28 --stringparam formal.title.placement "figure after" \
29 --stringparam ulink.show 1 \
30 --stringparam body.font.master 9 \
31 --stringparam title.font.master 11 \
32 --stringparam draft.watermark.image "@datadir@/common/draft.png" \
33 --output $FO \
34 @datadir@/common/poky-db-pdf.xsl \
35 $1 || exit 1
36
37fop -c @datadir@/common/fop-config.xml -fo $FO -pdf $PDF || exit 1
38
39rm -f $FO
40rm -f /tmp/titlepage.xsl
41
42echo
43echo " #### Success! $PDF ready. ####"
44echo \ No newline at end of file