Reputation: 3
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 ?
Does anyone have an example of drawing stuff on a canvas using VB.NET - this would be very helpful!
Thanks.
Upvotes: 0
Views: 1517
Reputation: 7634
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
We have two currently supported versions: iText 5 and iText 7. Both are available under AGPL and Commercial license.
- iText 5 AGPL
- iText 7 community: https://www.nuget.org/packages/itext7/
iText 5 is a one solution library that is complex, but well documented to help you create your solutions.
iText 7 is a complete re-write of iText 5, allowing you to choose your adventure with add-ons, all based on a simple, modular code structure that is easy to use and well documented.
and
iTextSharp is the .NET port of iText 5.
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.
Upvotes: 1
Reputation: 9012
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.
Upvotes: 1