views:

102

answers:

1

Hi all,

I'm trying to print an NSTableView, but most of the table keeps getting cut out. My question is twofold:

  1. How can I get it to resize to fit one page?

  2. How can I get it to print landscape?

If there's a better way to do it, without using the print: function, then I'm happy to receive those suggestions too! (The Table is binded to core data btw)

Thanks!

+1  A: 

You probably want to create your own custom view that draws the data in the way you want it, and then use that for printing. A good option for printing tabular data is to construct a table using html and css and print that using a WebView from the WebKit framework.

Johan Kool
Thanks, I was looking more towards a more code based approach, but I will give that a try!
Michael
You should probably use a template engine like this one: http://mattgemmell.com/2008/05/20/mgtemplateengine-templates-with-cocoa
Johan Kool