Menu

Create, Fill, Encrypt and Sign PDFs in .NET With One Free NuGet Package
📰

Create, Fill, Encrypt and Sign PDFs in .NET With One Free NuGet Package

DEV Community: dotnet·eSeGeCe·8 days ago
#z0wYqxLA
#devtodotnet#devto#dev#using#sgcpdf
Reading 0:00
15s threshold

Sooner or later, most business apps need PDFs. Reports and invoices have to be generated, forms filled from your data, files protected with a password, archived in a long term format, or signed before they go out.

sgcPDF .NET covers all of those jobs in one NuGet package. Everything happens in code, headless, with nothing to open on screen, so the same calls work in a console app or in a background service.

This tour has one section per task: create a document with text, a table and an image, build and fill a form, extract text and images, encrypt with AES-256, save as PDF/A-2b, and sign with PAdES B-B. Every sample was compiled against the published packages and run, and the results quoted below are what it printed.

Setup

Create a console app and add the packages:

dotnet new console dotnet add package esegece.sgcPDF.Community dotnet add package esegece.sgcPDF.sgcSign.Community

Enter fullscreen mode

Exit fullscreen mode

You only need the second package for the signing sample at the end.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.