Sunday, July 5, 2009

Export to PDF with iText

It is important to be able to export project data to some pritable format. PDF export feature appeared in GanttProject at the very early days, and it is one of the most popular features in our product. However, there is a number of problems with PDF export implementation in GP. The most important is probably this landscape export bug which is difficult to reproduce yet is really annoying when it appears. It is a bug in Apache FOP library which GP uses for PDF renderig and which had no updates for years.

A few weeks ago I started playing with iText library and the second build of GanttProject 2.0.10 which was published on Friday includes an experimental plugin which exports to PDF using iText. My opinion is that it is just better than our traditional PDFexport. It is faster, it produces more visually appealing documents, it allows for scalable graphics rendering, and it doesn't suffer from that "No meaningful layout" problem in landscape mode (which is now default). Besides, now you can choose document page format and substitute fonts if you don't have those specified in iText export theme.


I plan to work on iText based export a little bit more and ship its beta version with GanttProject 2.0.10 in addition to FOP based. After that, its development will continue in Loire code where it will replace FOP export completely.