Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Printing with fMinimalMargins



My app needs to print as close to the edges of the page as possible. With MacApp r15.1.1 under OS X, I set fMinimalMagins to true, but it's not doing what I need. I only have one printer connected to my machine, but page setup always comes up Format For: Any Printer, and when I look a the Settings:Summary, it says margins, top, left and right = 0.25 an bottom = 0.57 in. If I manually change Format For: to the laserwriter that is connected to my network, the margins come back as top=bottom=0.15 in, left=right=0.12 in. This is what I want when I print. How do I force it to use the margins for the default printer instead of for "any printer". As it is, my printout gets clipped, especially on the bottom, unless I manually open page setup and set the "format for" to the default printer.

And I have tried SavePrintInfo/RestorePrintInfo, but it doesn't help with this.

Also, I found and fixed a bug in TCarbonPrintJob::GetMaxSquareResolution - here is the new code:

double TCarbonPrintJob::GetMaxSquareResolution() const
// GetMaxSquareResolution determines the maximum discrete resolution where hRes
// and vRes are the same. The result is a double value. This function can
// be called outside of a print job.
{
CPrintJobStarterStopper
jobStarterStopper(const_cast<TCarbonPrintJob*>(this));
PMResolution theResolution;

#if PM_USE_SESSION_APIS
PMPrinter currentPrinter = NULL; // Alan Dail - changed this and the next two lines
ThrowIfBadOSStatus_AC(::PMSessionGetCurrentPrinter(sfPrintSession, &currentPrinter));
ThrowIfBadOSStatus_AC(::PMPrinterGetPrinterResolution(currentPrinter, kPMMaxSquareResolution, &theResolution));
#else
ThrowIfBadOSStatus_AC(::PMGetPrinterResolution(kPMMaxSquareResolution, &theResolution));
#endif

return theResolution.hRes;
}

Alan
----
Support cancer research - invest in Peregrine Pharmaceuticals
http://www.peregrineinc.com/
----
Alan Dail, Senior Software Engineer
http://homepage.mac.com/alandail
email@hidden
email@hidden
330-345-5953
_______________________________________________
macapp-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macapp-dev
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.