Skip to main content Skip to footer
C# .NET PDF API Library Examples

Feature-Rich C# .NET PDF API Library for Total Document Control

Document Solutions for PDF (DsPdf, previously GcPdf) allows you to generate documents with speed, memory efficiency with no dependencies.

  • Generate, load, edit, and save PDF documents in C# .NET
  • Support multiple languages with full text, paragraph formatting, and fonts
  • Redact content from PDFs with the new redaction tool
  • Support hundreds of PDF features
  • All features are fully supported on Windows, macOS, and Linux
  • Includes a JavaScript PDF Viewer to view and optionally edit PDFs on the client-side
Download Free Trial (v 7.0.3)

Overview

A C# .NET PDF document API library allowing developers to programmatically create and manipulate PDF documents at scale. Document Solutions for PDF (DsPdf) allows developers to import/export, create AcroForms (PDF Forms), and deploy PDFs across desktop and web applications.

Benefits of a C# .NET PDF API

Fast and Efficient

Save memory and time with the lightweight API architecture to generate and work with PDF documents in C# .NET effortlessly.

Comprehensive API for Adobe PDF

Generate, edit, and store feature-rich PDF documents without compromising design or features. This API conforms to Adobe PDF specification 2.0. Provides a client-side JavaScript PDF Viewer.

Complete Text Support

DsPdf includes text and paragraph formatting, special characters, multiple languages, RTL support, and vertical and rotated text for all supported platforms.

Feature-Rich API

Generate PDF forms with everything from signatures to security features. You can add, delete, copy and move pages, change page sizes, orientation, generate linearized PDFs, add annotations, redact content from PDF documents, and compress PDF files.

Full .NET Support for Windows, Linux, and MacOS

Develop for any .NET platform and major operating systems with a single code base. Use in your apps for .NET Core, .NET Framework, Mono, Xamarin.iOS, and Xamarin.Android.

Deploy Apps with PDFs to the Cloud

Cloud-based deployment means you can be everywhere. With NuGet and DsPdf, you can deploy to Azure, AWS, and AWS Lambda.

Linearize PDF documents using C# .NET PDF API

Linearize Existing C# PDF Documents

Linearize any existing PDF document and save the document in any 3 modes - Default, Linearize and Incremental Update (for signing existing signed documents)

Learn More TRY DEMO
Delete or Replace text in C# .NET PDF documents

Delete or Replace Text in C# .NET PDF Documents

Update PDF documents by replacing or deleting text.

Learn More Try Demo
Extract Data from PDF Documents using C# .NET

Extract Data from PDF Documents in .NET 6

Copy/Export table data or tagged content from PDFs using DsPdf and DsExcel .NET, an Excel API library.

Learn More Try Demo
Redact Content from PDFs in C# .NET

Redact Content from PDFs in C# .NET

Mark and remove sensitive, confidential content from PDF documents with redact annotations. The marked content can be erased or masked with a rectangular or polygonal reaction area.

Learn More TRY DEMO
Programmatically convert HTML to PDF using C# .NET PDF API

Convert HTML to PDF with No Dependencies

  • Render a URL or HTML string to PDF
  • No dependency on GPL/LGPL licensed software
  • Use the same browser instance to render multiple pages
  • Modify/replace the HTML page content
Learn More TRY DEMO
Advanced Font and Language Support in the C# .NET PDF API

Advanced Font and Language Support

Dozens of fonts and options support various styles and multiple languages, including Arabic, Hebrew, Hindi, and Japanese.

Learn More TRY DEMO
PDF Digital Signatures in C# .NET

PDF Digital Signatures in C# .NET

Implement signatures with image-based visual signatures, or digitally for document security and workflow management using X509 certificates. Use incremental updates to add multiple signatures to PDFs.

Learn More TRY DEMO
Full PDF Annotations Support in C#

Full Annotations Support

Annotations are fully supported for PDF Spec 2.0, including adding, modifying extracting, and deleting annotations from documents.

Learn More TRY DEMO
Work with PDF Fillable Forms in C#

Support for PDF-Based Fillable Forms

DsPdf simplifies PDF form creation and management. It enables users to add, modify, and delete various form fields like text, checkboxes, radio buttons, and signatures, making it easy to create interactive, fillable forms within your PDF documents. Additionally, DsPdf offers seamless import and export of form data for efficient data handling.

Learn More Try Demo
Programmatically Work with PDF Layers using C# .NET PDF API

Programmatically Work with PDF Layers

Add, edit, and remove layers of PDF documents programmatically using C#. DsPdf allows users to create layers, associate content (such as content stream, FormXObject and annotation) with different layers and set their properties. Specific content sections can be selectively viewed or hidden.

TRY DEMO
Programmatically Create Tables with Complex Layouts using C# and VB.NET

Draw Complex Table Layouts on PDFs

Make use of new TableRenderer API to create tables with complex layout, merge cells, rotate text direction in cells and draw custom content in the cells.

Learn More Try Demo

Work with Encrypted PDF Files without Specifying the Password

Edit and save an encrypted PDF by either adding new objects or read/write properties provided they are not based on PDF strings.

Try Demo

Client-Side and Server-Side PDF Solution

JavaScript PDF Viewer

DsPdf comes with a Standard license for Document Solutions  JavaScript PDF Viewer (DsPdfViewer). Together they are a powerful PDF solution that provides robust functionality for both client-side and server-side PDF processing.

With DsPdf, users can easily create, modify, and manipulate PDF documents programmatically on the server-side using the .NET platform.

DsPdfViewer offers a feature-rich and customizable PDF viewer for client-side PDF viewing. The DsPdfViewer also offers a Professional license enabling features such as document editing, PDF form-filling, collaborative editing capabilities, and much more.

Learn More Try Demos

Our Top C# .NET PDF API Features

Quick Start with C# .NET PDF API

Quick Start

This quick tutorial walks you through creating a simple "Hello, World!" app that uses DsPdf to generate and save a C# .NET PDF file.

LEARN MORE
PDF Document Properties

Document Properties

Make viewing faster with linearized PDFs. Documents properties include metadata, compression, and font embedding behavior. Restrict printing, copying, and PDF editing.

LEARN MORE
Print PDF using C# .NET

Print PDF Documents to Printer

Print PDF document directly to a printer on Windows platform.



LEARN MORE
VB.NET PDF API Font Support

Fonts

Create, initialize, and use the Font Collection class to manage and use when rendering texts.


LEARN MORE
PDF Page Headers

Page Headers

Print page headers and footers in PDF documents. Organize pages by headings to help users get a sense of the page’s organization and structure.

LEARN MORE
Programmatically Merge PDFs using C# .NET

Merge Pages

Combine and organize multiple documents into one PDF–making it simple to share and send render pages of one PDF to another.

LEARN MORE
PDF Attachments

Attachments

Attach photos, text, drawings, PDFs, and other file types (including AcroForm) to a PDF. If you move the PDF to a new location, the attachments move with it.

LEARN MORE
Render Text to a PDF using a C# .NET PDF API

Text

Review the basics of rendering text in DsPdf (DrawString and DrawTextLayout), character formatting, paginated text, text trimming, word, character wraps, and much more.

LEARN MORE
Add Graphics to a PDF using C#

Graphics

Use linear and radial gradient brushes.




LEARN MORE
Add Images to a PDF in C# .NET Apps

Images

Generate pages of slides from all images in a directory and extract images from PDF documents.


LEARN MORE
Draw Complex Table Layouts on PDFs using C# .NET PDF API

Draw Complex Table Layouts

Use the new TableRenderer API to create tables with complex layouts, merge cells, rotate text direction in cells, and draw custom content in the cells.

Learn More

Automate PDF Report Generation with HTML Templates and a C# .NET PDF API

PDF Report Templates

Automate and customize documents and report generation. PDF Templates allow you to bind HTML templates to various data sources by using report templates that generate PDF files from HTML.

Learn More
PDF Annotation Support in C# .NET PDF API

Annotations

Create, edit, or delete annotations from existing PDF documents. Several annotations are supported from PDF specifications.

LEARN MORE
Advance Text in PDFs

Advanced Text

Design magazine style, multi-column page layouts with balanced columns and outlines. Multi-language text is supported, including RTL, east-Asian languages, and vertical text.

LEARN MORE
Create PDF Navigation Links in C# .NET Apps

Navigation

Create text links to a URL and add outline entries. Link thumbnails to full-sized images, article threads, and destinations.

LEARN MORE
Convert HTML Files to PDF using a C# .NET PDF API

HTML to PDF

Convert HTML files or strings to PDF, or add HTML fragments to PDF documents along with other content.

LEARN MORE
Programmatically Create Tagged PDFs

Tags

Create tagged (structured) PDFs and attach them to individual paragraphs.

LEARN MORE
Extract PDF Data using a C# .NET PDF API

Extract

Load existing PDF into DsPdf and see how text, paragraphs, and tables can be inspected or extracted.

LEARN MORE
Apply PDF Redaction using C#

Redaction

Completely remove content from PDF documents, including quadrilateral and polygonal redaction areas.

LEARN MORE

Create Fillable PDF Forms in C# .NET Apps

Form Fields

Create AcroForm fields include textbox, checkbox, radio button, combtext, combo box, list box, and buttons. Also, set field format for TextField, CombTextField, ComboBoxField.

LEARN MORE
Programmatically Work with PDF Layers

PDF Layers

Add, edit and remove layers programmatically. Associate PDF content (part of content stream, FormXObject, Annotation or PDF document) with a layer in PDF document.

LEARN MORE
Render Barcodes on PDFs using a C# .NET PDF API

Barcodes

Render samples of all barcode symbologies supported by the DsBarcode library.


LEARN MORE
Digitally Sign PDFs

Digital Signatures

Digitally sign PDFs, inspect signature properties, or remove existing signatures. Add Image signatures to PDF Documents.





Learn More
Programmatically Encrypt and Decrypt PDF Documents

Security

Encrypt or decrypt PDF Documents. When a document is encrypted, its contents become unreadable. An authorized user can decrypt the document to obtain access to the contents. If a PDF document is password encrypted, the user must enter the password in order to view the document.

LEARN MORE
Generate ZUGFeRF Compliant PDFs using C#

ZUGFeRD Compliant

ZUGFeRD is a standard for electronic invoices in PDF/A format and based on the ISO standard. Create ZUGFeRD 1.x compliant invoices and read ZUGFeRD data from existing PDFs.



LEARN MORE
Programmatically Encrypt/Decrypt PDFs using C# .NET

Password-Protected PDF Files

Password-protected PDF files can be opened through the password input dialog or even without specifying the password.

LEARN MORE
JavaScript PDF Viewer

JavaScript PDF Viewer

Check out even more great features of Document Solutions PDF Viewer.



LEARN MORE
Linearize Existing PDF Documents

Linearize Existing PDF Documents

Linearize any existing PDF document and save the document in any 3 modes - Default, Linearize and Incremental Update (for signing existing signed document)

LEARN MORE
.NET PDF Text Search and Delete

Delete Text

Find and delete text from PDF documents using two options - Standard or PreserveSpace.

Learn More
.NET PDF Text Search and Replace

Replace Text

Find and replace text in PDF documents.

 

Learn More
Draw SVG on PDF Documents

Draw SVG on PDF Documents

Draw the SVG Image from file to PDF document using DsPdf.

LEARN MORE
Programmatically Convert PDFs to Images in C# .NET Apps

PDF to Images

Save a PDF as a multi-page TIFF, JPEG, PNG, GIF, or BMP image to save space and open easily.

LEARN MORE
Programmatically Read PDF Structure Tags

Read Structure Tags

Extract whole logical structure of the PDF document, parsed the tags, glean the data that needs to be extracted.

LEARN MORE

Visit Our C# .NET PDF API Samples

C# .NET PDF API Demo Explorer

Your full-fledged ASP.NET Core sample browser includes all major features, real-time PDFs, and use cases. These PDF files are generated using server-side code with DsPdf and loaded in the JavaScript client-side Document Solutions PDF Viewer. You can download individual .NET Core samples that can run as standalones in C# and VB.NET. The demos also include full sample code in C# and VB with comments along each step for quick onboarding.

Launch the demo

Trusted by the World's Leading Companies

"The speed to build what we needed and the level of ease of use of controls are why we chose GrapeCity [now known as MESCIUS]. It was a perfect fit."

Spiro Skias - CGI