PDFView printWithInfo:autoRotate: fails
- by Brian Postow
I'm trying to print a PDFDocument that I am constructing from a series of images. In case it matters, I'm doing all of this from within a Mozilla plugin.
I create the PDFDocument, and put it into a PDFView, then I call
[printView printWithInfo: [NSPrintInfo sharedPrintInfo] autoRotate: YES];
The print dialog comes up (as a separate window, instead of panel. I assume that that comes from being inside a mozilla window, so I wasn't too worried about it. The dialog shows my document, and I can page through it correctly, and everything looks good.
However, when I hit "Print" the dropdown with "Layout" etc becomes empty, and the view under that becomes empty. The window doesn't disappear, and the document doesn't print. Hitting Cancel does exactly the same thing. The only thing I can do then is force-quit Mozillla.
I based the program off of PDFKitLinker2 from the apple dev site, and that program works. But I can't see any significant differences between it and my version.
Any suggestions on where to look?
thanks.
EDIT: Yes, I know that this is pretty much an exact duplicate of http://stackoverflow.com/questions/2058501/printing-off-screen-pdfviews but that never got a sufficient answer... (And I didn't notice it until just now...)