Re: sending html file to safari for printing
Re: sending html file to safari for printing
- Subject: Re: sending html file to safari for printing
- From: Frédéric Testuz <email@hidden>
- Date: Wed, 06 Jun 2012 22:16:29 +0200
Le 6 juin 2012 à 18:08, Amy Gibbs a écrit :
> I've got an app I've written for myself, it's mac core data based.
>
> I need to be able to output a printout of some data, it would basically be a table with some images and data. I think the easiest thing to do may be to create an HTML page that can then be opened in Safari.
>
> I can manage creating and saving the HTML file, how do I automatically open it up in Safari (or the default browser it doesn't matter) so I can print it out?
Perhaps you have a reason to open it in a browser, but you can also directly print it from your application.
In short, create the html code, instantiate a WebView, make it render your html code and pass the web view to a NSPrintOperation.
Frédéric Testuz
_______________________________________________
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