• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Issue with NSPrintInfo values being weird...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue with NSPrintInfo values being weird...


  • Subject: Re: Issue with NSPrintInfo values being weird...
  • From: Stéphane Sudre <email@hidden>
  • Date: Mon, 9 Sep 2002 14:38:42 +0200

On Monday, September 9, 2002, at 11:15 AM, Stiphane Sudre wrote:

On Saturday, September 7, 2002, at 05:34 AM, Mark Piccirelli wrote:

Actually, that was a lousy answer from me, via DTS. I have a better answer now though. From the Jaguar NSPrintInfo release notes at <http://developer.apple.com/techpubs/macosx/ReleaseNotes/AppKit.html>:

"It is important in many applications to be able to reliably determine the maximum imageable area of a printed page. A new method has been added to NSPrintInfo:

- (NSRect)imageablePageBounds;

Returns the imageable area of a sheet of paper specified by this object, taking into account the current printer, paper size, and orientation settings, but not scaling. "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 rectangle is in a coordinate space measured by points, with (0, 0) being the lower-left corner of the oriented sheet and (paperWidth, paperHeight) being the upper-right corner of the oriented sheet. The imageable bounds may extend past the edges of the sheet when, for example, a printer driver specifies it so that borderless printing can be done reliably."

I saw this API and didn't find it very useful. I need to think again about it but my first thought was that to get the margin values, I would have to compute them from the pageSize values and the NSRect returned by this method. Knowing that I would have to add code to check for the existence of this method on 10.1.

Ok, once the tests made, this API is giving directly the wanted result. Now the question left is: How can we get these same values under Mac OS X < 10.2?
_______________________________________________
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.
References: 
 >Re: Issue with NSPrintInfo values being weird... (From: Stéphane Sudre <email@hidden>)

  • Prev by Date: Re: undo text in an NSTextView
  • Next by Date: Linking to dylib
  • Previous by thread: Re: Issue with NSPrintInfo values being weird...
  • Next by thread: Request for Guidance
  • Index(es):
    • Date
    • Thread