Questions tagged [nsprintoperation]

57 questions
13
votes
3 answers

WKWebKit Mac OS NSPrintOperation

WebKit 1 exposed the WebFrameView where I could call a print operation. - (void)webView:(WebView *)sender printFrameView:(WebFrameView *)frameView { NSPrintOperation *printOperation = [frameView printOperationWithPrintInfo:[NSPrintInfo…
MobileOverlord
  • 4,580
  • 3
  • 22
  • 30
8
votes
2 answers

How do I get "Page Attributes" option in Cocoa print dialog?

The program I'm writing runs under OS X 10.5 Leopard. My target has its Base SDK and Deployment Target both set to Mac OS X 10.5. When I initiate printing, my print dialog doesn't show the Page Attributes option in which the user can select page…
SSteve
  • 10,550
  • 5
  • 46
  • 72
4
votes
1 answer

Printing multiple pages in Objective-C

I have a printing function like so: - (void)sendToPrinter:(int)code { NSPrintInfo *printInfo; NSPrintInfo *sharedInfo; NSPrintOperation *printOp; NSMutableDictionary *printInfoDict; NSMutableDictionary *sharedDict; …
biscuitstack
  • 11,591
  • 1
  • 26
  • 41
4
votes
1 answer

MacOS PDF/Printing from WKWebView is poor quality

I've been using what seems to be a standard way of generating prints/PDF's on MacOS by using a WebView to generate the contents and the following to print/save as a PDF. NSPrintOperation *printOperation = [NSPrintOperation…
Darren
  • 10,182
  • 20
  • 95
  • 162
4
votes
2 answers

Cocoa osx PDFView NSPrintOperation PrintPanel not showing page preview

In my app for Mac I have a webview that shows some html content. I create a PDFDocument from that webview and then I want to print that document. So I create a PDFView from the document and then I call the NSPrintOperation printOperationWithView.…
user3065901
  • 4,678
  • 11
  • 30
  • 52
4
votes
4 answers

Printing an NSDocument

I'm trying to print a document. The document is an array of NSImageReps, or a single NSPDFImageRep, which has multiple pages. I'm having trouble figuring out how to use the NSPrintOperation class to print this. The NSPrintOperation seems to need…
Brian Postow
  • 11,709
  • 17
  • 81
  • 125
2
votes
1 answer

NSPrintOperation hangs application

I have an application that hangs whenever I call NSPrintOperation. I have a view that is creates a separate class (UIView) like this: PBPrintImage *printImage = [[PBPrintImage alloc] init]; printImage.image = finalImage; [printImage…
RyanJM
  • 7,028
  • 8
  • 60
  • 90
2
votes
1 answer

NSPrintOperation NSprintInfo printer mac osx swift

I am trying to print tickets on a thermal printer with my Mac. With that I have no problems. I use NSPrintOperation to perform the operation, assisted by NSPrinterInfo to the issue of margins and other settings. The problem is that when I send the…
Chus
  • 57
  • 4
2
votes
1 answer

Is it possible to override NSPrintOperation settings after the panel was shown?

When you call [NSPrintOperation runOperation], the printing system runs the print options panel, and when the user clicks OK, the printing occurs. Is there a way to modify some of the user's chosen settings (in the NSPrintInfo object) after the…
fbitterlich
  • 882
  • 7
  • 24
2
votes
0 answers

Printing a paginated PDF w/ NSPrintOperation from a subclass of NSDocument, results in duplicate squished image over multiple pages

So I have tried a couple routes here, but there always seems to be a trade off. What I have is a vertically long PDF (Contained within a subclass of NSDocument), and for example I will be using a screenshot of a16z. This is my current result of…
A O
  • 5,516
  • 3
  • 33
  • 68
2
votes
0 answers

Using Cocoa, NSPrintOperation, How Do I correctly Create a PDF file from text in an NSView?

Using NSPrintOperation, How Do I correctly Create a PDF file from text in an NSView? * * NOTICE I FOUND A WORKAROUND, WHICH IS SHOWN AT THE BOTTOM * What I have done: 1. Put text into an NSTextView. - (NSTextView…
mbarron
  • 285
  • 4
  • 15
2
votes
1 answer

How do I print a MKMapView in OS X?

Sending a MKMapView a -print: message results in an output that only contains the +/- buttons and the "legal" link. Same if I try [NSPrintOperation printOperationWithView:someMKMapView] or [theWindowThatContainsAMapView print] or [[NSPrintOperation…
Mojo66
  • 1,109
  • 12
  • 21
2
votes
1 answer

Automatically open PDF in Preview when printing

I'm setting jobDisposition to NSPrintPreviewJob in NSPrintInfo, but the value seems to be ignored. Instead of opening the document in Preview, the print operation displays the print panel as usual.
paulmelnikow
  • 16,895
  • 8
  • 63
  • 114
2
votes
1 answer

Is it possible to print IKImageBrowserView In Cocoa programmatically?

I want to take print of IKImageBrowserView with (content) images. I tried the following code if (code == NSOKButton) { NSPrintInfo *printInfo; NSPrintInfo *sharedInfo; NSPrintOperation *printOp; NSMutableDictionary…
Lion
  • 872
  • 1
  • 17
  • 43
1
vote
2 answers

Setting printer-specific options on an NSPrintOperation without a panel

this question has bothered me on and off for about a year, and I thought perhaps someone else would have experience with a similar situation. Goal: on Mac OS X 10.6-7, to print multiple NSViews to EPSON Stylus Pro 4880 printers using a defined…
tobygriffin
  • 5,339
  • 4
  • 36
  • 61
1
2 3 4