Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mdeh

macrumors 6502
Original poster
Jan 3, 2009
345
2
I wonder if anyone can help clarify some concepts in the chapter on printing in Hillegass. There have been very few questions about this that I can find.

Specifically, what "imageablePageBounds" actually means.

So, from the docs, it says this, amongst other things.

“Imageable area” is the maximum area that can possibly be marked on by the printer hardware, not the area defined by the current margin settings.

The origin (0, 0) of the returned rectangle is in the lower-left corner of the oriented sheet.

When I look at the code generated by Hillegass, specifically:
Code:
-(BOOL)knowsPageRange:(NSRangePointer)range
{
	NSPrintOperation *po = [NSPrintOperation currentOperation];
	NSPrintInfo *printInfo = [po printInfo];
	pageRect = [printInfo imageablePageBounds];
	NSRect newFrame;
	newFrame.origin = NSZeroPoint;
	newFrame.size = [printInfo paperSize];
	[self setFrame:newFrame];

......other code to determine range

}

output for pageRect is:{{18, 40}, {576, 734}}
and pageSize, as expected is:{612, 792}

So, I am trying to synthesize conceptually exactly what the docs and my code means...specifically, why , for example , output for pageRect is not {{0,0}, {...,...} Any insight?

Thanks.

Thanks
 
I wonder if anyone can help clarify some concepts in the chapter on printing in Hillegass. There have been very few questions about this that I can find.

Specifically, what "imageablePageBounds" actually means.

So, from the docs, it says this, amongst other things.



When I look at the code generated by Hillegass, specifically:
Code:
-(BOOL)knowsPageRange:(NSRangePointer)range
{
	NSPrintOperation *po = [NSPrintOperation currentOperation];
	NSPrintInfo *printInfo = [po printInfo];
	pageRect = [printInfo imageablePageBounds];
	NSRect newFrame;
	newFrame.origin = NSZeroPoint;
	newFrame.size = [printInfo paperSize];
	[self setFrame:newFrame];

......other code to determine range

}

output for pageRect is:{{18, 40}, {576, 734}}
and pageSize, as expected is:{612, 792}

So, I am trying to synthesize conceptually exactly what the docs and my code means...specifically, why , for example , output for pageRect is not {{0,0}, {...,...} Any insight?

Thanks.

Thanks

Looks like ( pageRect.origin.x * 2 ) + pageRect.size.width works out to 612 - in other words, it is horizontally centered inside the printable area. I have not done any actual printing at this level, is pageRect a clipping rect?
 
Looks like ( pageRect.origin.x * 2 ) + pageRect.size.width works out to 612 - in other words, it is horizontally centered inside the printable area. I have not done any actual printing at this level, is pageRect a clipping rect?


Sydde...not quite sure what you mean. But, both "views" are derived from printInfo, which, I assume is ultimately based on the User's setting of the page size, orientation etc.
 
"Clipping" refers to limiting the drawing area. An NSClipView, forexample, is the part of an NSScrollView (a subview) that defines the visible portion of the documentView. If pageRect clips drawing, anything drawn outside of it will crop out. Clipping has been a Mac OS behavior since 1983 or so.

From the docs, it looks like you can also set the page margins programmatically, which might make sense as a print option, as long as it makes sense for the specific printer (there are some that can actually overprint the paper, so use caution when doing this).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.