EvoPdf Next Core PDF API for .NET
The Core component provides the API for creating, manipulating and securing PDF documents programmatically.
You can create PDFs by adding text, images and other elements, then apply encryption, digital signatures, permissions, headers, footers and stamps.
The library targets .NET Standard 2.0 and can be used in .NET Core and .NET Framework applications that you
can deploy on Windows and Linux platforms, including Azure App Service and Functions or Docker.
|
|
|
|
|
| EvoPdf Next Core PDF API
|
| for .NET |
|
|
|
|
The Core PDF API component of the
EvoPdf Next Library for .NET provides the API for programmatically creating, manipulating and securing PDF documents.
You can create PDF documents by adding text, images and other graphical elements and then enhance them with features such as encryption,
permissions, digital signatures, custom headers, footers, stamps and other advanced processing options.
The library targets .NET Standard 2.0 and can be used in .NET Core and .NET Framework applications
that you can deploy on Windows and Linux platforms, including Azure App Service and Functions or Docker.
|
|
|
|
|
|
|
 |
|
Main Features |
|
|
Create, edit and merge PDF documents
Generate PDF documents by adding text, images and other elements
Encrypt, set permissions and passwords for the PDF documents
Control the PDF document display with PDF viewer preferences
|
|
Create PDF documents with digital signatures
Edit PDF documents by applying stamps, headers and footers
Merge PDF documents
Asynchronous methods that can be used with async and await
|
|
|
 |
|
Compatibility |
|
|
Windows 10, 11 and Windows Server 2016 to 2025
Linux 64-bit distributions
.NET 10.0, 9.0, 8.0, 7.0, 6.0, .NET Standard 2.0
.NET Framework 4.6.2 to 4.8.1
|
|
Azure App Service and Azure Functions
Azure Cloud Services and Virtual Machines
Web, console and desktop applications
Docker containers for Windows and Linux
|
|
|
 |
|
Getting Started |
|
|
|
You can quickly get started with the ASP.NET demo application available for download, or you can integrate the library into your own project.
The online documentation,
contains detailed instructions on how to run an application using EvoPdf Next Library for .NET on Windows and Linux machines, Azure App Service
and Azure Functions for Windows and Linux.
You can view the current capabilities of the library by checking the
online demo
application and the API reference in the online documentation.
|
|
|
|
Download Demo Application
|
|
|
|
The ZIP package available for download from the link below includes an ASP.NET demo application project with complete C# source code covering all major library features.
|
|
|
|
|
|
Running the samples in the demo application that involve HTML to PDF conversion features on Linux platforms might require installing some dependency packages. The documentation includes an entire section dedicated to building, publishing and running the demo application on multiple platforms.
|
|
 |
|
NuGet Packages |
|
|
|
To use the Core component in applications targeting Windows, reference the
EvoPdf.Next.Core.Windows NuGet Package.
For applications targeting Linux, reference the
EvoPdf.Next.Core.Linux NuGet Package.
There is also a multiplatform metapackage that references both the Windows and Linux Core packages:
EvoPdf.Next.Core.
The Core API also includes the classes used for HTML to PDF and HTML to Image conversion, as well as for HTML headers, footers and stamps,
because these are required by other components in the suite.
To use these classes, you must reference the additional Core Runtime package for your target platform.
This is handled automatically when installing the HTML to PDF Converter NuGet package, which is the recommended approach rather
than adding the Core and Core Runtime packages separately.
You can find more details on the
EvoPdf Next HTML to PDF Converter for .NET component page.
|
|
 |
|
Installation |
|
|
|
The Core PDF API component does not require additional dependency installation if you are not using HTML to PDF conversion features.
|
|
 |
|
EvoPdf.Next Namespace |
|
|
|
All components of the EvoPdf Next for .NET library share the same
EvoPdf.Next
namespace and can be used together in the same application.
To use the library in your own code, add the using directive at the top of your C# source file, as shown below.
|
|
// add this using statement at the top of your C# file
using EvoPdf.Next;
|
|
 |
|
C# Code Sample |
|
|
You can use the sample code below to create a PDF document with a text element using a standard font, then save it to a memory buffer that you can either write to a file
or send to the browser for download.
|
|
PdfDocumentCreateSettings pdfCreateSettings = new PdfDocumentCreateSettings()
{
PageSize = PdfPageSize.A4,
PageOrientation = PdfPageOrientation.Portrait,
Margins = new PdfMargins(36, 36, 36, 36)
};
// Create a new PDF document with the specified settings
using PdfDocument pdfDocument = new PdfDocument(pdfCreateSettings);
// Create a standard Helvetica font
PdfFont fontHelvetica = PdfFontManager.CreateStandardFont(PdfStandardFont.Helvetica, 16f, PdfFontStyle.Normal, PdfColor.Blue);
// Add a title using the Helvetica font
PdfTextElement pdfText = new PdfTextElement("Hello World !!!", fontHelvetica)
{
X = 10,
Y = 10
};
PdfTextRenderInfo textRenderInfo = pdfDocument.AddText(pdfText);
// Save to memory buffer
byte[] outPdfBuffer = pdfDocument.Save();
|
|