Printing filePro with printer directly attached to FreeBSD server.

Jean-Pierre A. Radley appl at jpr.com
Tue May 3 13:23:31 PDT 2005


Walter Vaughan propounded (on Tue, May 03, 2005 at 02:54:27PM -0400):
| I thought that I had notes on this, but it took me a while to trace down 
| all the steps needed to print from filePro to a HP LaserJet attached 
| directly to the server with an onboard printer port. Perhaps this will help 
| someone later.
| 
| OS: FreeBSD 5.4-RC3 ( steps will be identical probably for any 5.X and 
| later)
| LP Spooler: Stock LPR
| Printer: HP LaserJet 1200 (has both USB and parallel ports)
| App: FreeBSD filePro 5.*
| 
| While output from reports seemed to print okay, no matter what I did, I 
| always seemed to get a extra page ...
| 
| Create a the following file..
| ==============================
| #!/bin/sh
| #
| # hpif - Simple text input filter for lpd for HP-PCL based printers
| # Installed in /usr/local/libexec/hpif
| #
| # Simply copies stdin to stdout.  Ignores all filter arguments.
| # Tells printer to treat LF as CR+LF.  Ejects the page when done.
| printf "\033&k2G" && cat && printf "\033&l0H" && exit 0
| exit 2

<ESC>l0H, the eject page command, emits a CarriageReturn and a FormFeed.
If you already printed a full page of stuff, that FF is giving you a
blank page.

-- 
JP


More information about the Filepro-list mailing list