• 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: Printing graphics plus text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Printing graphics plus text


  • Subject: Re: Printing graphics plus text
  • From: Eli Bach <email@hidden>
  • Date: Sat, 11 Jun 2011 20:45:00 -0600

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 (email@hidden)

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:

This email sent to email@hidden

References: 
 >Printing graphics plus text (From: Scott Steinman <email@hidden>)

  • Prev by Date: Re: iOS: encoding a custom view with a shape in it
  • Next by Date: layoutSubviews doesn't always work (iOS 4.3 on iPad Simulator)
  • Previous by thread: Printing graphics plus text
  • Next by thread: NS_BUILD_32_LIKE_64
  • Index(es):
    • Date
    • Thread