That depends a lot on what kind of data you have. If the data is in XML format, and very regular -e.g. tabular-, then XSL-FO might be a good choice. The iText API uses a more programmatic (as opposed to FOP's declarative approach) to creating PDFs. It's appropriate for creating files that are irregular in nature, meaning they combine different kinds of data.
Ping & DNS - updated with new look and Ping home screen widget
I did an application for a client using XSL-FO. The starting data was fairly complex so I did a DOM based extraction from the base data into a form closer to the desired output sequence. The XSL-FO community has an active user base and responds quickly to questions.
I found Holman's book "Definitie XSL-FO" to be a big help.
Actually I worked with XSL-FO recently. I created the pdf using Apache FOP library. I did a xsl transformation with xml and created a FO. Then I passed that FO to Apache FOP. But I found that FO generation takes considerable amoun t of time to process. I had to process 40-100 MB xml files. I tried that with another commercial FO parser called XML Mill(Trial). But it was same as FOP. It took a lot of time process. To overcome that I used a XML DOM parser and filtered the relavant data and then passed to iText library. Actually it was a good option. It takes less time to process. So I prefer the 2nd approach. Any different ideas. Can anyone suggest an optimization strategy to convert FO to pdf in less time consuming manner.
Originally posted by Dilshan Edirisuriya: ... I created the pdf using Apache FOP library. I did a xsl transformation with xml and created a FO. Then I passed that FO to Apache FOP. But I found that FO generation takes considerable amoun t of time to process.
Did you take the time to report your experience to the fop user comunity or to the fop team? If you can show them your issues, they might be able to help you, and your findings might help to improve the product.
Joined: Apr 22, 2006
Did you take the time to report your experience to the fop user comunity or to the fop team?
I didnt. Actually I wasnt able to intercept the pdf generation. Thet means I logged the time for both FO generation and pdf generation because I passed my FO to pdf generator at runtime.
I think I choose the wrong path. To process such a huge file you dont need to go through the FO generation. To process small data it will be a good solution. Any ideas?