Date: Thu, 15 Oct 1998 13:18:01 -0600 From: Sean Kelly <kelly@plutotech.com> To: doc@FreeBSD.ORG Subject: Review and commit request Message-ID: <36264A68.4839711D@plutotech.com>
index | next in thread | raw e-mail
[-- Attachment #1 --]
Doc'ers:
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 PCL-based printers, plus also 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 the changes and, if you approve, commit to the sources.
Thanks.
--Sean
[-- Attachment #2 --]
--- 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&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'
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36264A68.4839711D>
