About us | News | Contact
iText ® Licenses Support   
You are here: Home > Forums > iText in Action — Second Edition > General questions about the book
User login
  • Request new password

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?

‹ Where is the insert with the serial numbers? Please delete my mail from the archives ›
  • Login to post comments

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

  • Login to post comments

PdfGraphics2D

Submitted by Bruno Lowagie on Tue, 03/08/2011 - 14:09.

Section 14.5 (p477-492) is about PdfGraphics2D. This is an implementation of java.awt.Graphics2D, a class that is not available in C#. The examples from that section can't be ported to C#. There is no PdfGraphics2D class in iTextSharp.

  • Login to post comments

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.

  • Login to post comments

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()

  • Login to post comments

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() and setParam(); in C#, the getter and setter often coincides with the name of the member-variable: SomeClass.Param can 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.

  • Login to post comments
Content © 2010 1T3XT BVBA