GeeksCoreLibrary.Modules.GclConverters.EvoPdf
5.3.2505.1
dotnet add package GeeksCoreLibrary.Modules.GclConverters.EvoPdf --version 5.3.2505.1
NuGet\Install-Package GeeksCoreLibrary.Modules.GclConverters.EvoPdf -Version 5.3.2505.1
<PackageReference Include="GeeksCoreLibrary.Modules.GclConverters.EvoPdf" Version="5.3.2505.1" />
<PackageVersion Include="GeeksCoreLibrary.Modules.GclConverters.EvoPdf" Version="5.3.2505.1" />
<PackageReference Include="GeeksCoreLibrary.Modules.GclConverters.EvoPdf" />
paket add GeeksCoreLibrary.Modules.GclConverters.EvoPdf --version 5.3.2505.1
#r "nuget: GeeksCoreLibrary.Modules.GclConverters.EvoPdf, 5.3.2505.1"
#addin nuget:?package=GeeksCoreLibrary.Modules.GclConverters.EvoPdf&version=5.3.2505.1
#tool nuget:?package=GeeksCoreLibrary.Modules.GclConverters.EvoPdf&version=5.3.2505.1
GeeksCoreLibrary.Modules.GclConverters.EvoPdf
The Geeks Core Library has functionality for converting HTML to PDF files. This functionality can be used by injecting IHtmlToPdfConverterService
into your class.
The default implementation in the GCL (HtmlToPdfConverterService
) always returns null
from the ConvertHtmlStringToPdfAsync
method. This is because the GCL doesn't include any PDF converter dependencies. The default implementation is there to show how to use the IHtmlToPdfConverterService
interface and to load HTML to PDF conversion settings from the database. The current library is an implementation of the IHtmlToPdfConverterService
interface that uses the EvoPdf library to convert HTML to PDF.
Installation
This package depends on EvoPdf.Chromium
package. This is a paid library, so it's not included in the NuGet package of the GCL. You have to add a reference to it in your own project. If you don't, you'll get an exception when you try to use the IHtmlToPdfConverterService
. If you don't want to use Evo PDF, you can create your own implementation of IHtmlToPdfConverterService
and use a different library there.
If you do want to use Evo PDF, you need to add a reference to EvoPdf.Chromium.Windows
and/or EvoPdf.Chromium.Linux
, depending on which OS your application will run. It's also possible to load the correct package dynamically, based on the OS. That can be done by adding the following to your .csproj
file:
<ItemGroup Condition="'$(RuntimeIdentifier)' == '' AND $([MSBuild]::IsOsPlatform('Windows'))">
<PackageReference Include="EvoPdf.Chromium.Windows" Version="11.4.5" />
</ItemGroup>
<ItemGroup Condition="'$(RuntimeIdentifier)' == '' AND $([MSBuild]::IsOsPlatform('Linux'))">
<PackageReference Include="EvoPdf.Chromium.Linux" Version="11.4.1" />
</ItemGroup>
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'win-x64'">
<PackageReference Include="EvoPdf.Chromium.Windows" Version="11.4.5" />
</ItemGroup>
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'linux-x64'">
<PackageReference Include="EvoPdf.Chromium.Linux" Version="11.4.1" />
</ItemGroup>
To add this implementation to the dependency injection container, add the following line just below the call to AddGclServices
:
builder.Services.AddEvoPdfHtmlToPdfConverterService();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
-
net9.0
- GeeksCoreLibrary (>= 5.3.2505.1)
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 |
---|---|---|
5.3.2505.1 | 0 | 5/1/2025 |
5.3.2504.4 | 38 | 4/30/2025 |
5.3.2504.3 | 206 | 4/24/2025 |
5.3.2504.2 | 159 | 4/18/2025 |
5.3.2504.1 | 228 | 4/15/2025 |
5.3.2503.3 | 270 | 4/3/2025 |
5.3.2503.2 | 536 | 3/25/2025 |
5.3.2503.1 | 458 | 3/24/2025 |
5.2.2503.4 | 285 | 3/11/2025 |
5.2.2503.3 | 175 | 3/11/2025 |
5.2.2503.2 | 174 | 3/11/2025 |
5.2.2503.1 | 252 | 3/5/2025 |