-1

The application I'm working on is using older versions of com.lowagie itext 2.x, now i want to move that to upper version to 4.x, but it looks like several packages are being renamed/removed etc.. I would like to ask if anyone did a migration to 4.x ? If so any suggestions would be great. Thanks in advance

NagaRajendra
  • 159
  • 3
  • 16
  • Is it possible that you are mistaken in version number and that you meant iText 5.5.9? – Amedee Van Gasse Jun 10 '16 at 06:10
  • 1
    *but it looks like several packages are being renamed/removed etc..* - from 2.1.7 to the internal tag 4.2.0 (the only 4.x of itext) there hardly are any differences at all. Thus, you most likely do mean 5.x or 7.x as target, don't you? – mkl Jun 10 '16 at 06:35
  • Maybe there are changes in one of the gorks Bruno mentioned? I know at least one frankengork where they replaced `com.lowagie` with `com.itextpdf`. Dit somebody mention trademark violation? – Amedee Van Gasse Jun 10 '16 at 07:00
  • Or maybe the OP *is* talking about 4.2.0 and the removed packages they refer to are stuff like RTF, which was removed because of unclear copyright status? We'll never know if the OP does not explain. – Amedee Van Gasse Jun 10 '16 at 07:05
  • Okay just to clarify there are several iTexts the ome i'm talking about is this http://mvnrepository.com/artifact/com.lowagie/itext/4.2.0 hope this helps – NagaRajendra Jun 10 '16 at 14:19

1 Answers1

8

There has never been an iText 4.2.0. If you find a version that claims to be iText 4.2.0, then you shouldn't use it because it's in violation with the guidelines of open source. This is explained in this post: My Maven build is broken, what should I do? which was an answer to this StackOverflow question: com.lowagie.itext version 4.2.2 missing jar file in MVNrepository

I quote:

Any other versions of iText between 2.1.7 and 5.0.0, like 4.2.0 and 4.2.1, are forks by other companies. According to Apache's Guide to uploading artifacts to the Central Repository, those companies should have used a different groupId, as the Apache FAQ clearly states:

I have a patched version of the foo project developed at foo.com, what groupId should I use?

When you patch / modify a third party project, that patched version becomes your project and therefore should be distributed under a groupId you control as any project you would have developed, never under com.foo. See above considerations about groupId.

The situation created by the companies that "hijacked" the com.lowagie groupId created a problem where you could inadvertently introduce software that the infringes the copyright or trademarks of third parties (or worse) into your project. To stop this, iText has regained control over com.lowagie and we have made sure that this no longer happens.

If you decide to stick with an old version of iText, you can do so at your own risk.

2.1.7 (July 2009) was the last version of iText released by the company iText Group NV (or its legal predecessor), with the com.lowagie groupId. The next version of iText, released by the company iText Group NV, was version 5.0.0, with the com.itextpdf groupId, which means it's binary incompatible with your current code.

In your question, you are asking how to move from an official version (that should no longer be used in a commercial context for legal and technical reasons) to an unsupported version that is in violations with the guidelines and rules of the open source community. iText 4.2.0 is a gork, it's a version of iText 2.1.7 of which God Only Really Knows what's inside. The only correct answer to the question How to migrate com.lowagie iText from 2.1.7 to 4.2.0 is: You dont! You just don't!

You can migrate to iText 5.5.13, which is the latest version in the iText 5 series. That should be fairly easy. It's mostly a matter of changing com.lowagie into com.itextpdf.

You can also migrate to iText 7.1.1, which is the all new iText version. Migrating to that version requires more programming as iText 7 is a completely new version of iText (rebuilt from scratch). The architecture was changed based on customer requests, so that we can support features that couldn't be inserted into iText 5 (for instance: support for Indic languages such as Devanagari and Tamil).

For your info: I am the Lowagie you refer to when you write com.lowagie.

Amedee Van Gasse
  • 7,280
  • 5
  • 55
  • 101
Bruno Lowagie
  • 75,994
  • 9
  • 109
  • 165
  • Thanks for your time Bruno, but the itext i'm talking about is this http://mvnrepository.com/artifact/com.lowagie/itext/4.2.0 which is pretty legal and doesn't violate any rules as our application has been using it since a very long time and we want to upgrade it now. – NagaRajendra Jun 10 '16 at 14:21
  • 2
    I am talking about the same repository. Did you even read [My Maven build is broken, what should I do?](http://itextpdf.com/maven-update-problem-with-itext-4.2.2) That artifact was created by people not affiliated with iText Group. We took over and made an empty 4.2.2 to avoid that people would use the problematic versions 4.2.0 and 4.2.1. See also http://stackoverflow.com/questions/31318089/com-lowagie-itext-version-4-2-2-missing-jar-file-in-mvnrepository and http://stackoverflow.com/a/31406673/1622493 – Bruno Lowagie Jun 10 '16 at 16:27
  • 2
    If you scroll down on that Maven page, you'll see that 4.2.0 was uploaded by weiyehcolumbia.edu who worked for the company InProTopia Corporation. InProTopia had no right to "hijack" our Maven GroupId, but did it anyway. InProTopia Corporation no longer exists. My advice: **Do not use that version!** – Bruno Lowagie Jun 10 '16 at 16:30
  • Sure Thanks Bruno I will switch to original iText – NagaRajendra Jun 10 '16 at 18:29
  • 1
    Maje sure you don't use iText versions lower than iText 5 in a commercial context for these reasons: http://developers.itextpdf.com/question/can-itext-217-or-earlier-be-used-commercially Customers could sue you if they find out you can't clarify the IP of those old versions. – Bruno Lowagie Jun 10 '16 at 18:57
  • Sorry I didn't know you were the original author – NagaRajendra Jun 10 '16 at 19:20