What are the differences between iText and iTextSharp?
Submitted by Anonymous Newbie on Tue, 03/08/2011 - 13:59
I own a copy of the book, but the book is all about using iText, the Java version. I'm using iTextSharp, the C# port. What are the main differences between iText and iTextSharp?
- Login to post comments
Content © 2010 1T3XT BVBA

XML parsing
Submitted by Bruno Lowagie on Mon, 03/21/2011 - 14:05.See XML Processing on MSDN.
Java parsing => "push" => SAX
.NET parsing => "pull" => XmlReader / XmlTextReader
PdfGraphics2D
Submitted by Bruno Lowagie on Tue, 03/08/2011 - 14:09.Section 14.5 (p477-492) is about
PdfGraphics2D. This is an implementation ofjava.awt.Graphics2D, a class that is not available in C#. The examples from that section can't be ported to C#. There is noPdfGraphics2Dclass in iTextSharp.Security functionality
Submitted by Bruno Lowagie on Tue, 03/08/2011 - 14:07.There's more support for digital certificates and private keys in Java than in C#. As a result, some functionality present in iText, is not available in iTextSharp.
For instance: using OCSP is supported in iTextSharp, but using CRLs isn't.
Uppercase / Lowercase
Submitted by Bruno Lowagie on Tue, 03/08/2011 - 14:04.In Java, methods usually start with a small case:
performAction()In C#, you'll see more upper cases:
PerformAction()Getters and setters
Submitted by Bruno Lowagie on Tue, 03/08/2011 - 14:03.In Java, you work with a member-variable
param, and you create a getter and a setter:getParam()andsetParam(); in C#, the getter and setter often coincides with the name of the member-variable:SomeClass.Paramcan be used to get the value as well as to set the value.You'll have to adapt the code on many places to reflect this difference.