Re: Printing
Re: Printing
- Subject: Re: Printing
- From: Craig Bakalian <email@hidden>
- Date: Tue, 29 Apr 2003 06:28:08 -0400
Hi Carla,
You may alloc and instantiate a NSTextView in code. I does not need
to be instantiated in Interface Builder.
NSTextView *printView = [[NSTextView alloc]initWithFrame:
NSMakeRect(0.0,0.0 ,8.5 * 72 ,11.0 * 72)];
NSPrintOperation *op;
printView you add what you want with replaceCharactersInRange: withRTFD:
Then you may send it to the printer
op = [NSPrintOperation printOperationWithView: printView printInfo:
[self printInfo]];
[op setShowPanels: showPanels];
[self runModalPrintOperation: op delegate: nil didRunSelector: NULL
contextInfo: NULL];
[printView release];
Craig Bakalian
www.eThinkingCap.com
On Tuesday, April 29, 2003, at 01:00 AM,
email@hidden wrote:
>
My goal: print a custom report that I've dynamically built in memory
>
from fields in a MySQL database. I don't exactly know how to go about
>
this one. I have a single window interface. I did not use the
>
Document-View template. I'd like to print a nice logo header to the
>
printer, followed by the currently selected customer information,
>
followed by a nice little footer.
>
>
The problem I'm running into is that all print tutorials seems to only
>
defer to the built-in printDocument method. My users won't see what's
>
going to be printed. It won't be on a displayed NSTextView or
>
something. I just want to write dynamic rich text to the printer.
>
>
Any pointers?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.