Printing a view

  • Hello,

    I'm working with NSDocument.  I only have one view that I would like to print, but I don't see a method in NSDocument that takes an NSView parameter.    How do I print only one view in an NSDocument?

    Thanks,

    Bruce
  • On 22/02/2011, at 9:24 AM, Bruce Cresanta wrote:

    > Hello,
    >
    > I'm working with NSDocument.  I only have one view that I would like to print, but I don't see a method in NSDocument that takes an NSView parameter.    How do I print only one view in an NSDocument?

    You override: - (NSPrintOperation *)printOperationWithSettings:(NSDictionary *)printSettings error:(NSError **)outError in your document, and create a NSPrintOperation. The NSPrintOperation takes a view parameter where you can nominate the printing view.

    --Graham
previous month february 2011 next month
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28            
Go to today