sending print: to window
sending print: to window
- Subject: sending print: to window
- From: Todd Heberlein <email@hidden>
- Date: Wed, 8 Aug 2001 16:16:12 -0700
I tried to print an entire window from within my program, but I ran into
a problem. Here is the basic set up:
Created a trivial Cocoa app with PB and IB. It consists of a single
small window with a single button that is not connected to anything. No
custom objects or code. In IB I disconnected the connection from the
"print..." menu item from "First Responder", and I reconnected
"print..." to send the "print:" method directly to the window.
When I run the application I get the following error message to the
debug window:
"WARNING: non-zero phase and CTM not a pure translation: this pattern
will probably print incorrectly."
The window does print to a printer, or I can pop it into the preview
application, but content in the window is drawn funny. The horizontal
background lines in the window are now vertical, the lines in the menu
bar are now vertical, and the line patterns around the text in the
button are now vertical.
In short, all the background patterns are oriented wrong. In a slightly
larger application with my own content, my custom view seems to print
fine.
What gives? Am I doing something wrong, or is this a bug? If it is a
bug, is there a way I can get my program to save the window image (as
opposed to using something like Grab)?
Thanks,
Todd
-----------------------------------------------
Todd Heberlein
email@hidden
530-758-4338