writer.openTag( HTMLTags.TAG_DIV ); handlePageStyle( page.getPageHeader().getStyleClass( ), page.getPageHeader().getStyle( ) );  contentVisitor.visitChildren( page.getPageHeader( ), null );   writer.closeTag( HTMLTags.TAG_DIV );
boolean showHeader = true; Object genBy = page.getGenerateBy( ); if ( genBy instanceof SimpleMasterPageDesign ) { SimpleMasterPageDesign masterPage = (SimpleMasterPageDesign) genBy; if ( !masterPage.isShowHeaderOnFirst( ) ) { if ( page.getPageNumber( ) == 1 ) { showHeader = false; } } } if ( showHeader ) { writer.openTag( HTMLTags.TAG_DIV ); handlePageStyle( page.getPageHeader( ).getStyleClass( ), page.getPageHeader( ).getStyle( ) );  contentVisitor.visitChildren( page.getPageHeader( ), null );   writer.closeTag( HTMLTags.TAG_DIV ); }
	public void startPage( IPageContent page )	{		pageNo++;				if ( pageNo > 1 && outputMasterPageContent == false )		{			writer.openTag( "hr" );			writer.closeTag( "hr" );		}		// out put the page tag		writer.openTag( HTMLTags.TAG_DIV );				// out put the background		if ( page != null )		{			Object genBy = page.getGenerateBy( );			if ( genBy instanceof MasterPageDesign )			{				MasterPageDesign masterPage = (MasterPageDesign) genBy;				String masterPageStyleName = masterPage.getStyleName( );				IStyle classStyle = report.findStyle( masterPageStyleName );				StringBuffer styleBuffer = new StringBuffer( );				AttributeBuilder.buildBackgroundStyle( styleBuffer, classStyle, this );				writer.attribute( HTMLTags.ATTR_STYLE, styleBuffer.toString( ) );			}		}				if ( htmlRtLFlag )		{			writer.attribute( HTMLTags.ATTR_HTML_DIR, "RTL" );		}				if ( pageNo > 1 )		{			writer.attribute( HTMLTags.ATTR_STYLE, "page-break-before: always;" );		}		//output page header		if ( page != null )		{			if ( outputMasterPageContent )			{				//output DIV for page header				writer.openTag( HTMLTags.TAG_DIV );						handlePageStyle( page.getPageHeader().getStyleClass( ), page.getPageHeader().getStyle( ) );								contentVisitor.visitChildren( page.getPageHeader( ), null );								//close the page header				writer.closeTag( HTMLTags.TAG_DIV );			}			}				// start output the page body , with the body style 		writer.openTag( HTMLTags.TAG_DIV );		if ( page != null )		{			IContent pageBody = page.getPageBody( );			IStyle bodyStyle = pageBody.getStyle( );			String bodyStyleName = pageBody.getStyleClass( );						Object genBy = page.getGenerateBy( );			if ( genBy instanceof MasterPageDesign )			{				MasterPageDesign masterPage = (MasterPageDesign) genBy;				StringBuffer styleBuffer = new StringBuffer( );				if ( isEmbeddable )				{					AttributeBuilder.buildPageStyle( styleBuffer, bodyStyle, this );				}				else				{					IStyle classStyle = report.findStyle( bodyStyleName );					AttributeBuilder.buildPageStyle( styleBuffer, classStyle, this );				}				if( !pageFooterFloatFlag )				{					AttributeBuilder.buildSize( styleBuffer,							HTMLTags.ATTR_MIN_HEIGHT,							masterPage.getPageHeight( ) );				}				writer.attribute( HTMLTags.ATTR_STYLE, styleBuffer.toString( ) );			}		}	}