groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff-commit] groff/contrib/pdfmark pdfroff.sh pdfroff.man


From: Keith Marshall
Subject: [Groff-commit] groff/contrib/pdfmark pdfroff.sh pdfroff.man
Date: Fri, 14 Jul 2006 23:35:37 +0000

CVSROOT:        /cvsroot/groff
Module name:    groff
Changes by:     Keith Marshall <keithmarshall>  06/07/14 23:35:37

Modified files:
        contrib/pdfmark: pdfroff.sh pdfroff.man 

Log message:
                * pdfroff.sh (--emit-ps): New command line option; implement it.
                (--help): Add description for it.
        
                * pdfroff.man (--emit-ps): Document it.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/pdfmark/pdfroff.sh?cvsroot=groff&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/groff/contrib/pdfmark/pdfroff.man?cvsroot=groff&r1=1.5&r2=1.6

Patches:
Index: pdfroff.sh
===================================================================
RCS file: /cvsroot/groff/groff/contrib/pdfmark/pdfroff.sh,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- pdfroff.sh  9 Mar 2006 00:40:11 -0000       1.9
+++ pdfroff.sh  14 Jul 2006 23:35:37 -0000      1.10
@@ -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

Index: pdfroff.man
===================================================================
RCS file: /cvsroot/groff/groff/contrib/pdfmark/pdfroff.man,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- pdfroff.man 12 Jun 2006 05:58:34 -0000      1.5
+++ pdfroff.man 14 Jul 2006 23:35:37 -0000      1.6
@@ -101,6 +101,7 @@
 .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 @@
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]