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
}
			catch ( NumberFormatException ex )
			{
				log.log( Level.SEVERE, "error page number rang:", ps[i] ); 
			}
		}
		return sort( list );
	}
	private List sort( List list )
	{
		for ( int i = 0; i < list.size( ); i++ )
		{
			long[] currentI = (long[]) list.get( i );
			int minIndex = i;
			long[] min = currentI;
			for ( int j = i + 1; j < list.size( ); j++ )
			{
				long[] currentJ = (long[]) list.get( j );
				if ( currentJ[0] < min[0] )
				{
					minIndex = j;
					min = currentJ;
				}
			}
			if ( minIndex != i )
			{
				
				list.set( i, min );
				list.set( minIndex, currentI );
			}