• 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: Printable region and drawRect
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Printable region and drawRect


  • Subject: RE: Printable region and drawRect
  • From: "Jonathan E. Jackel" <email@hidden>
  • Date: Tue, 29 Oct 2002 10:30:33 -0500

Try the [[NSPrintInfo sharedPrintInfo] xxxMargin] methods, where xxx is
Left, Right, Top or Bottom.

Another possibility is [[[NSPrintInfo sharedPrintInfo] dictionary]
objectForKey:NSPrintxxxMargin].

Jonathan

> -----Original Message-----
> From: email@hidden
> [mailto:email@hidden]On Behalf Of Michael Ericson
> Sent: Tuesday, October 29, 2002 3:46 AM
> To: email@hidden
> Subject: Printable region and drawRect
>
>
> I'm having some trouble printing a subclass of an NSView, here's the
> details. In the drawRect: method of my view class - once I determine
> that the current drawing context is not to the screen (i.e. I am
> printing) - I would like to be able to use the entire printable region
> of the paper as configured by the Page Setup/Print options. However,
> the NSRect that is passed to drawRect: is very small, and not at all
> proportional to the configured page.
>
> For example, when printing to a US Letter size page (8.5" x 11") the
> drawRect: method gets passed a 100x100 rectangle that is centered on
> the page rather than a rectangle that matches the printable region of
> the page (i.e. page size minus borders).
>
> Any ideas on how I can draw to the entire printable region of the page?
>
> ----
> michael a. ericson
> www.unm.edu/~maerics
> _______________________________________________
> 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.
_______________________________________________
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: 
 >Printable region and drawRect (From: Michael Ericson <email@hidden>)

  • Prev by Date: Re: Problem with arguments of an NSTask
  • Next by Date: selecting output format - NSKeyedArchiver
  • Previous by thread: Printable region and drawRect
  • Next by thread: Re: Printable region and drawRect
  • Index(es):
    • Date
    • Thread