Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Documentation for Printer Drivers



Robert,

On the subject of documentation, there is only sample code for Printer Modules. This is unlikely to change. CUPS drivers, on the other hand, are well documented. Our direction is to bring CUPS drivers up to parity with PMs in terms of functionality, and at the same time continue to support PMs. If you have already developed a code base for delivering PMs, my advise is to continue on that track while Apple works on the missing pieces for CUPS drivers (ColorSync, presets, PDEs, PBMs, localization, etc.). If you are setting out to develop printer drivers for X, then you will find CUPS drivers easier to develop and you may be able to live without their short-term deficiencies. We will have more to say on this topic at WWDC of course.

Your understanding of what happens when a job is cancelled is correct. Why you don't see your printf depends on how your PM works. If CancelJob and PrintPage are running on separate threads, perhaps the reason is that you killed your PrintPage thread? EndJob is not called after CancelJob.

For your question about readProc, the answer depends somewhat on the behavior of the IOM. In the USB case, the IOM will not exceed the value of the size variable, but it will not necessarily fill the PM's read buffer. If you try to read zero bytes, the IOM will return an error (kPMReadFailed).

I hope this helps.

-Paul


On Friday, February 14, 2003, at 01:16 PM, email@hidden wrote:

I have the "Extending Printing Dialogs" PDF which describes pretty well
what to do for PDEs, but don't know of any documentation for PMs. For
example, when I delete a job printing in the print queue, I see CancelJob
is called while PrintPage is executing (while testing using OS X 10.1.5).
CancelJob sets an abort flag which PrintPage uses to stop getting bands
of image data. But I never see the 'printf' I placed at the end of
PrintPage,
nor do I see EndJob ever called. (Is this normal?)

As another example, when I use the readProc passed in to get status
from my printer, I set the readSize variable whose address is passed
to readProc. Is this necessary? Does the readProc read this variable and
return only that many bytes (kind of like FSRead) or does it just read
whatever is available and return that many bytes? (This is contrived, but
examples closer to read life are: (1) can I do two reads, each returning a
part
of the expected stream from the printer and (2) what happends if I try to
read
0 bytes?

There must be documentation on this kind of stuff, but I can't seem to find
it.
Where is it? (Thanks.)
_______________________________________________
printing mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/printing
Do not post admin requests to the list. They will be ignored.
_______________________________________________
printing mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/printing
Do not post admin requests to the list. They will be ignored.

References: 
 >Documentation for Printer Drivers (From: email@hidden)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.