开发者

How to track down an iText api upgrade issue?

开发者 https://www.devze.com 2023-04-06 18:39 出处:网络
I\'m working on an upgrade to iText to version 2.17. It\'s a java application, jdk 1.6. Our old iText 1.0 code takes some rtf files and converts them to pdf and it works fine.However, on certain pdf

I'm working on an upgrade to iText to version 2.17. It's a java application, jdk 1.6.

Our old iText 1.0 code takes some rtf files and converts them to pdf and it works fine. However, on certain pdf documents, I'm seeing some blank rows added in. After looking at them, it looks like there is a table and the location on the page where it goes is where the extra blank space is occurring. The table still gets put on, but it forces the document to add another page. I think somehow the method call for this code must have been changed to accommodate the new api methods and that is the problem.

Any ideas as to how to track this down? I'm going back to the api's and my code changes to get it to compile with the new version; however, it's brute force search trying to figure out which开发者_开发问答 of the changes effected this and I'm wondering what I can do to improve the process?

Thanks,

James


Ouch. 1.0, seriously?! Wow.

The API has evolved quite a bit since I signed on with 1.44(paulo), so going back to the dark ages... wow.

There's no conversion guide. You really are going to have to "brute force" your code update. Furthermore, some classes (text.Table, HeaderFooter, all the RTF output support) were flat out removed. There Are Ways to get the same sorts of results, (PdfPTable, PdfPageEventHandler) but you've got some catching up to do.

I really recommend you get the book: iText in Action (2nd edition). Chapter 2 and chapter 6 are available for free online, as is the source to all the examples.

Also keep in mind that starting with 5.0, iText is released under the APL (or you can buy a commercial license). The APL is a variant of the GPL expanded to encompass "the web service problem". Anyone with access to the OUTPUT of your code must have access to your code.


Well, I found this api page and it's helped a lot! Hopefully it will be of use to someone else: http://www.jarvana.com/jarvana/view/com/lowagie/itext/2.0.8/itext-2.0.8-javadoc.jar!/index.html?overview-summary.html

What I've done is look at the deprecated api methods and the recommendation for the correct use for their change to the new version that were listed on this page.
HTH,

James

0

精彩评论

暂无评论...
验证码 换一张
取 消