VsiFax and filePro -- frustration!

Bill Campbell bill at celestial.com
Sat Aug 28 11:05:16 PDT 2010


On Sat, Aug 28, 2010, Steve Parker wrote:
...
>
>Your extra CR/LF's are likely from filepro where the "# lines to print" is
>less than "# lines per page". Filepro does the padding after the record is
>processed. You may need and appropriate PCL page formatting command to
>keep it all in synch between filepro and vsifax.

All my printer interface scripts keep a count of blank lines,
then send that number of LF characters when they see a non-blank
so no trailing blank lines are printed at the end of the job.  At
the end of the job with HP printers, the script sends <ESC>E
which prints anything remaining in the printer's buffer, and with
non-HP printers, it sends a FF (ctrl-L) character to eject the
last page.

This is pretty simple in python or perl, something like

blanks = 0
for line in sys.stdin:
    line = line.rstrip()
    if not line:
        blanks += 1
        continue
    if blanks:
        print '\n' * blanks
        blanks = 0
    print line

Perl is similar with lots of modem noise.

Bill
--
INTERNET:   bill at celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186  Skype: jwccsllc (206) 855-5792

Democracy must be sometihng more than two wolves and a sheep voting on what
to have for dinner -- James Bovard


More information about the Filepro-list mailing list