PDF rendering is taking so much time [message #655459] |
Mon, 21 February 2011 04:33  |
Eclipse User |
|
|
|
Hi,
Creating PDF file using birt APIs is taking so much time. May i know the reason for it?
We are first generating a rptdoc file then from that i am rending the data and creating PDF file. This rendering data from rptdoc file and creating PDF file is taking so much time. Nearly 30 min it is taking. The output file size is 196 MB .
The PDF file has 1,25,000 pages
Can anybody provide the reason?
Thanks & Regards,
Laxmipathi Raju
[Updated on: Mon, 21 February 2011 05:08] by Moderator
|
|
|
|
|
|
|
Re: PDF rendering is taking so much time [message #661468 is a reply to message #661173] |
Thu, 24 March 2011 14:43  |
Eclipse User |
|
|
|
Can you open a bugzilla entry for this and post the code below to it?
Also if you could post the design to it as well it would be good.
Jason
On 3/23/2011 9:20 AM, laxmipathi raju wrote:
> Dear Jason,
> I am trying to generate a rpt design file in PDF format. In my database
> i have 150 million records and out of it i am trying to fetch first 1
> lakh records and generating a PDF file it is taking me 33 mins to
> generate. From database i got the data with in 2 mins but to generate
> PDF file it took around 31 mins. In my report i have 255 columns. The
> code i have used is as below. Can any body tell me why it is taking this
> much time to generate a PDF file. Can any body provide me an Optimized
> way of generating PDF files.
>
> public static void main(String[] args)
> {
> String newReportDesign = "reports/3lack256report_PVG.rptdesign";
> String format = PDFRenderOption.OUTPUT_FORMAT_PDF;
> BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
> boolean showInfo = true;
>
> if(args.length > 0){
> reportDesign = args[0];
> }
> if(args.length > 1){
> newReportDesign = args[1];
> }
> ChartApiPDF capi = new ChartApiPDF( );
> capi.run( newReportDesign, format );
> }
> public void run( String reportDesign, String format )
> {
> // Create a runnable report from the reportDesign.
>
> IReportRunnable report = null;
> try
> {
> report = engine.openReportDesign( reportDesign );
> }
> catch ( EngineException e )
> {
> System.err.println( "Report " + reportDesign +
> " not found!\n" );
> engine.destroy( );
> return;
> }
> // Create a task to run the report
> IRunAndRenderTask task = engine.createRunAndRenderTask( report );
>
> //PDF Render Options start
> PDFRenderOption options = new PDFRenderOption();
>
> //pdfOptions.setOutputFileName(outputFilePath);
> options.setSupportedImageFormats("JPG;PNG;BMP;SVG");
> options.setOutputFormat(format);
>
> options.setOption(IPDFRenderOption.PAGE_OVERFLOW,
> IPDFRenderOption.ENLARGE_PAGE_SIZE);
> //PDF Render Options end
>
>
> // Give the report the same name as the design,
> // except give it the appropriate extension
> String output = reportDesign.replaceFirst( ".rptdesign",".pdf" );
> //String output = reportDesign.replaceFirst( ".rptdesign",".html" );
> //"." + format );
> options.setOutputFileName( output );
> // Set the render options on the RunAndRenderTask object
> task.setRenderOption( options );
> // Run the report.
> try {
> task.run( );
> }
> catch ( EngineException e1 )
> {
> System.err.println( "Report " + reportDesign +
> " run failed.\n" );
> System.err.println( e1.toString( ) );
> }
>
> engine.destroy( );
> }
>
> }
>
>
>
> Thanks & Regards,
> Laxmipathi Raju
>
|
|
|
Powered by
FUDForum. Page generated in 0.04623 seconds