Strange Printing Issue (more)
Strange Printing Issue (more)
- Subject: Strange Printing Issue (more)
- From: Andrew Kinnie <email@hidden>
- Date: Mon, 5 Jul 2004 14:25:02 -0400
I forgot to include the code for the method I use for printing receipts:
- (void)printReceipt:(Transaction *)transToPrint
{
NSPrintOperation *op;
NSRect rect = [self printAreaInScaledPaperCoordinates];
NSPrintInfo *printInfo = [NSPrintInfo sharedPrintInfo];
// NSFont *font = [NSFont userFixedPitchFontOfSize:10.0];
[printInfo setLeftMargin:0.0];
[printInfo setRightMargin:0.0];
[printInfo setBottomMargin:0.25];
NSTextView *view = [[NSTextView alloc] initWithFrame:rect];
// [view setFont:font];
[view insertText:[transToPrint description]];
op = [NSPrintOperation printOperationWithView:view];
[op setShowPanels:NO];
[op runOperation];
[view release];
[printInfo release];
}
_______________________________________________
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.