Bug 158710 Page break lost when printed as PDF in web viewer
Masterpage was lost when printed as PDF in web viewer Steps to reproduce: 1.preview attached report in web viewer 2.print as PDF Expected result: Preview as PDF directly and printed as PDF in web viewer shoud be the same Actual result: Printed as PDf in web viewer lost master pages while previewed as PDF directly works well
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/impl/RenderTask.java
/* (non-Javadoc)
	 * @see org.eclipse.birt.report.engine.api.IRenderTask#render()
	 */
	public void render() throws EngineException {
		if ( renderOptions == null )
		{
			throw new EngineException(
					"Render options have to be specified to render a report." ); 
		}
		if ( runnable == null )
		{
			throw new EngineException(
					"Can not find the report design in the report document {0}.",
					new Object[]{reportDoc.getName( )} );
		}
		innerRender.render( );
	}
	/* (non-Javadoc)
	 * @see org.eclipse.birt.report.engine.api.IRenderTask#render()
	 */
	public void setPageNumber( long pageNumber ) throws EngineException
	{
		long totalPage = reportDoc.getPageCount( );
		if ( pageNumber <= 0 || pageNumber > totalPage )
		{
			throw new EngineException( "Page {0} is not found ", new Long( 
					pageNumber ) );
		}
		innerRender = new PageRender( pageNumber);
	}