+ #if PM_USE_SESSION_APIS
+ err = PMSessionBeginPage(m_macPrintPort,
+ m_printData.m_macPageFormat,
+ nil);
+ #else
+ err = PMBeginPage(m_macPrintPort, nil);
+ #endif
+ if ( err )
+ {
+ message.Printf( "Print Error %d", err ) ;
+ wxMessageDialog dialog( NULL , message , "", wxICON_HAND | wxOK) ;
+ #if PM_USE_SESSION_APIS
+ PMSessionEndPage(m_macPrintPort);
+ PMSessionEndDocument(m_macPrintPort);
+ UMAPrClose(&m_macPrintPort) ;
+ #else
+ PMEndPage(m_macPrintPort);
+ PMEndDocument(m_macPrintPort);
+ UMAPrClose() ;
+ #endif
+ ::SetPort( macPrintFormerPort ) ;
+ m_ok = FALSE ;
+ }