Source Forge changes for PrintJobPlugin

Lex Spoon lex at cc.gatech.edu
Wed Feb 13 14:58:51 UTC 2002


John M McIntosh <johnmci at smalltalkconsulting.com> wrote:
> I posted all the mac source code for printJob, (can't say anyone has 
> splashed morphics on paper yet), and a very generic PrintJobPlugin.h
> 
> I see Lex has been busy fixing
> 
> int ioFormPrint(int bitsAddr, int width, int height, int depth,
> 		double hScale, double vScale, int landscapeFlag)
> 
> Technically I resisted using that because it requires a VM, versus a 
> plugin. However I should point out some clever coding when creating 
> an instance of PrintJob could create a subclass instance by platform 
> to work implementation details.
> 

Yeah, it works now, if you have netpbm, which quite a few people do even
if they don't know it :).  Ian already had it saving to a file for 8-bit
forms and an 8-bit display, and I extended it this weekend for all
depths and to actually print out the result, and to obey the requested
scaling factors and landscape setting.  

It could be better:

	1. netpbm isn't required; I just don't know Postscript and so did it an
easy way.

	2. On some system's it's "lp" instead of "lpr", so the precise command
should be configurable.

	3. It should probably be configurable at run-time, too, like so many
other things are...



Anyway, I've been meaning to hook it into PrintJobPlugin, but I only
spend a few hours on this a week, if that.  Just a matter of time.... 
(And I wouldn't mind being beaten to it, anyone.  :))


By the way, I notice that the current primitive actually isn't invoked
from *anywhere* in Squeak.  Shall we axe it in favor of the plugin?

-Lex



More information about the Squeak-dev mailing list