Issue Details (XML | Word | Printable)

Key: DISPL-450
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Reporter: Duc M Trinh
Votes: 7
Watchers: 7
Operations

If you were logged in you would be able to see more operations.
DisplayTag

Update PDF export to use iText 2.0

Created: 09/Mar/07 09:05 AM   Updated: 22/Oct/09 07:07 PM
Component/s: None
Affects Version/s: 1.1
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. Text File DISPL-450-DefaultItextExportView-patch.txt (1 kB)
2. Text File DISPL-450-DefaultPdfExportView-patch.txt (1.0 kB)
3. Text File DISPL-450-ItextTableWriter-patch.txt (1 kB)
4. Text File DISPL-450-ItextTotalWrapper-patch.txt (1 kB)
5. Text File DISPL-450-PdfView-patch.txt (0.8 kB)
6. Java Archive File displaytag-1.2-DISPL-450.patch.jar (217 kB)
7. Text File displaytag-itext-2.1.5.patch (6 kB)



 Description  « Hide
Display Tag currently depends on iText 1.3 for its PDF exporting capability. 1.3 is an extremely old version of the iText library (circa 2005).

Our team is working on an application which makes use of both Display Tag and iText 2.0.x. The 2.0.x version brings many enhancements over prior versions. However, there's apparently quite a bit of refactoring (including deprecation of many classes) that went on in the iText codebase.

It would be nice to see Display Tag update this particular dependency.

Yannick Haudry added a comment - 16/Apr/08 06:44 AM
Here are the patches to make use of the latest iText version (tested with 2.0.8 and 2.1.0)
Basically nothing more than replacing deprecated methods (most of them since 2.0.3 and finally removed in 2.1.0)

LusuM added a comment - 10/Jun/09 04:20 AM
There is actually a bug while using itext 2.0.x to export a multi-page table : if here is a caption the table headers don't appear on the first page (it only affect PDF not RTF)
To solve this issue you have to use the method setNotAddedYet(false) on the table before adding it into the itext document.
I joined the correction file DISPL-450-DefaultItextExportView-patch.txt
Cheers

Josef Cacek added a comment - 11/Aug/09 09:19 AM
All-in-one patch for update to iText 2.1.5

Corporate Gadfly added a comment - 26/Sep/09 08:59 PM
when using DefaultPdfExportView.java with iText 2.1.6+, I had to use a couple of calls to cb.restoreState() at the end of doEndPage() method. iText 2.1.6+ now throws an exception:

From:
http://1t3xt.com/about/history.php?branch=history.21&node=216

Unbalanced saveState()/restoreState() calls to PdfContentByte now raises an IllegalPdfSyntaxException on close() and newPage()

Mario Lavarreda added a comment - 22/Oct/09 07:07 PM
Jar with patches for update to iText 2.1.5