Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Printing through Tcl

0 views
Skip to first unread message

James Song

unread,
Oct 22, 1997, 3:00:00 AM10/22/97
to

Hi,

I am wondering if I can start a printing job inside the window version
of Tcl. I checked Brent Welch's book and could find anything related to
the printing job. I would appreciate any help on how to start a printing
job with Tcl.

--James

Victor Wagner

unread,
Oct 23, 1997, 3:00:00 AM10/23/97
to

James Song (j...@metro.net) wrote:
: Hi,

I'm wondering why so many people are thinking that printing job is something
special. In Unix it is just execing of some program (usially lp or lpr).

exec lpr << [.canvas postscript]

In windows it is just writing to special file, named LPT1: (really it is
DOS solution, but there is good old DOS under your beloved Chicago).

set lpt [open LPT1 w]
puts $lpt [.canvas postscript]
close $lpt

There are problems only on Mac. But you have AppleScript extension.
: --James

Mark Roseman

unread,
Oct 23, 1997, 3:00:00 AM10/23/97
to

In article <344E78...@metro.net> James Song <j...@metro.net> writes:
> I am wondering if I can start a printing job inside the window version
> of Tcl. I checked Brent Welch's book and could find anything related to
> the printing job. I would appreciate any help on how to start a printing
> job with Tcl.

there is no printing support in tcl at the moment.

in theory a group of us are working on an extension to get printing
working, though things aren't exactly in the fast lane right now.
there is the shell of the printing loop in place now, which may give
you a starting point.

info at http://www.cpsc.ucalgary.ca/~roseman/tclprint/

mark

--
Mark Roseman, Research Associate | For info on TeamWave Workplace
Computer Science, University of Calgary | (providing shared Internet places
phone: 403-220-7259 fax: 403-284-4707 | for Mac, Windows, and Unix) see:
email: ros...@cpsc.ucalgary.ca | http://www.teamwave.com

lvi...@cas.org

unread,
Oct 23, 1997, 3:00:00 AM10/23/97
to

According to Victor Wagner <vi...@party.fe.msk.ru>:
:I'm wondering why so many people are thinking that printing job is something


:special. In Unix it is just execing of some program (usially lp or lpr).

It's because the term 'printing job' means so many different things to
so many different people.

:exec lpr << [.canvas postscript]

This doesn't account for things like duplex,landscape vs portrait,
size of paper, name of printer, etc. What about pagination when the
output is long text? What if the item to be printed isn't a canvas?
And what if you are trying to print a file rather than
a widget, taking into account all the various printer configuration issues.

Again, it all depends on what one is calling 'printing' as to what is needed.


--
Larry W. Virden INET: lvi...@cas.org
<URL:http://www.teraform.com/%7Elvirden/> <*> O- "We are all Kosh."
Unless explicitly stated to the contrary, nothing in this posting should
be construed as representing my employer's opinions.

0 new messages