Re: drawPageBorderWithSize question
Re: drawPageBorderWithSize question
- Subject: Re: drawPageBorderWithSize question
- From: matt neuburg <email@hidden>
- Date: Sun, 24 Nov 2002 07:34:16 -0800
I've done some more experimenting and I can now define the bug even better. As I said before, drawPageBorderWithSize: generally works great. However, the bug arises if NSView's height is less than the paperSize height of the page.
To see that this is indeed the boundary condition for the bug, have drawPageBorderWithSize print some text up against the very top of the page's imageable area. Now set the NSView's height to something just slightly smaller than the paperSize height - say, paperSize.height-20. The adornment will print, EXCEPT FOR ITS TOP 20 PIXELS.
It's not easy to work around this, because drawPageBorderWithSize is looking at the wrong number, as it were. Suppose the paper is 11 inches high. And suppose, just to use some gross but illustrative numbers, that the body height of the page, the area between the top margin and the bottom margin, is 4 inches. And suppose you've got one-and-a-half pages of material to print, requiring an NSView of just 6 inches in height.
Well, an NSView of 6 inches in height is not enough to make drawPageBorderWithSize print; the bug is triggered. If you work around this by artificially enlarging the NSView to 11 inches, drawPageBorderWithSize prints just fine, but now you've output three pages - the third being blank, except for the adornment.
I can thus get drawPageBorderWithSize to work perfectly every time, provided I'm willing to print an extra blank page sometimes. But that's sort of ugly. I could work around the bug completely if I could find a way, in these circumstances, to suppress the unwanted extra blank page. Of course, it would be even better if Apple would *fix* the bug. m.
matt neuburg, phd = email@hidden,
http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart.
http://www.tidbits.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.