本文整理匯總了Java中org.eclipse.birt.report.engine.api.IPDFRenderOption.setOption方法的典型用法代碼示例。如果您正苦於以下問題:Java IPDFRenderOption.setOption方法的具體用法?Java IPDFRenderOption.setOption怎麽用?Java IPDFRenderOption.setOption使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.birt.report.engine.api.IPDFRenderOption
的用法示例。
在下文中一共展示了IPDFRenderOption.setOption方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setRunAndRenderOption
import org.eclipse.birt.report.engine.api.IPDFRenderOption; //導入方法依賴的package包/類
public void setRunAndRenderOption( String inputFile, String inputName,
String boolVar1, String boolVar2 ) throws Exception
{
copyResource_INPUT( inputName + ".rptdesign", inputName + ".rptdesign" );
IReportRunnable runnable = engine
.openReportDesign( new FileInputStream( new File( inputFile ) ) );
IRunAndRenderTask task = engine.createRunAndRenderTask( runnable );
IPDFRenderOption option = new PDFRenderOption( );
option.setOutputFileName( outputPath + inputName + "_" + boolVar1 + "_"
+ boolVar2 + ".pdf" );
option.setOutputFormat( "pdf" );
option.setOption( option.FIT_TO_PAGE, new Boolean( boolVar1 ) );
option.setOption( option.PAGEBREAK_PAGINATION_ONLY, new Boolean(
boolVar2 ) );
task.setRenderOption( option );
task.run( );
task.close( );
}
示例2: setRenderOption
import org.eclipse.birt.report.engine.api.IPDFRenderOption; //導入方法依賴的package包/類
public void setRenderOption( String inputFile, String inputName,
String boolVar1, String boolVar2 ) throws Exception
{
String report_document = outputPath + inputName + ".rptdocument";
createReportDocument( inputFile, report_document );
reportDoc = engine.openReportDocument( report_document );
IRenderTask taskRender = engine.createRenderTask( reportDoc );
IPDFRenderOption optionRender = new PDFRenderOption( );
optionRender.setOutputFileName( outputPath + inputName + "_render_"
+ boolVar1 + "_" + boolVar2 + ".pdf" );
optionRender.setOutputFormat( "pdf" );
optionRender.setOption(
optionRender.FIT_TO_PAGE,
new Boolean( boolVar1 ) );
optionRender.setOption(
optionRender.PAGEBREAK_PAGINATION_ONLY,
new Boolean( boolVar2 ) );
taskRender.setRenderOption( optionRender );
taskRender.render( );
taskRender.close( );
}