Add PDF functionality with Nutrient.SDK (C#)
The Nutrient.SDK package processes PDF, Office, and image documents in .NET applications. Use it to convert documents, edit PDFs, extract text and structured data, and run OCR.
Not sure whether Nutrient.SDK or GdPicture.API fits your project? See the package comparison in the overview.
Requirements
- .NET 10
- Windows x64 or ARM64
- macOS on Apple Silicon (ARM64)
- Linux x64 or ARM64
Install
Add the package to a .NET 10 project:
dotnet add package Nutrient.SDKThe package brings in the native runtime packages it needs through NuGet dependencies. You don’t need to add a runtime package directly.
NuGet package: https://www.nuget.org/packages/Nutrient.SDK(opens in a new tab)
Register your license key
For licensed use, register your license key before you open a document:
using Nutrient;
License.RegisterKey("YOUR_LICENSE_KEY");Your Nutrient .NET SDK license key is valid for both the Nutrient.SDK and GdPicture.API packages. Without a key, the SDK runs in evaluation mode under the evaluation license agreement(opens in a new tab).
Convert a document to PDF
Place an input.docx file in the application’s working directory, then run:
using Nutrient;
using Document document = Document.Open("input.docx");document.ExportAsPdf("output.pdf");What you can do
- Convert PDF, Office, and image documents
- Edit PDFs, annotations, and form fields
- Extract text and structured data
- Run OCR on scanned documents
- Export documents as PDF, images, HTML, or Markdown
- Apply digital signatures
Next steps
- Nutrient.SDK overview and package comparison
- Nutrient.SDK API reference
- Nutrient.SDK changelog
- Support: https://support.nutrient.io/(opens in a new tab)