+#if TARGET_CARBON
+ m_macPageFormat = kPMNoPageFormat;
+ m_macPrintSettings = kPMNoPrintSettings;
+ m_macPrintSession = kPMNoReference ;
+
+ #if PM_USE_SESSION_APIS
+ OSStatus err;
+
+ err = PMCreateSession((PMPrintSession *)&m_macPrintSession) ;
+
+ if ( err == noErr )
+ {
+ err = PMCreatePageFormat((PMPageFormat *)&m_macPageFormat);
+
+ // Note that PMPageFormat is not session-specific, but calling
+ // PMSessionDefaultPageFormat assigns values specific to the printer
+ // associated with the current printing session.
+ if ((err == noErr) && (m_macPageFormat != kPMNoPageFormat))
+ {
+ err = PMSessionDefaultPageFormat((PMPrintSession)m_macPrintSession,
+ (PMPageFormat)m_macPageFormat);
+ }
+
+ err = PMCreatePrintSettings((PMPrintSettings *)&m_macPrintSettings);
+
+ // Note that PMPrintSettings is not session-specific, but calling
+ // PMSessionDefaultPrintSettings assigns values specific to the printer
+ // associated with the current printing session.
+ if ((err == noErr) && (m_macPrintSettings != kPMNoPrintSettings))
+ {
+ err = PMSessionDefaultPrintSettings((PMPrintSession)m_macPrintSession,
+ (PMPrintSettings)m_macPrintSettings);
+ }
+ }
+
+ #endif
+#else
+ m_macPrintSettings = (THPrint) NewHandleClear( sizeof( TPrint ) );
+ (**(THPrint)m_macPrintSettings).iPrVersion = 0; // something invalid
+
+ (**(THPrint)m_macPrintSettings).prInfo.iHRes = 72;
+ (**(THPrint)m_macPrintSettings).prInfo.iVRes = 72;
+ Rect r1 = { 0, 0, 8*72 - 2 * 18, 11*72 - 2 * 36 };
+ (**(THPrint)m_macPrintSettings).prInfo.rPage = r1;// must have its top left & (0,0)
+
+ Rect r2 = { -18, -36, 8*72 - 18, 11*72 - 36 };
+ (**(THPrint)m_macPrintSettings).rPaper = r2;
+ (**(THPrint)m_macPrintSettings).prStl.iPageV = 11 * 120 ; // 11 inches in 120th of an inch
+ (**(THPrint)m_macPrintSettings).prStl.iPageH = 8 * 120 ; // 8 inches in 120th of an inch
+#endif