Questions tagged [nsprintoperation]
57 questions
0
votes
0 answers
NSPrintOperation View Is blank
Im still new to OSX / Swift 3.1 but Im a little stumped, Ive build an epos system and its work all fine, Im just stuck with printing out the receipt.
I have build a XIB View and the corresponding swift file for it show below
class Receipt:…

Shaun Clark
- 21
- 4
0
votes
0 answers
How to set up an NSView for printing?
How can an NSView be set up for printing? For example, say I have a view in which I've overridden layout() to lay things out just as text does, flowing from one line to the next according to the width of the view. Nothing should scale, and the…

arsenius
- 12,090
- 7
- 58
- 76
0
votes
0 answers
NSDocument printOperationWithSettings not showing all pages
In NSDocument subclass, have this function:
override func printOperationWithSettings(printSettings: [String : AnyObject]) throws -> NSPrintOperation {
let printInfo: NSPrintInfo = self.printInfo
var pageSize = printInfo.paperSize
…

JKaz
- 765
- 6
- 18
0
votes
1 answer
Setting showsPrintPanel to false when using NSPrintOperation causes different sizes when printing
When using NSPrintOperation and setting showsPrintPanel to true, the view prints just fine, however when I set the property to false, the view does not print correctly and is bigger than the paper:
func printBadge(printerName: String){
let…

ColinMasters
- 511
- 7
- 19
0
votes
1 answer
Printing on macosx: what's best way to print a nstableview
I'm having an issue printing from my desktop application on macosx.
I built a view in my IB file that I use for printing.
Then a call my action that throu
printOp = [NSPrintOperation printOperationWithView:self.myPrintView printInfo:…

Boka70
- 9
- 6
0
votes
1 answer
Printing a Pdf file with Cocoa, app crash
I'm using this code to print a Pdf file:
- (void)printPDF:(NSURL *)fileURL {
// Create the print settings.
NSPrintInfo *printInfo = [NSPrintInfo sharedPrintInfo];
[printInfo setTopMargin:0.0];
[printInfo setBottomMargin:0.0];
[printInfo…

Blue
- 2,300
- 3
- 21
- 32
0
votes
1 answer
How to print a file in cocoa application depending upon its mime type?
I am working on file manager. I have stored their local urls in my core data. I have file and folder, but I want to print png, jpeg, docx and pdf from my application.
Let's suppose I have a print button in my application and every file, how can I…

Hassan Malik
- 559
- 6
- 20
0
votes
1 answer
Dynamically change paper size based on printer being displayed on NSPrintPanel
We are trying to modify the default selected paper size for a NSPrintPanel. Using NSNotification we are able to observe and implement changes on our accessoryViews in the NSPrintPanel. However when we try to implement setPaperSize (NSPrintInfo the…

lv10
- 1,469
- 7
- 25
- 46
0
votes
1 answer
NSScrollView printing inverted on OSX Mavericks
I have a Mac app that has been on the app store for a few years. It's a time tracking and invoicing app that creates a PDF for the invoice. The PDF is generated from the content of a window in the app that contains the invoice information. Before…

siannopollo
- 1,464
- 11
- 24
0
votes
1 answer
Can I set _every_ custom printing option with Cocoa's NSPrintInfo and NSPrintOperation?
I'm trying to find out if I can print on Mac OS X without showing the system print panel and still programmatically set every print option, even the ones of third party printer drivers.
I want to use NSPrintInfo.
Is this possible? Do all Mac…

Johannes Fahrenkrug
- 42,912
- 19
- 126
- 165
0
votes
1 answer
How should I print a receipt of a transaction in Objective-C?
I've looked up a couple of documents but I was just hoping to get a general idea here.
I want to be able to print off an invoice once a sale has been made. My client will provide me with a specified paper size, also indicating that the paper will…

D'Arcy Rail-Ip
- 11,505
- 11
- 42
- 67
0
votes
1 answer
Hide window that show when we use NSPrintOperation
I use below code for print view1 and when i run it, a window open and i should select settings and click on print button then the view will print.how to do it (settings) in code (means window doesn't open and directly print view1 with settings that…
user437064