summaryrefslogtreecommitdiff
path: root/contrib/pdfmark
diff options
context:
space:
mode:
authorkeithmarshall <keithmarshall>2006-07-14 23:35:37 +0000
committerkeithmarshall <keithmarshall>2006-07-14 23:35:37 +0000
commit468befb24ae77ba826a82d1a81f2a3948958cbd5 (patch)
tree1321989c5916e9a28af033d7236f36857e0bb8a6 /contrib/pdfmark
parentd0aaf996772a9b623023b45a47fa6ea656d64872 (diff)
downloadgroff-468befb24ae77ba826a82d1a81f2a3948958cbd5.tar.gz
* pdfroff.sh (--emit-ps): New command line option; implement it.
(--help): Add description for it. * pdfroff.man (--emit-ps): Document it.
Diffstat (limited to 'contrib/pdfmark')
-rw-r--r--contrib/pdfmark/pdfroff.man16
-rw-r--r--contrib/pdfmark/pdfroff.sh27
2 files changed, 39 insertions, 4 deletions
diff --git a/contrib/pdfmark/pdfroff.man b/contrib/pdfmark/pdfroff.man
index 04b60e05..8402ee75 100644
--- a/contrib/pdfmark/pdfroff.man
+++ b/contrib/pdfmark/pdfroff.man
@@ -101,6 +101,7 @@ pdfroff \- create PDF documents using
.opta T dev
.opta w name
.opta W name
+.opt -emit-ps
.opt -no-toc-relocation
.opte -stylesheet name
.optx -pdf-output name
@@ -291,6 +292,21 @@ Causes
to display a summary of the its usage syntax, and supported options,
and then exit.
.TP
+.B \-\-emit\-ps
+Suppresses the final output conversion step,
+causing
+.B pdfroff
+to emit PostScript output instead of PDF.
+This may be useful,
+to capture intermediate PostScript output,
+when using a specialised postprocessor,
+such as
+.I gpresent
+for example,
+in place of the default
+.I GhostScript
+PDF writer.
+.TP
.B \-\-keep\-temporary\-files
Suppresses the deletion of temporary files,
which normally occurs after
diff --git a/contrib/pdfmark/pdfroff.sh b/contrib/pdfmark/pdfroff.sh
index 739014c3..053a7b97 100644
--- a/contrib/pdfmark/pdfroff.sh
+++ b/contrib/pdfmark/pdfroff.sh
@@ -148,10 +148,11 @@
TOC_FORMAT="-rPHASE=1"
BODY_FORMAT="-rPHASE=2"
#
- LONGOPTS=" keep-temporary-files
+ LONGOPTS="
help reference-dictionary no-reference-dictionary
stylesheet pdf-output no-pdf-output
version report-progress no-toc-relocation
+ emit-ps keep-temporary-files
"
# Parse the command line, to identify 'pdfroff' specific options.
# Collect all other parameters into new argument and file lists,
@@ -201,6 +202,12 @@
Enable console messages, indicating the progress of the
PDF document formatting process.
+ --emit-ps
+ Emit PostScript output instead of PDF; this may be useful
+ when the ultimate PDF output is to be generated by a more
+ specialised postprocessor, (e.g. gpresent), rather than
+ the default GhostScript PDF writer.
+
--pdf-output=name
Write the PDF output stream to file 'name'; if this option
is unspecified, standard output is used for PDF output.
@@ -258,6 +265,10 @@
trap "" 0
;;
+ --emit-ps)
+ PDFWRITE="$CAT"
+ ;;
+
--pdf-output)
PDF_OUTPUT="$OPTARG"
;;
@@ -564,7 +575,15 @@
# PostScript intermediate files into a single PDF output file.
#
$SAY >&2 $n "Writing PDF output ..$c"
- PDFWRITE="$GS -dQUIET -dBATCH -dNOPAUSE -sDEVICE=pdfwrite"
+ if test -z "$PDFWRITE"
+ then
+ PDFWRITE="$GS -dQUIET -dBATCH -dNOPAUSE -sDEVICE=pdfwrite
+ -sOutputFile="${PDF_OUTPUT-"-"}
+
+ elif test -n "$PDF_OUTPUT"
+ then
+ exec > $PDF_OUTPUT
+ fi
#
# (This 'sed' script is a hack, to eliminate redundant blank pages).
#
@@ -579,8 +598,8 @@
:finish
N
/^%%Page:.*0 *Cg *EP/d
- ' $TC_DATA $BD_DATA | $PDFWRITE -sOutputFile=${PDF_OUTPUT-"-"} $CS_DATA -
+ ' $TC_DATA $BD_DATA | $PDFWRITE $CS_DATA -
$SAY >&2 ". done"
#
# ------------------------------------------------------------------------------
-# $RCSfile: pdfroff.sh,v $ $Revision: 1.9 $: end of file
+# $RCSfile: pdfroff.sh,v $ $Revision: 1.10 $: end of file