• 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
printing at fixed scale
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

printing at fixed scale


  • Subject: printing at fixed scale
  • From: Steven Rogers <email@hidden>
  • Date: Mon, 18 Feb 2002 00:42:40 -0600

I've created a little program that draws shapes in an NSView subclass, and now I want to print them out at a consistent size For example: user inputs a length in inches (say 3), program draws a line in the view on the screen, and when printed out, the line is 3 inches long on the paper.

I thought that would be the easy part, but I haven't been able to figure out a way to control the relationship between the pixels in the graphics context, and what comes out on the printer. When I print now using the default inherited print, I get an image of the window with my graphics in it (including the window name and the red, yellow, and green buttons, etc.) Its always sized to fit the page, even when I say 100% in the print dialog.

I'm starting to suspect that creating a PDF graphics context might be the answer somehow, since PDF preserves scale, but I haven't found APIs that sound right.

Thoughts? Seems like it shouldn't be hard . . .

Steve
_______________________________________________
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: 
 >NSAutoreleasePool (From: Jonathan Wight <email@hidden>)

  • Prev by Date: Re: NSAutoreleasePool
  • Next by Date: iDisk access in Cocoa
  • Previous by thread: Re: NSAutoreleasePool
  • Next by thread: NSAutoReleasePool
  • Index(es):
    • Date
    • Thread