On Jun 10, 2011, at 11:58 PM, Scott Steinman wrote: > Please forgive me if my question is stupid. It's frustrating being a Cocoa > noobie after 30 years of scientific programming, but I'm doing my best to > learn. > > I'm working on an application that displays a diagram I have drawn in a > custom view to represent data input by the user. I'd like to print that > diagram plus the input values. I've read explanations and examples in > Apple's documentation, my library of Cocoa books, and from web searches. Each > explains only how to print either a view graphics or a view containing text > by instantiating an offscreen instance of that single view and redrawing its > contents for printing. > > Unfortunately, none of them shows how to print two views containing different > contents. Can the offscreen view contain subviews that each know how to draw > themselves? > > Thank you in advance for your help. Unless I run into a problem, I won't > respond here so I don't decrease the signal to noise ratio of this list.
Scott, Yes, the common way would be to create a superview, with multiple subviews (ie, with the diagram view and a view with the text values, laid out how you want them to print), then print the superview. Another method some people use to print is to use a WebView, as you can just generate very basic html (including graphics), and then use CSS to format/arrange it properly. Eli _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com