|
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Greetings,_______________________________________________
I am trying to print to a receipt printer in my app I'm developing.
Basically, I am just trying to send the printer some text and have it
print without dropping the print panel. I read the apple docs, and
came up with this method from my controller method:
- (void)printReceipt:(Transaction *)transToPrint
{
NSPrintOperation *op;
NSView *view = [[NSView alloc] init];
[view insertText:[transToPrint descriptionSummary]];
op = [NSPrintOperation printOperationWithView:view];
[op setShowPanels:NO];
[op runOperation];
}
I run the app, run the method which calls this method, and I get a
dialog "No pages in the document were selected to print." The same
descriptionSummary method has it's text sent to an NSTextView, and the
text displays, so I know there is text in the document. I have not
implemented printing before, so any help would be greatly appreciated.
This is not a document based application. I'm running XCode and 10.3.4
Andrew
_______________________________________________
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.
| References: | |
| >simple printing question (From: Andrew Kinnie <email@hidden>) |
| Home | Archives | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.