PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: Large PDF Issue
   PostPosted: 03 Feb 2012, 14:59 
I am using pd4ml within asp.net to output reports to PDF for my users. With very large reports, 500+ pages, the product is running extremely slow and sometimes crashes the web services on the server. If it runs to completion, it may take 25 minutes! In contrast, the same report run on the same server using crystal reports to output to PDF takes a few seconds. Any thoughts? Thanks!


  Subject: Re: Large PDF Issue
   PostPosted: 03 Feb 2012, 15:57 
I hope you compared similar functions of the tools: HTML-to-PDF conversion.

The PDF output itself by PD4ML is quite quick: 2-3% of the conversion time.
But HTML rendering - the first phase of the conversion - is a resource consuming task.

PD4ML does not use native HTML rendering engines (like Webkit or Mozilla), PD4ML is managed .NET code (and 100% Java). Managed code has its benefits and, of course, disadvantages like performance penalties.

For example it instantiates a .NET object even for any standalone whitespace. Bearing in mind generic .NET overhead in CPU/RAM usage, we simply would not recommend to convert such big documents.

If you definitely need that, I would recommend to revise the document layout. First make sure the document is not a huge table. PD4ML does all the layout of all the pages in memory, before it writes anything out. Any cell on, let's say, page #350 whose width is a bit wider than previous cells of the same column requires re-layouting of previous 349 pages - as it impacts the entire table layout.

So split big tables to smaller ones.

Second, try to avoid nesting of tables where it is possible. Each table cell layouts 3 times: MIN, MAX, OPTIMAL. Each table cell of a nested table layouts 9 times. If the nesting level is 2, a cell layouts 27 times etc.



[Reply]     [ 2 posts ] 

cron
Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share