Greetings, I have recently begun adding printing support to one of my applications. The last time I did any print related programming on the Mac was during the System 7 days (ack!) so I am blissfully ignorant on all of this. For the most part, though, almost everything seems to be working.
One thing that has me discombobulated is that NSPrintInfo's top and bottom margins seem to be swapped. If I call [printinfo setBottomMargin:foo], it adjusts the spacing at the top of the page, both in the preview and on the printed page. Likewise, calling setTopMargin adjusts the spacing at the bottom of the page. FWIW, I modified the TextEdit sample code, too... (Document.m) - (NSPrintInfo *)printInfo { NSPrintInfo *printInfo = [super printInfo]; if (!setUpPrintInfoDefaults) { // snip [printInfo setTopMargin:72.0]; // [printInfo setBottomMargin:72.0]; [printInfo setBottomMargin:0.0]; } return printInfo; } ...and that changed the spacing at the top of the page as well. Hmm. I thought that perhaps it had something to do with coordinate systems being swapped and I should be swapping the calculated values I use for setBottomMargin/setTopMargin. But when I tested my program on a 10.6 system, setBottomMargin/setTopMargin work as I would expect, i.e., not swapped. Did something change with the printing architecture between Snow Leopard and Lion regarding print margins (or coordinate systems)? I checked the release notes, but didn't find anything. Or is there something obvious that I've missed? Thanks in advance, -cb -- Carl W. Bell - <http://carl-bell.baylor.edu/carl_bell/> Senior Analyst/Programmer - Academic and Research Computing Services Baylor University Electronic Library _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com