bdnowicki.iTextSharp.LGPLv3.Core.net6 3.4.18.1

dotnet add package bdnowicki.iTextSharp.LGPLv3.Core.net6 --version 3.4.18.1
NuGet\Install-Package bdnowicki.iTextSharp.LGPLv3.Core.net6 -Version 3.4.18.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="bdnowicki.iTextSharp.LGPLv3.Core.net6" Version="3.4.18.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add bdnowicki.iTextSharp.LGPLv3.Core.net6 --version 3.4.18.1
#r "nuget: bdnowicki.iTextSharp.LGPLv3.Core.net6, 3.4.18.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install bdnowicki.iTextSharp.LGPLv3.Core.net6 as a Cake Addin
#addin nuget:?package=bdnowicki.iTextSharp.LGPLv3.Core.net6&version=3.4.18.1

// Install bdnowicki.iTextSharp.LGPLv3.Core.net6 as a Cake Tool
#tool nuget:?package=bdnowicki.iTextSharp.LGPLv3.Core.net6&version=3.4.18.1

iTextSharp.LGPLv2.Core

iTextSharp.LGPLv2.Core

iTextSharp.LGPLv2.Core is an unofficial port of the last LGPL version of the iTextSharp (V4.1.6) to .NET Core.

Install via NuGet

To install iTextSharp.LGPLv2.Core, run the following command in the Package Manager Console:

Nuget

PM> Install-Package iTextSharp.LGPLv2.Core

You can also view the package page on NuGet.

Linux (and containers) support

The SkiaSharp library needs extra dependencies to work on Linux and containers. Please install the following NuGet packages:

PM> Install-Package SkiaSharp.NativeAssets.Linux.NoDependencies
PM> Install-Package HarfBuzzSharp.NativeAssets.Linux

You also need to modify your .csproj file to include some MSBuild directives that ensure the required files are in a good place. These extra steps are normally not required but seems to be some issues on how .NET loads them.

<Target Name="CopyFilesAfterPublish" AfterTargets="AfterPublish">
    <Copy SourceFiles="$(TargetDir)runtimes/linux-x64/native/libSkiaSharp.so" DestinationFolder="$([System.IO.Path]::GetFullPath('$(PublishDir)'))/bin/" />
    <Copy SourceFiles="$(TargetDir)runtimes/linux-x64/native/libHarfBuzzSharp.so" DestinationFolder="$([System.IO.Path]::GetFullPath('$(PublishDir)'))/bin/" />    
</Target>

Usage

Functional Tests

FAQ

The pdf is created, but when I try to view it, it says that the document is in use by another process.

You should dispose the FileStream/MemoryStream explicitly. It won't be closed and disposed automatically at the end.

I can't find what would be the equivalent of the PdfTextExtractor class.

PdfTextExtractor exists in v5.0.2+ with AGPL license (Current project is based on the iTextSharp 4.x, not 5.x).

It can't display Unicode characters.

You can find more samples about how to define and use Unicode fonts here.

Table rowspans don't work correctly.

This version which is based on iTextSharp V4.1.6 doesn't support rowspans correctly (iTextSharp supports row spans correctly since v5.4.3, not before that). A solution based on the current version: use nested tables to simulate it.

iTextSharp.text.html.simpleparser.HTMLWorker does not exist.

It has been renamed to HtmlWorker.

Licensing

You have three license choices when it comes to iTextSharp: LGPL/MPL, AGPL, or a commercial license. The LGPL/MPL license is only an option with the older 4.1.6 version (used here). After that version, they switched to a dual AGPL/Commercial.

If you need a more recent version, you either have to make your project open-source or pay the license fee.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.4.18.1 437 3/3/2024