File: fo2pdf

package info (click to toggle)
mysql%2B%2B 3.2.1%2Bpristine-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 13,624 kB
  • ctags: 11,252
  • sloc: cpp: 35,659; sh: 3,034; makefile: 951; perl: 786
file content (39 lines) | stat: -rwxr-xr-x 991 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
AHCMD=/usr/XSLFormatterV42/run.sh
FOPCMD=`which /usr/local/fop/fop /usr/bin/fop | head -1 2> /dev/null`
XEPCMD=/usr/local/xep/xep

FOFILE=$1
PDFFILE=$2
if [ -n "$FOFILE" -a -r "$FOFILE" -a -n "$PDFFILE" ]
then
	if [ -x "$XEPCMD" ]
	then
		echo Rendering $FOFILE to $PDFFILE with RenderX XEP...
		$XEPCMD -quiet -fo $FOFILE -pdf $PDFFILE
	elif [ -x "$AHCMD" ]
	then
		echo Rendering $FOFILE to $PDFFILE with Antenna House XSL Formatter...
		$AHCMD -silent -d $FOFILE -o $PDFFILE
	elif [ -x "$FOPCMD" ]
	then
		echo "Rendering $FOFILE to $PDFFILE with Apache FOP ($FOPCMD)..."
		$FOPCMD -q -fo $FOFILE $PDFFILE
	else
		echo 'Cannot find a working XSL-FO processor on your system!  See'
		echo 'doc/usrman/README.txt for instructions on installing one.'
		echo
		exit 1
	fi
else
	if [ -n "$FOFILE" ]
	then
		echo "XSL-FO file $FOFILE does not exist."
		echo
	fi
	echo "usage: $0 fofile pdffile"
	echo
	echo '    Translates XSL-FO in fofile to PDF output in pdffile.'
	echo
	exit 1
fi