( (HTMLRenderOption) options ).setHtmlPagination( this.pagination );
if ( !format.equalsIgnoreCase( "pdf" ) ) { ( (HTMLRenderOption) options ).setHtmlPagination( this.pagination ); }
	private void render( String format, String doc, String output,			String pageRange ) throws EngineException	{		String outputFile = this.getClassFolder( ) + "/" + OUTPUT_FOLDER //$NON-NLS-1$				+ "/" + output; //$NON-NLS-1$		String inputFile = this.getClassFolder( )				+ "/" + INPUT_FOLDER + "/" + doc; //$NON-NLS-1$ //$NON-NLS-2$		String encoding = "UTF-8"; //$NON-NLS-1$		IReportDocument document = engine.openReportDocument( inputFile );		IRenderTask task = engine.createRenderTask( document );		task.setLocale( Locale.ENGLISH );		IRenderOption options = new HTMLRenderOption( );		options.setOutputFileName( outputFile );		options.setOutputFormat( format );		options.getOutputSetting( ).put( HTMLRenderOption.URL_ENCODING,				encoding );		( (HTMLRenderOption) options ).setHtmlPagination( this.pagination );		HTMLRenderContext renderContext = new HTMLRenderContext( );		renderContext.setImageDirectory( IMAGE_DIR );		HashMap appContext = new HashMap( );		appContext.put( EngineConstants.APPCONTEXT_HTML_RENDER_CONTEXT,				renderContext );		task.setAppContext( appContext );		task.setRenderOption( options );		task.setPageRange( pageRange );		task.render( );		task.close( );	}