Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Cocoa Printing Example Code?

Cocoa Printing Example Code?
Thread Tools
Fresh-Faced Recruit
Join Date: Dec 2006
Status: Offline
Reply With Quote
Jul 23, 2007, 10:23 AM
 
I am adding printing to a Cocoa project I've been working on. I have basic printing working, but it's quite ugly. I am hoping to find some examples or fairly attractive layout, but I have found example printing code to be rare..

My requirements are fairly simple.. print a summary banner at the top of the first page then print a table of data for the next 'n' pages.

Anyone have any pointers to good example code in this area?
     
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status: Offline
Reply With Quote
Jul 23, 2007, 10:58 PM
 
The NSView documentation links to quite a good spiel on printing (since it's usually -[NSView print:] which does all the printing (at the top-level, anyhow) at: HERE . Getting page breaks right is the only real tricky bit, I reckon, and NSView has some methods to deal with this.
     
todd  (op)
Fresh-Faced Recruit
Join Date: Dec 2006
Status: Offline
Reply With Quote
Jul 25, 2007, 07:41 PM
 
Thanks for the response, Brass. That looks like good info, which I hadn't found before. I'll dig into that and give it another shot.

I think I'm okay with pagination, the Hillegass book covered that. It's probably just a matter of getting more comfortable with NSView and drawing my own custom views, to make mine look better.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:31 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2