I am quite knew to xsl-fo and been working on a project to convert XHTM file
to PDF. I hear that FOP does have some performance issue but I am not sure
if the response I am getting is within the acceptable range.
I have a file that contains a table with 35 columns and 300 rowns. Generated
PDF file is 6 pages. Table is fixed layout and the size of XSL-fo file is
1.3MB. The whole PDF heneration meaning from XHTML -> XSL_FO -> PDF takes
average of 12 sec. Initials runs actually take twice as long but I assume
there are static resource initiation involved.
I switched to using latest version of saxon for xslt engoine which helped
but to reduce from 18 sec to 12sec.
Is it possible to to achive 1sec per page with the amount of data that I am
generating. I hear people generating hundresds even thousands of pages but
not sure what is the load of these pages.
If it helps, I checked from the command line and found that XSL-FO
generation takes about 2-3 sec and xsl-fo to PDF takes about 12-13 sec. So I
know it is the PDF generation that is slow.
I also broke down the PDF generation timing and 95% of the time is spent
suring transform method.
Here is the sample code that I use to achive this:
XMLReader parser = factory.newSAXParser().getXMLReader();
XMLFilter filter = new CSSToXSLFOFilter(null, null,
parameters, parser);
FopFactory fopFactory = FopFactory.newInstance();
Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF,
out);
Result res = new SAXResult(fop.getDefaultHandler());
Source src = new SAXSource(filter,new
InputSource(buffInput));
Transformer transformer =
TransformerFactoryImpl.newInstance().newTransformer();
transformer.transform(src, res);
Any help will be appriciated.
Thank you.
--
View this message in context:
http://www.nabble.com/Performance-with-large-Tables-tf1858493.html#a5075721
Sent from the FOP - Users forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]