Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Nov 1998 17:28:50 -0700 (MST)
From:      Sean Kelly <kelly@rosemary-gw.fsl.noaa.gov>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   docs/8547: Various updates to authors.sgml, printing.sgml
Message-ID:  <199811030028.RAA10062@rosemary-gw.fsl.noaa.gov>

next in thread | raw e-mail | index | archive | help

>Number:         8547
>Category:       docs
>Synopsis:       Various updates to authors.sgml, printing.sgml
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov  2 16:30:01 PST 1998
>Last-Modified:
>Originator:     Sean Kelly
>Organization:
Pluto Technologies
>Release:        FreeBSD 3.0-RELEASE i386
>Environment:

	Not relevant.

>Description:

	Here are some diffs to the printing chapter based on
	suggestions gathered up over the months.

	The diffs to /doc/handbook/printing.sgml contains changes to
	the form-feed eject sequence for HP/PCL-based printers, plus a
	better filter script for Ghostscript scan conversion for
	non-PostScript printers.  It also updates the acknowledgements
	to credit those who've suggested the changes.

	The diffs to /doc/handbook/authors.sgml just changes my email
	address from "kelly@fsl.noaa.gov" to "kelly@plutotech.com".

	Please review and commit.

>How-To-Repeat:

	Not relevant.

>Fix:
  
	Here:

--- printing.sgml.orig	Thu Oct 15 11:21:44 1998
+++ printing.sgml	Thu Oct 15 11:23:05 1998
@@ -5,8 +5,6 @@
 
      The FreeBSD Documentation Project
 
-<!DOCTYPE linuxdoc PUBLIC "-//FreeBSD//DTD linuxdoc//EN">
-
   <article>
       <title> Printing with FreeBSD
       <author> Sean Kelly <tt/kelly@fsl.noaa.gov/
@@ -1228,10 +1226,9 @@
 # Installed in /usr/local/libexec/hpif
 #
 # Simply copies stdin to stdout.  Ignores all filter arguments.
-# Tells printer to treat LF as CR+LF. Writes a form feed character
-# after printing job.
+# Tells printer to treat LF as CR+LF.  Ejects the page when done.
 
-printf "\033&amp;k2G" &amp;&amp; cat &amp;&amp; printf "\f" &amp;&amp; exit 0
+printf "\033&amp;k2G" &amp;&amp; cat &amp;&amp; printf "\033&amp;l0H" &amp;&amp; exit 0
 exit 2
 </code>
 
@@ -2317,17 +2314,26 @@
 
 if [ "$first_two_chars" = "%!" ]; then
     #
-    #  It is PostScript; use Ghostscript to scan-convert and print it
+    #  It is PostScript; use Ghostscript to scan-convert and print it.
+    #
+    #  Note that PostScript files are actually interpreted programs,
+    #  and those programs are allowed to write to stdout, which will
+    #  mess up the printed output.  So, we redirect stdout to stderr
+    #  and then make descriptor 3 go to stdout, and have Ghostscript
+    #  write its output there.  Exercise for the clever reader:
+    #  capture the stderr output from Ghostscript and mail it back to
+    #  the user originating the print job.
     #
-    /usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=djet500 -sOutputFile=- - \
-        &amp;&amp; exit 0
+    exec 3&gt;&amp;1 1&gt;&amp;2
+    /usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=djet500 \
+        -sOutputFile=/dev/fd/3 - &amp;&amp; exit 0
 
 else
     #
     #  Plain text or HP/PCL, so just print it directly; print a form
     #  at the end to eject the last page.
     #
-    echo $first_line &amp;&amp; cat &amp;&amp; printf "\f" &amp;&amp; exit 0
+    echo $first_line &amp;&amp; cat &amp;&amp; printf "\033&amp;l0H" &amp;&amp; exit 0
 fi
 
 exit 2
@@ -2340,7 +2346,6 @@
 	    That is it.  You can type <tt/lpr plain.text/ and <tt/lpr
 	    whatever.ps/ and both should print successfully.
 
-
 	<sect2><heading>Conversion Filters<label
 	      id="printing:advanced:convfilters"></heading>
 
@@ -2559,7 +2564,7 @@
 # Installed in /usr/local/libexec/hprf
 #
 
-printf "\033&amp;k2G" &amp;&amp; fpr &amp;&amp; printf "\f" &amp;&amp; exit 0
+printf "\033&amp;k2G" &amp;&amp; fpr &amp;&amp; printf "\033&amp;l0H" &amp;&amp; exit 0
 exit 2
 </code>
 	      And we will add this line to the <tt>/etc/printcap</tt>
@@ -4051,6 +4056,19 @@
 	  <tag/&a.jehamby;/
 
 	    For the Ghostscript-to-HP filter.
+
+          <tag/&a.jfieber;/
+
+            For debugging why printing from Windows 95 to a FreeBSD
+            system simulating a PostScript printer with Ghostscript
+            didn't produce correct output, and suggesting a fix, which
+            is included herein.
+
+	  <tag/Stephen Montgomery-Smith <tt/&lt;stephen@math.missouri.edu&gt;//
+
+            For suggesting using "\033&amp;l0H" instead of "\f" to
+            eject the last page on HP printers; the latter could eject
+            an extra blank page while the former never does.
 
 	  <tag/My wife, Mary Kelly <tt/&lt;urquhart@argyre.colorado.edu&gt;//
 
--- authors.sgml.orig	Thu Oct 15 11:21:53 1998
+++ authors.sgml	Thu Oct 15 11:21:56 1998
@@ -335,8 +335,8 @@
   name='&lt;kato@FreeBSD.ORG&gt;'></tt>">
 
 <!ENTITY a.kelly "Sean Kelly
-  <tt><htmlurl url='mailto:kelly@fsl.noaa.gov'
-  name='&lt;kelly@fsl.noaa.gov&gt;'></tt>">
+  <tt><htmlurl url='mailto:kelly@plutotech.com'
+  name='&lt;kelly@plutotech.com&gt;'></tt>">
 
 <!ENTITY a.ken "Kenneth D. Merry
   <tt><htmlurl url='mailto:ken@FreeBSD.ORG'

--------------2D9E99B1B1C1D05FAEB2907D--



>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811030028.RAA10062>