How to edit a PDF programmatically with C#
Step‑by‑step instructions that show you how to edit PDFs using the latest Nutrient .NET SDK — including annotations, page manipulation, and secure handling of password‑protected documents.
.NET PDF AND IMAGING SDK
Convert 100+ document and image formats, merge and compress PDFs, run multi-language OCR and barcode recognition, and even drive TWAIN scanners — all running in-process on .NET 6+, .NET Framework, or Windows services. No external servers, just C#.
Swap a patchwork of PDF, Office, OCR, barcode, and scanning libraries for a single NuGet package. One C# API handles viewing, conversion, TWAIN capture, and more — cutting weeks of integration and maintenance.
Extract data from invoices, forms, IDs, and passports; classify files; and trigger template-driven OCR workflows. Less manual entry, fewer errors, faster operations.
Use the same engine in WinForms, WPF, .NET 6–8 services, or MAUI apps. Modernize at your pace while sharing document logic across desktop, mobile, and server workloads.
Digital signatures, PDF/A, irreversible redaction, and granular permissions come standard. Brand and extend as needed, backed by commercial support and audit-ready compliance.
CAPABILITIES
Parse text, extract data, convert, optimize, and more from a single in-process API — giving you complete document processing without stitching together multiple libraries.
Turn scans and image documents into searchable, indexable PDFs in more than 100 languages.
Pull key-value pairs, tables, and form fields directly into your workflows.
Insert text or images, and add comments, stamps, and digital signatures.
Apply irreversible redaction, set AES-256 encryption, and lock down permissions from C#.
Merge data into templates or build PDFs from scratch for invoices, reports, and more.
Convert 100+ document and image formats to PDF — or back to Office and image — while preserving layout and styling.
Read and write 1D and 2D barcodes and enhance images for improved recognition.
Shrink files with mixed raster content (MRC) compression while keeping fonts, colors, and vectors crisp.
DOCUVIEWARE
Combine the power of our .NET SDK with feature-rich viewing and document management capabilities.
using GdPicturePDF gdpicturePDF = new GdPicturePDF();using GdPictureImaging gdpictureImaging = new GdPictureImaging();// Create a byte array from an image file.byte[] byteArray = File.ReadAllBytes(@"C: empsource.png");// Load the source byte array.int imageId = gdpictureImaging.CreateGdPictureImageFromByteArray(byteArray);// Create the output PDF document.gdpicturePDF.NewPDF();// Add the image to the output PDF document.gdpicturePDF.AddImageFromGdPictureImage(imageId, false, true);// Save the output PDF document.gdpicturePDF.SaveToFile(@"C: empoutput.pdf");// Release unnecessary resources.gdpicturePDF.CloseDocument();gdpictureImaging.ReleaseGdPictureImage(imageId);
Using gdpicturePDF As GdPicturePDF = New GdPicturePDF()Using gdpictureImaging As GdPictureImaging = New GdPictureImaging() ' Create a byte array from an image file. Dim byteArray = File.ReadAllBytes("C: empsource.png") ' Load the source byte array. Dim imageId As Integer = gdpictureImaging.CreateGdPictureImageFromByteArray(byteArray) ' Create the output PDF document. gdpicturePDF.NewPDF() ' Add the image to the output PDF document. gdpicturePDF.AddImageFromGdPictureImage(imageId, False, True) ' Save the output PDF document. gdpicturePDF.SaveToFile("C: empoutput.pdf") ' Release unnecessary resources. gdpicturePDF.CloseDocument() gdpictureImaging.ReleaseGdPictureImage(imageId)End UsingEnd Using
Nutrient SDKs and Cloud APIs add full document lifecycle support to any platform, tech stack, or infrastructure in minutes. The same technology meets Fortune 500 requirements while helping startups ship fast.
Clean documentation, drop-in code, and MCP hooks for both hands-on developers and AI agents.
Web, mobile, desktop, server, or Nutrient Cloud — with no lock-in.
SOC 2 Type II and WCAG 2.2-compliant workflows with PDF/UA-accessible documents.
Built-in document AI with support for leading LLMs and their private implementations.
PROVEN AT SCALE
The digital arm of Germany’s national railway digitizes millions of track maintenance blueprints with the Nutrient PDF SDK, keeping 40,000 trains rolling each day.
Governance portal trusted by 2,000+ boards in 30 countries embeds Nutrient Web SDK to enable in‑portal annotations and cross‑device continuity, achieving 80 percent user engagement.
Rolled out nationwide PAdES-compliant signatures with the Nutrient PDF SDK, letting every Austrian citizen sign official documents securely in seconds.
FREE TRIAL
Unlock the possibilities of Nutrient .NET SDK — no payment information required.
A .NET PDF SDK (software development kit) is a collection of tools and libraries designed to help developers integrate PDF functionality into their .NET applications. Think of it as a toolbox that allows you to seamlessly create, edit, view, and manage PDF documents within your software. This is particularly useful for applications that require document generation, reporting, or digital archiving.
Selecting the ideal .NET PDF SDK is akin to choosing the perfect pair of shoes — it needs to fit just right. Consider the following factors:
Opting for Nutrient offers several advantages:
While open source options offer basic PDF manipulation capabilities, they may lack advanced features and dedicated support. Nutrient’s SDK provides a more extensive feature set, regular updates, and professional support, which can be crucial for enterprise-level applications requiring reliability and scalability.
What is the Nutrient .NET PDF SDK?
The Nutrient .NET PDF SDK is a comprehensive toolkit designed to enable developers to integrate advanced PDF functionality into their .NET applications. It supports features such as viewing, editing, annotating, and converting PDF documents, ensuring seamless performance across various platforms.
Is the SDK cross-platform?
Yes. The Nutrient .NET PDF SDK is fully cross-platform, allowing developers to deploy PDF functionality on Windows, macOS, and Linux. This flexibility ensures applications built with the SDK can operate across different environments without requiring extensive modifications. The SDK is designed for both desktop and server-based applications, making it suitable for a variety of use cases, including cloud deployments and enterprise document processing.
Can the SDK handle PDF annotations?
Yes. The SDK provides robust annotation capabilities, allowing users to add, edit, and remove annotations — such as highlights, notes, and drawings — within PDF documents.
Does the SDK support form filling in PDFs?
Absolutely. Users can fill out interactive PDF forms, extract form data, and programmatically manipulate form fields using the SDK.
Which .NET versions are supported?
The Nutrient .NET PDF SDK supports .NET Core, .NET Standard, and .NET Framework, ensuring compatibility with a wide range of development environments. It’s optimized for modern .NET versions, including .NET 6, .NET 7, and .NET 8, enabling developers to build scalable and future-proof applications. Whether you’re working with legacy .NET applications or migrating to the latest .NET ecosystem, our SDK ensures smooth integration.
Is the SDK optimized for server environments?
Yes. The Nutrient .NET PDF SDK is built for server-side deployment, offering low memory usage and high-performance processing for enterprise applications. It’s designed to efficiently handle batch processing, document conversion, and large-scale PDF operations in cloud and on-premises environments. With optimized memory management and asynchronous processing, the SDK ensures fast response times and reliable performance in high-load document processing workflows.