Anyone ever used PrintJobPlugin?

Bert Freudenberg bert at isg.cs.uni-magdeburg.de
Thu Aug 7 20:17:39 UTC 2003


Andreas Raab wrote:


>>>c) ioPageForm coordinates
>>
>>scale is 0-1.0  (0 to 100%)
>>Other values are dependent on what the primitive things they 
>>should be, if inches is a windows thing, then you'll need to
>>covert from pixels width of a form to inches I guess.
> 
> 
> That really doesn't sound overly useful to me. I'd muchly prefer the
> ioFormPrint interface which specifies the dpi requested instead of a scale
> without any reference frame (e.g., what happens if you print it on a 300dpi
> vs. 1200dpi printer?). The size of the form is then defined implicitly and
> for scaling a form up to a page size you should really know about the page
> size of the printer (see below). So what I'd propose is to pass along the
> dpi (just like in ioFormPrint) and interpret the offset in the same
> resolution. E.g., for 100dpi an offset of 100 means 1 inch. This should work
> for all but the most obscure cases ;-)

Scale is just a setting in the Mac OS dialog which scales the whole 
page. I can't imagine what it's useful for, except may be you want to 
print a half-sized test page on an expensive color printer?

Anyway, you just render everything scaled by this value.

>>Technically on the mac we consider 1 inch to be 72 pixels,
>>but on windows isn't that 96 pixels?
> 
> 
> It actually depends. You have to ask the device (display, printer) what its
> device resolution is.

I think in Squeak we should stick to the PostScript convention, 72 
points per inch. The platform plugin can then figure out what to do.

>>If you draw to a 360x720 dpi inkjet, does that mean you
>>need to scale the form to 360/720 before printing?
> 
> 
> This is handled by mapping modes which use physical units instead of device
> units (typical mapping modes are 1/100 inch or 1/100 mm).
>>>d) Page sizes
>>
>>This is done in the macintosh print setup, page setup 
>>dialogs. Another prim or two might be need to support an OS
>>that require you to manage your own dialogs and then pass
>>that information in?
> 
> 
> Well, all we need is to figure out what kind of paper to use which is
> typically part of both, the print setup and the print dialog. Shouldn't be
> too hard to pass that along (I know that on Windows it's utterly trivial).

It should return the paper size in 1/72 inches.

>>Right now the controls are minimal from the programming side,
>>getting/setting page sizes, resolutions, ink type, vendor paper etc, 
>>is way more work and never a cross-platform friendly solution, and
>>really I got to avoid having to worry about doing that.
> 
> I would _really_ want to have this. If nothing else, you could report a
> pseudo page size up to the ST side and then use this as a basis for any
> further operations.

How about parsing PPDs? Should be easy enough to construct a Squeak UI 
from them.

-- Bert



More information about the Squeak-dev mailing list