--- pdfroff Sat May 27 21:52:40 2006 +++ pdfroff2 Sat May 27 21:58:18 2006 @@ -145,6 +145,7 @@ help reference-dictionary no-reference-dictionary stylesheet pdf-output no-pdf-output version report-progress no-toc-relocation + leave-postscript-only " # Parse the command line, to identify 'pdfroff' specific options. # Collect all other parameters into new argument and file lists, @@ -266,6 +267,10 @@ --no-toc-relocation) TC_DATA="" TOC_FORMAT="" BODY_FORMAT="" ;; + + --leave-postscript-only) + LEAVE_POSTSCRIPT_ONLY="YES" + ;; # # any other non-null match must have matched more than one defined case, # so report the ambiguity, and bail out. @@ -541,15 +546,22 @@ # In all cases, a final 'groff' pass is required, to format the document body. # $SAY >&2 $n "Formatting document ... body section ..$c" - eval $STREAM $GROFF_STYLE $BODY_FORMAT $REFCOPY $INPUT_FILES > $BD_DATA - $SAY >&2 ". done" + if test -n "$LEAVE_POSTSCRIPT_ONLY" + then + eval $STREAM $GROFF_STYLE $BODY_FORMAT $REFCOPY $INPUT_FILES + $SAY >&2 ". done" + exit 0 + else + eval $STREAM $GROFF_STYLE $BODY_FORMAT $REFCOPY $INPUT_FILES > $BD_DATA + $SAY >&2 ". done" + fi # # Finally ... # Invoke GhostScript as a PDF writer, to bind all of the generated # PostScript intermediate files into a single PDF output file. # $SAY >&2 $n "Writing PDF output ..$c" - PDFWRITE="$GS -dQUIET -dBATCH -dNOPAUSE -sDEVICE=pdfwrite" + PDFWRITE="$GS -dSAFER -dQUIET -dBATCH -dNOPAUSE -sDEVICE=pdfwrite" # # (This 'sed' script is a hack, to eliminate redundant blank pages). #