squeak printing?

John M McIntosh johnmci at smalltalkconsulting.com
Thu Feb 7 19:13:47 UTC 2002


>Dumping Postscript to an external print queue would be nice. With a bit
>of hackery on top of CommandShell/OSProcess, it could be implemented as:
>
>	aMorph asPostscript pipeTo: 'lpr'
>
>Does OSProcess work on OS/X? and does OS/X use a unixy sort of print
>queueing system? If so, I'll volunteer to do the CommandShell hack.
>
>>  Coming up with a solution which works reasonably at on the
>  > major platforms is probably the challenge.

Well OSProcess could work, it's a unix bsd system after all. Doing 
the command shell hack might be viable for now, certainly it won't 
hurt.

I also see there is a TextPrinter class, which I'm not sure what to do with.

But I'm thinking I'm going to implement 5 methods just to start the 
ball rolling, we can refactor into a more proper implementation once 
we can actually lay ink on the page.

Now on the mac we have a page setup dialog and a print dialog that 
are used to collect information about what to do. Right now I'm going 
to play stupid and not return any information about what the user has 
selected to Squeak, or pass in too much information.

pageSetup	- to get the page setup dialog, some platforms might 
not support
preProcessing	- to get the print dialog and or other tasks , some 
platforms might not support
postProcessing	- cleanup if required, some platforms might not support
printForm: aForm - print a form
printPostscript: aString - print that postscript, some platforms 
might not support

printForms: aCollectionOfForms - print a collection of forms
printPostscriptPages: aCollectionOfPostcriptPages - a collection of 
postscript pages

These of course really might need subclasses by architecture for 
implementation reasons.

Comments are welcome, after all I have a mac bias in this implementation.
-- 
--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================



More information about the Squeak-dev mailing list