(I posted this here a couple of weeks ago, and got no responses. Hopefully someone can provide some input this time, there must be somebody out there that has messed with printer margins before!)
I have an application which needs to override the print margins settings to allow printing right up to the physical limitations of the printer (or to within 1/4" of the paper edges). This is similar to the old "Larger Print Area" setting of older print drivers.
Sorting through the headers and Apple docs found me "PMSetUnadjustedPaperRect" which does exactly what I want, with a singular exception (the real problem, see below.) However, it's marked as "Not recommended" and "<x-tad-bigger>PMSessionCreatePageFormatList" </x-tad-bigger>suggested instead, although with the caveat that that should be used if it's an OS X application only, which isn't necessarily the case.
I WOULD have thought that PMSetAdjustedPageRect would be what you really would use to set margins, but changing that rectangle doesn't seem to do anything at all -- calling "GetPortBounds" on the printing context reveals a rectangle exactly the same size as it was prior to calling PMSetAdjustedPageRect. BTW, mucking with SetPortBounds doesn't do anything either, although I hadn't expected it to.
Anyhoo, testing the "PMSetUnadjustedPaperRect" function works fine on some printers, but causes others (an HP4000 in particular) to halt the job, and on the printer LCD display say something like "Unsupported page size, click GO to print anyway". If you hit the GO button, it prints fine, expanded margins and all.
So, my real question is whether switching from "PMSetUnadjustedPaperRect" to "<x-tad-bigger>PMSessionCreatePageFormatList</x-tad-bigger>" (running on OS 9.2.2 set aside for the moment) will resolve this issue, or whether there's another means on widening out the margins that doesn't rely on either of these methods and can be implemented without fluxsoring up the printer.
Aatrix Software, Inc.
Do not post admin requests to the list. They will be ignored.
Printing mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden