IPageSetupEmitter pageSetupEmitter = emitter.getPageSetupEmitter();
IPageSetupEmitter pageSetupEmitter = emitter.getPageSetupEmitter( ); if ( pageSetupEmitter == null ) { return; }
    private void handlePageSetup(Report report) {		// first create the master page defined in the report design		PageSetupContent pageSetup = new PageSetupContent( report				.getPageSetup( ) );		IPageSetupEmitter pageSetupEmitter = emitter.getPageSetupEmitter();			pageSetupEmitter.startPageSetup( );		for ( int i = 0; i < report.getPageSetup( ).getMasterPageCount( ); i++ )		{			//	context.initStyleStack( );			// IMasterPageEmitter mpEmitter = emitter.getMasterPageEmitter( );			// if ( mpEmitter != null )			{				MasterPageDesign masterPage = report.getPageSetup( )						.getMasterPage( i );				MasterPageContent masterPageContent = new MasterPageContent(						masterPage );				pageSetup.addMasterPage( masterPageContent );				pageSetupEmitter.startMasterPage( masterPageContent );				pageSetupEmitter.endMasterPage( );			}		}				//then output the page sequence defined in the report define		for ( int i = 0; i < report.getPageSetup( ).getPageSequenceCount( ); i++ )		{			//IPageSetupEmitter psEmitter = emitter.getPageSequenceEmitter( );			//if ( psEmitter != null )			{				PageSequenceDesign psDesign = report.getPageSetup( )						.getPageSequence( i );				PageSequenceContent psContent = new PageSequenceContent(						pageSetup, psDesign );				pageSetup.addPageSequence( psContent );				pageSetupEmitter.startPageSequence( psContent );				pageSetupEmitter.endPageSequence( );			}		}		pageSetupEmitter.endPageSetup( );		context.setPageSetup( pageSetup );		setDefaultMasterPage( report );    }