From owner-freebsd-doc Mon Nov 2 16:30:04 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA06364 for freebsd-doc-outgoing; Mon, 2 Nov 1998 16:30:04 -0800 (PST) (envelope-from owner-freebsd-doc@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA06311 for ; Mon, 2 Nov 1998 16:30:00 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id QAA18980; Mon, 2 Nov 1998 16:30:01 -0800 (PST) Received: from rosemary-gw.fsl.noaa.gov (rosemary-gw.fsl.noaa.gov [137.75.253.41]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA06150 for ; Mon, 2 Nov 1998 16:29:12 -0800 (PST) (envelope-from kelly@rosemary-gw.fsl.noaa.gov) Received: (from kelly@localhost) by rosemary-gw.fsl.noaa.gov (8.8.8/8.8.8) id RAA10062; Mon, 2 Nov 1998 17:28:50 -0700 (MST) (envelope-from kelly) Message-Id: <199811030028.RAA10062@rosemary-gw.fsl.noaa.gov> Date: Mon, 2 Nov 1998 17:28:50 -0700 (MST) From: Sean Kelly Reply-To: kelly@rosemary-gw.fsl.noaa.gov To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: docs/8547: Various updates to authors.sgml, printing.sgml Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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 - -
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&k2G" && cat && printf "\f" && exit 0 +printf "\033&k2G" && cat && printf "\033&l0H" && 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=- - \ - && exit 0 + exec 3>&1 1>&2 + /usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=djet500 \ + -sOutputFile=/dev/fd/3 - && 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 && cat && printf "\f" && exit 0 + echo $first_line && cat && printf "\033&l0H" && 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&k2G" && fpr && printf "\f" && exit 0 +printf "\033&k2G" && fpr && printf "\033&l0H" && 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/<stephen@math.missouri.edu>// + + For suggesting using "\033&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/<urquhart@argyre.colorado.edu>// --- authors.sgml.orig Thu Oct 15 11:21:53 1998 +++ authors.sgml Thu Oct 15 11:21:56 1998 @@ -335,8 +335,8 @@ name='<kato@FreeBSD.ORG>'></tt>"> <!ENTITY a.kelly "Sean Kelly - <tt><htmlurl url='mailto:kelly@fsl.noaa.gov' - name='<kelly@fsl.noaa.gov>'></tt>"> + <tt><htmlurl url='mailto:kelly@plutotech.com' + name='<kelly@plutotech.com>'></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