• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

PDF Creation

 
Arun Kumar
Ranch Hand
Posts: 133
Chrome Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have a requirement of creating PDF documents dynamically

I am little bit confused here,Is XSL-FO a good choice to do so,I am not getting good results from google,I am new to XSL-FO but have good experience with XML

Or is iText the ideal choice
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Bill
 
Jan Cumps
Bartender
Posts: 2599
12
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is XSL-FO a good choice to do so
I think yes.
Apache FOP is good quality, and the XSL:FO format is well documented.

Regards, Jan
 
Dilshan Edirisuriya
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jan Cumps
Bartender
Posts: 2599
12
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Rgards, Jan
 
Dilshan Edirisuriya
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic