Linux printing still does not seem to work

Peter Alcibiades palcibiades-first at yahoo.co.uk
Tue Nov 17 05:17:46 EST 2009


Discover that printing still don't work properly with 4.0, which is very, 
very annoying.  The first time this became apparent was on Debian Etch.  It 
then didn't work on Lenny when it was Testing, and it didn't work on Lenny 
after it became Stable, and now that we are on Squeeze and Rev is on 4.0, 
it still don't work.

This is how you do printing in Rev right at the moment.  Wel, you do not 
print at all in Debian.  But, print card works on Mandriva.  It does not 
seem to work on Debian because Rev, alone of the several hundred installed 
applications, does not seem to be able to see the printer, never has, and 
cannot in 4.0.  Fortunately it can in Mandriva, and so we can do print card 
just fine.  But how do we print a field in Mandriva?

To be fair, I have not yet checke revPrintField in Mandriva, but given that 
printing has not changed in Debian for years, and still doesn't work in 
4.0, am not holding my breath.  Here for information is how we do it right 
now in 3.5  I will check this week and see if its changed, but don't expect 
it to have.
 
We want to print the field in columns, but we cannot, because we cannot set 
the size using revPrintField, whatever we do it prints only showing part of 
the page, so what we do is this

First we export the field to a text file:

	set the itemDelimiter to tab
	put fld myfield of card mycard into URL "file:myprintfile.csv"
	set hideConsoleWindows to true
	put shell("./print.sh")

and you will be burning with curiosity to know what is in print.sh.  Well 
here it is:

	#! /usr/bin/env bash
	awk -f myprint.awk myprintfile.csv |kprinter

And now everyone wants to know what is in myprint.awk.  Here it is:

	BEGIN {printf("%-15s\t%-40s\t%7s\t%4s\t%5s\n", "header1", "header2" , 
"header3", "header4", "header5")}
	{FS="\t"}
	{OFS="\t"}
	{printf("%-15s\t%-40s\t%7s\t%4s\t%5s\n",$1, $2, $3, $4, $5)}

This does work.  A printout does emerge in columns, and they do all fit on 
one page.  But this cannot possibly be how Rev wants to do printing fields 
in the year 2009, can it?  Tell a beginner that this is our idea of ease of 
use, and he/she would have an immediate sense of humor failure.  But this 
is how it has been for years.  Its annoying.

Peter




More information about the use-livecode mailing list