I'm generating PDF documents using iText(Sharp). I'm developing the app using Visual Studio 2017. I've added iTestSharp using NuGet and I've experimented with both VB and C#
All is fine for the 'high-level' stuff (chapter 1 from the jumpstart tutorial). Now I want to go more low-level using 'page', 'canvas' and 'low-level' drawing commands : chapter 2 from the jumpstart tutorial
My problem is that I can't access the classes PdfDocument, PdfCanvas, etc. these classes are not available.. Also I can't create a New PdfWriter object (New operator is not implemented)
What's wrong ?
- am I missing some Imports / using libraries ? (I currently include iTextSharp.text and iTextSharp.text.pdf)
- has this someting to do with iText V5 - > V7 and is the tutorial maybe a bit out of date ?
- are these classes only available in the Java libraries, and not in the .NET port ?
Does anyone have an example of drawing stuff on a canvas using VB.NET - this would be very helpful!
Thanks.
To clarify further:
The tutorial you found is not out of date, on the contrary, it's the most recent one. It's the iTextSharp you got from NuGet that is out of date.
If you read the description on NuGet.org then you will clearly see that iTextSharp is the old version: https://www.nuget.org/packages/iTextSharp
and
If this wasn't clear enough for you (and it obviously wasn't), then I would really, really appreciate your feedback on how we can improve the description on NuGet.org.
Make sure you have the right NuGet packages on your system. To try this out, create an empty project and include NuGet packages
The jumpstart tutorial was written for iText7, so it make sense you'd need that specific version. iText7 is a complete re-write of iText5. So you might indeed find several classes missing if you try to run the samples against the iText5 library.