LumasPDF.Net
4.2.3
dotnet add package LumasPDF.Net --version 4.2.3
NuGet\Install-Package LumasPDF.Net -Version 4.2.3
<PackageReference Include="LumasPDF.Net" Version="4.2.3" />
<PackageVersion Include="LumasPDF.Net" Version="4.2.3" />
<PackageReference Include="LumasPDF.Net" />
paket add LumasPDF.Net --version 4.2.3
#r "nuget: LumasPDF.Net, 4.2.3"
#:package LumasPDF.Net@4.2.3
#addin nuget:?package=LumasPDF.Net&version=4.2.3
#tool nuget:?package=LumasPDF.Net&version=4.2.3
LumasPDF.Net
Cross-platform .NET binding for the LumasPDF engine, with pre-compiled native binaries for Windows, Linux and macOS in one package.
Supported runtimes
| Platform | Architectures |
|---|---|
| Windows | x64, x86, ARM64 |
| Linux | x64, ARM64 (glibc) |
| macOS | universal (x86_64 + arm64) |
Target frameworks
net48, net5.0, net6.0, net7.0, net8.0, net9.0, net10.0.
All seven ship the same netstandard2.0 assembly: the binding is pure P/Invoke
with no per-framework code.
Getting started
using LumasPdfSdk;
IntPtr pdf = LumasPdf.pdfNewPDF();
LumasPdf.pdfCreateNewPDFW(pdf, @"out.pdf");
LumasPdf.pdfAppend(pdf);
LumasPdf.pdfSetFontW(pdf, "Helvetica", 0, 24.0, false, TCodepage.cp1252);
LumasPdf.pdfWriteFTextExW(pdf, 50, 50, 500, 100, 0, "Hello from LumasPDF");
LumasPdf.pdfEndPage(pdf);
LumasPdf.pdfCloseFile(pdf);
LumasPdf.pdfDeletePDF(pdf);
How the native library is resolved
The binding declares its imports against the extension-less name LumasPdf, so
the .NET runtime expands it per platform:
| Platform | File loaded |
|---|---|
| Windows | LumasPdf.dll |
| Linux | libLumasPdf.so |
| macOS | libLumasPdf.dylib |
On .NET 5 and later, the correct binary is selected automatically from the
package's runtimes/<rid>/native/ folders — no project changes needed.
.NET Framework 4.8 does not use that mechanism, so the package also ships
build/LumasPDF.Net.targets, which copies the right Windows native DLL into
your output directory at build time. It selects on RuntimeIdentifier when one
is set, and otherwise on PlatformTarget (x86 gets the 32-bit engine,
anything else gets the 64-bit one).
Notes
- The macOS binary is a single universal file; both
osx-x64andosx-arm64consumers resolve to it. - On macOS, digital signing through the Apple CMSEncoder backend supports SHA-256 only. Requesting SHA-384 or SHA-512 there returns a failure rather than silently producing a weaker SHA-256 signature. The OpenSSL and Windows CryptoAPI backends support all three.
- Linux binaries are built against glibc.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. 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 is compatible. 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 is compatible. 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. 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. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- No dependencies.
-
net10.0
- No dependencies.
-
net5.0
- No dependencies.
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
4.2.3: PDF/A-1b conformance fixes (XMP dc:title mirrors the Info title; embedded CID font subsets carry a /CIDSet stream) and one legacy alias export removed (use pdfGetLumasPDFVersion). Same engine build as the 4.2.3 SDK download (Windows x64/x86/ARM64, Linux x64/ARM64, macOS universal). Notes: https://www.lumaspdf.com/releases/4.2.3