Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the Difference between ITEXT and ITEXTPDF? [closed]

Tags:

java

jar

itext

I am trying to migrate my iText dependency to a higher version. Before I used itextpdf-5.4.2.jar and itext-1.3.1.jar. Now I have migrated to itextpdf-5.5.10.jar and itext-4.2.1.jar.

After this upgrade, my PDF no longer prints barcodes. Barcodes worked perfectly with the earlier versions.

  1. Is there anything I am missing regarding this jar migration?
  2. What is the difference between these two jars?

My BarCode sample code:

Barcode39 code128 = new Barcode39();            
code128.setGenerateChecksum(true);            
code128.setCode(Id);  
code128.setBarHeight(50.0f);
code128.setX(30.0f);
like image 627
G.S.Shriram Avatar asked Jan 24 '17 05:01

G.S.Shriram


People also ask

What is the difference between Lowagie and iText?

Actually, there is no difference: in iText 2.1. 0. Create a PDF, go to properties and see "iText 2.1. 0 by lowagie.com" )) what seems to have happened in the evolution of the lib is that "lowagie" in the java package name, was replaced with "itextpdf".

What is iText used for?

iText is a library for creating and manipulating PDF files in Java and.NET.

Can I use iText for free?

By following the rules of the Affero General Public License (AGPL), you may use iText at no cost.

What is itext7?

iText 7 Core is a straightforward, performant and extensible library that is ready to handle the challenges of today's digital document workflows. Embed iText 7 Core's code libraries in applications to create the type of PDF files you want.


1 Answers

I see 3 questions. I will answer only 2 of them, for the third question you need to open a new topic on Stack Overflow.

These are your questions as I see them:

  1. What is the difference between itext and itextpdf?
  2. What am I missing in my dependency upgrade?
  3. Why have my barcodes stopped working?

1. Difference between itext and itextpdf

tl;dr: there is no difference!

I would also like to refer you to these duplicate questions:

  • Difference between com.lowagie.text and iText 2.1.7 JAR?
  • What is the difference between lowagie and iText?

Longer answer:

iText is a PDF library for Java which was originally developed by Bruno Lowagie. You can still see that in the old versions of iText (prior to 5.0.0), the packages are called com.lowagie.* Some years ago, Bruno Lowagie founded a company around his iText product, iText Software. At the time the domain name itext.com was not available, so he registered itextpdf.com. Starting from version 5.0.0, the package names were renamed from com.lowagie.* to com.itextpdf.*. It is a common practice to name your packages after the reverse of your domain name.

As a crude rule of thumb:

  • Versions 1.x.x and 2.x.x = com.lowagie.* = developed by Bruno Lowagie
  • Versions 5.x.x and 7.x.x = com.itextpdf.* = developed by iText Software
  • Versions 4.x.x = released by someone unknown, unrelated to iText Software. Not an official release. Do not use.

2. What is missing in the dependency upgrade

  • Only use version 5.5.10.
  • Delete all other versions.
  • Check your code for import com.lowagie and replace with import com.itextpdf.
  • Fix any compilation errors.

3. Why have your barcodes stopped working

I don't know. Open a new topic on Stack Overflow and add enough code so anyone can reproduce your issue. Please read How to create a Minimal, Complete, and Verifiable example

like image 129
Amedee Van Gasse Avatar answered Sep 18 '22 09:09

Amedee Van Gasse