A Comparison Between IronPDF & Apryse C#

1. Introduction

As C# developers, dealing with PDFs is a common part of our job, especially when building applications that need to generate, edit, or display documents. That's why having a good PDF library is crucial. These libraries save us time and hassle by providing built-in functions for complex tasks like converting documents, editing text, and handling images within PDFs. Without them, we'd have to write all that code from scratch, which is not only time-consuming but also prone to errors.

In this comparison, we're looking at two popular PDF libraries: IronPDF and Apryse C#. IronPDF is known for its robust features that make working with PDFs in a .NET environment a breeze, from converting HTML to PDF to advanced document editing. Apryse C#, on the other hand, offers a streamlined approach to PDF manipulation, focusing on ease of use and efficiency. We'll dive into the specifics of what each library offers to help you decide which one might be the best fit for your project.

2. Apryse C#

A Comparison Between IronPDF & Apryse C#: Figure 1 - Aprise C# webpage

Apryse C# is a comprehensive PDF library for .NET applications, designed to streamline the process of PDF manipulation within C# environments. It is previously known as PDFTron SDK. Its broad range of features and tools makes it an invaluable asset for developers looking to handle PDFs with precision and ease.

2.1 Key Features

  • Easy Integration with .NET Projects: Apryse C# offers seamless integration with .NET, including ASP.NET Core and traditional .NET Framework applications. This ensures developers can incorporate PDF functionalities directly into their projects without extensive setup or configuration.
  • Document Creation and Editing: Developers can create PDFs from scratch or edit existing ones using Apryse C#. This includes adding text, images, and forms, and even manipulating PDF pages—such as reordering, merging, or splitting documents—directly within their applications.
  • HTML to PDF Conversion: With Apryse C#, converting HTML content to PDF format is straightforward. This feature is particularly useful for generating invoices, reports, and other documents from web pages or HTML templates.
  • Extensive Support for Form Fields: Apryse C# provides robust support for PDF form fields, allowing developers to create, edit, and fill PDF forms programmatically. This is ideal for automating the generation of filled forms based on user input or external data sources.
  • Text and Content Extraction: The library enables the extraction of text and other content from PDF documents. This feature is essential for applications that need to analyze or process the information contained in PDFs, such as search tools or content management systems.
  • Security and Encryption: Apryse C# offers comprehensive security features, including the ability to encrypt PDF documents, set permissions, and manage digital signatures. This ensures that sensitive documents are protected and meet compliance standards.
  • Advanced PDF Features: Developers can leverage advanced PDF features such as annotations, bookmarks, and hyperlinks, enhancing the interactivity and usability of their PDF documents. This allows for the creation of more dynamic and user-friendly PDFs.

3. IronPDF C#

A Comparison Between IronPDF & Apryse C#: Figure 2 - IronPDF webpage

IronPDF stands out as a versatile and powerful PDF library tailored for .NET developers. It simplifies the complex process of PDF manipulation, allowing for the creation, editing, and conversion of PDF documents directly within C# applications. IronPDF is available in different programming languages like Java, Python, and C#. IronPDF is designed to cater to a wide range of PDF processing needs, making it a go-to solution for developers seeking efficiency and reliability.

3.1 Key Features

  • Seamless .NET Integration: IronPDF ensures easy integration with .NET projects, supporting both .NET Framework and .NET Core, including ASP.NET projects. This compatibility facilitates the incorporation of PDF functionalities into applications without the need for complex setups.
  • HTML to PDF Conversion: One of the standout features of IronPDF is its ability to convert HTML to PDF. This feature enables developers to transform web pages or HTML strings into high-quality PDF documents, ideal for generating reports, receipts, and other documentation from HTML templates.
  • Advanced PDF Editing: With IronPDF, developers have the power to edit PDF documents extensively. This includes adding text, images, and vector graphics, as well as modifying existing content within PDF files. IronPDF provides a comprehensive suite of editing tools to customize PDFs according to specific requirements.
  • PDF Form Handling: IronPDF offers robust support for working with PDF forms. It allows for the creation and editing of form fields, as well as filling out forms programmatically. This is particularly useful for automating document workflows and data entry processes.
  • Content Extraction: The library excels in extracting text, images, and even metadata from PDF documents. This functionality supports a range of applications, from content analysis to data migration projects, enabling developers to retrieve and utilize PDF content effectively.
  • Document Security: IronPDF provides comprehensive security features, including support for password protection, encryption, and the management of PDF document permissions. This ensures that sensitive information remains secure and that document access is controlled.
  • Performance and Scalability: Designed with performance in mind, IronPDF is optimized for speed and scalability, making it suitable for processing large volumes of PDF documents or handling high-demand applications without compromising on performance.
  • Comprehensive Documentation and Support: IronPDF is backed by extensive documentation and a responsive support team. This ensures that developers have access to the resources and assistance they need to effectively implement and troubleshoot PDF functionalities within their projects.
  • Compatibility with Various PDF Standards: IronPDF C# supports a wide range of PDF standards, ensuring that documents are compatible with different viewers and meet industry specifications. This includes support for PDF/Afor archival purposes, PDF/UA for accessibility, and more.

4. Create a C# Console Application

Creating a console application in Visual Studio is a straightforward process that lays the foundation for any .NET development project, including those involving PDF manipulations with libraries like IronPDF or Apryse C#. Here's how to get started:

4.1 Launch Visual Studio

Open Visual Studio on your computer. If you haven’t installed Visual Studio yet, download and install it from the official Microsoft website, choosing a version that suits your needs.

4.2 Create a New Project

Once Visual Studio is open, select the "Create a new project" option from the initial dashboard.

A Comparison Between IronPDF & Apryse C#: Figure 3 - Creating a new VS project

4.3 Choose Project Type

In the "Create a new project" window, you’ll see a variety of project templates. Type “Console” in the search box or find the “Console Application” template from the list. Make sure to select the template specific to C#, not another language.

A Comparison Between IronPDF & Apryse C#: Figure 4 - Choosing a console application template

4.4 Configure Your Project

After selecting the “Console Application” template, click the "Next" button. You'll be prompted to configure your new project:

  • Project Name: Enter a name for your project.
  • Location: Choose where you want to save your project on your computer.

    • Solution Name: By default, this matches your project name, but you can change it if you like.

A Comparison Between IronPDF & Apryse C#: Figure 5 - Configuring the project details

  • Framework: Select the .NET version you wish to use. For most purposes, the latest version is recommended unless you have specific requirements.

A Comparison Between IronPDF & Apryse C#: Figure 6 - Selecting the appropriate .NET framework

4.5 Create the Project

After configuring your project settings, click the "Create" button. Visual Studio will set up a new console application project with a default Program.cs file.

4.6 Explore the Project Structure

Take a moment to explore the generated project structure in the Solution Explorer pane. You’ll primarily work with the Program.cs file for a console application, which is where you’ll write your C# code.

5. Install IronPDF Library

Integrating the IronPDF library into your .NET project allows you to leverage its comprehensive PDF manipulation capabilities. There are several methods to install IronPDF, ensuring flexibility based on your preferred workflow or development environment setup.

5.1 Using the NuGet Package Manager

The NuGet Package Manager in Visual Studio provides a user-friendly interface for managing libraries and dependencies.

  1. Open your project in Visual Studio.
  2. Navigate to the Solution Explorer, right-click on your project, and select "Manage NuGet Packages."
  3. Click on the "Browse" tab and search for "IronPdf."

    1. Find IronPDF in the search results, select it, and click "Install." Visual Studio will handle the rest, adding IronPDF to your project.

A Comparison Between IronPDF & Apryse C#: Figure 7 - Installing IronPDF through the NuGet package manager

5.2 Using the Visual Studio Command Line

For those who prefer using the command line, the Package Manager Console in Visual Studio offers a direct way to install packages.

  1. Open Visual Studio and go to your project.
  2. Navigate to Tools > NuGet Package Manager > Package Manager Console.

    1. In the console, type the following command and press Enter:
    Install-Package IronPdf

This command will download and install the latest version of IronPDF into your project.

5.3 Direct Download from the NuGet Webpage

If you prefer to manually download the package before integrating it into your project, you can do so from the NuGet website.

  1. Visit the NuGet website and search for "IronPdf."

    1. On the IronPdf page, find the "Download Package" link and click it to download the .nupkg file.

A Comparison Between IronPDF & Apryse C#: Figure 8 - Directly installing IronPDF throughthe NuGet webpage

  1. Once downloaded, you can add the package to your project manually. In Visual Studio, navigate to the Solution Explorer, right-click on your project, and choose "Add > Reference." Navigate to the location of the downloaded .nupkg file, select it, and add it to your project.

Each of these methods will successfully integrate IronPDF into your .NET project, allowing you to start utilizing its powerful PDF processing features.

6. Install Apryse C#

To integrate Apryse C# into your C# project, you have a few options depending on whether you're working with .NET Framework or .NET Core, as well as your development environment preferences. Below are generalized steps based on information from Apryse documentation and setup guides:

6.1 For .NET Framework

  1. Download the Apryse SDK for Windows: You'll need to visit the Apryse website to download the SDK suitable for .NET Framework applications.

A Comparison Between IronPDF & Apryse C#: Figure 9 - Downloading the Apryse SDK on the Apryse webpage

  1. Extract the SDK: After downloading, extract the SDK to a known location on your system.
  2. Obtain an Apryse Trial Key: Register on the Apryse platform to get a trial key, which you'll use to activate the SDK's trial features.
  3. Set Up Your Project: In Visual Studio, create a new .NET Framework console application. Then, add the Lib folder from the extracted SDK to your project directory.

  4. Add References: Right-click on References in your project, choose "Add Reference," and navigate to the Lib folder where you've copied PDFNetLoader.dll and the appropriate PDFNet.dll for your architecture (x86 or x64). Make sure to set PDFNet.dll's "Copy Local" property to false.

  5. Configure App.config: Ensure that your App.config file has the loadFromRemoteSources setting enabled to true.

There are sample folders in the SDK. You can open and run these sample solutions directly.

7 IronPDF Advanced Features

7.1 HTML to PDF Conversion

IronPDF excels in converting HTML to PDF documents. This feature is crucial for web applications needing to generate reports, invoices, or snapshots of web pages as PDF files. The library accurately renders HTML, CSS, and JavaScript, capturing the layout and styles of web content in the generated PDF.

7.1.1 HTML String To PDF

Converting an HTML string directly to a PDF allows for dynamic PDF creation from HTML content generated within your application or stored in a variable. This is particularly useful for generating customized reports, receipts, or documents based on user input or application data.

using IronPdf;
// Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
IronPdf.License.LicenseKey = "License-Key goes here";
// Instantiate Renderer
var renderer = new ChromePdfRenderer();
// Create a different HTML string
string htmlContent = @"
<!DOCTYPE html>
<html lang='en'>
<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>My PDF</title>
    <style>
        body {
            font-family: Arial, sans-serif;
        }
        h1 {
            color: #333;
            text-align: center;
        }
        p {
            color: #666;
            text-align: justify;
        }
    </style>
</head>
<body>
    <h1>Welcome to My PDF</h1>
    <p>This is a sample paragraph demonstrating how to create a PDF from HTML using IronPdf in C#.</p>
    <p>You can add more content here as needed.</p>
</body>
</html>";
// Create a PDF from the HTML string using C#
var pdf = renderer.RenderHtmlAsPdf(htmlContent);
// Export to a file or Stream
pdf.SaveAs("output.pdf");
using IronPdf;
// Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
IronPdf.License.LicenseKey = "License-Key goes here";
// Instantiate Renderer
var renderer = new ChromePdfRenderer();
// Create a different HTML string
string htmlContent = @"
<!DOCTYPE html>
<html lang='en'>
<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>My PDF</title>
    <style>
        body {
            font-family: Arial, sans-serif;
        }
        h1 {
            color: #333;
            text-align: center;
        }
        p {
            color: #666;
            text-align: justify;
        }
    </style>
</head>
<body>
    <h1>Welcome to My PDF</h1>
    <p>This is a sample paragraph demonstrating how to create a PDF from HTML using IronPdf in C#.</p>
    <p>You can add more content here as needed.</p>
</body>
</html>";
// Create a PDF from the HTML string using C#
var pdf = renderer.RenderHtmlAsPdf(htmlContent);
// Export to a file or Stream
pdf.SaveAs("output.pdf");
Imports IronPdf
' Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True
IronPdf.License.LicenseKey = "License-Key goes here"
' Instantiate Renderer
Dim renderer = New ChromePdfRenderer()
' Create a different HTML string
Dim htmlContent As String = "
<!DOCTYPE html>
<html lang='en'>
<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>My PDF</title>
    <style>
        body {
            font-family: Arial, sans-serif;
        }
        h1 {
            color: #333;
            text-align: center;
        }
        p {
            color: #666;
            text-align: justify;
        }
    </style>
</head>
<body>
    <h1>Welcome to My PDF</h1>
    <p>This is a sample paragraph demonstrating how to create a PDF from HTML using IronPdf in C#.</p>
    <p>You can add more content here as needed.</p>
</body>
</html>"
' Create a PDF from the HTML string using C#
Dim pdf = renderer.RenderHtmlAsPdf(htmlContent)
' Export to a file or Stream
pdf.SaveAs("output.pdf")
VB   C#

A Comparison Between IronPDF & Apryse C#: Figure 10 - Outputted PDF from an HTML string

7.1.2 HTML File To PDF

When you have an HTML file stored on disk, IronPDF can convert this file into a PDF document. This method is ideal for converting existing HTML documents, templates, or reports that are saved as files in your project or on your server.

using IronPdf;
IronPdf.License.LicenseKey = "License-Key goes here";
// Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
// Instantiate Renderer
var renderer = new ChromePdfRenderer();
// Create a PDF from the HTML string using C#
var pdf = renderer.RenderHtmlFileAsPdf("invoice.html");
// Export to a file or Stream
pdf.SaveAs("file.pdf");
using IronPdf;
IronPdf.License.LicenseKey = "License-Key goes here";
// Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
// Instantiate Renderer
var renderer = new ChromePdfRenderer();
// Create a PDF from the HTML string using C#
var pdf = renderer.RenderHtmlFileAsPdf("invoice.html");
// Export to a file or Stream
pdf.SaveAs("file.pdf");
Imports IronPdf
IronPdf.License.LicenseKey = "License-Key goes here"
' Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True
' Instantiate Renderer
Dim renderer = New ChromePdfRenderer()
' Create a PDF from the HTML string using C#
Dim pdf = renderer.RenderHtmlFileAsPdf("invoice.html")
' Export to a file or Stream
pdf.SaveAs("file.pdf")
VB   C#

A Comparison Between IronPDF & Apryse C#: Figure 11 - Outputted PDF from an HTML file

7.1.3 URL To PDF

IronPDF can convert a live webpage into a PDF document by providing the URL. This feature is extremely useful for capturing the current state of a webpage, including complex layouts, CSS, and JavaScript-generated content.

using IronPdf;
IronPdf.License.LicenseKey = "License-Key goes here";
// Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
// Instantiate Renderer
var renderer = new ChromePdfRenderer();
// Create a PDF from the HTML string using C#
var pdf = renderer.RenderUrlAsPdf("https://dotnet.microsoft.com/en-us/download/dotnet-framework");
// Export to a file or Stream
pdf.SaveAs("url.pdf");
using IronPdf;
IronPdf.License.LicenseKey = "License-Key goes here";
// Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
// Instantiate Renderer
var renderer = new ChromePdfRenderer();
// Create a PDF from the HTML string using C#
var pdf = renderer.RenderUrlAsPdf("https://dotnet.microsoft.com/en-us/download/dotnet-framework");
// Export to a file or Stream
pdf.SaveAs("url.pdf");
Imports IronPdf
IronPdf.License.LicenseKey = "License-Key goes here"
' Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True
' Instantiate Renderer
Dim renderer = New ChromePdfRenderer()
' Create a PDF from the HTML string using C#
Dim pdf = renderer.RenderUrlAsPdf("https://dotnet.microsoft.com/en-us/download/dotnet-framework")
' Export to a file or Stream
pdf.SaveAs("url.pdf")
VB   C#

A Comparison Between IronPDF & Apryse C#: Figure 12 - Outputted PDF from a URL

7.2 PDF Merging and Splitting

With IronPDF, combining multiple PDF documents into a single file or dividing a PDF into several smaller documents is straightforward. This functionality is essential for document management systems where organizing and structuring PDF content is necessary.

using IronPdf;
IronPdf.License.LicenseKey = "License-Key goes here";
// Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
var html_a = @"
    <h1>PDF A</h1>
    <p>This is the content of PDF A.</p>
    <p>This is the first page of PDF A.</p>
    <div style='page-break-after: always;'></div>
    <p>This is the second page of PDF A.</p>";
var html_b = @"
    <h1>PDF B</h1>
    <p>This is the content of PDF B.</p>
    <p>This is the first page of PDF B.</p>
    <div style='page-break-after: always;'></div>
    <p>This is the second page of PDF B.</p>";
var renderer = new ChromePdfRenderer();
var pdfdoc_a = renderer.RenderHtmlAsPdf(html_a);
var pdfdoc_b = renderer.RenderHtmlAsPdf(html_b);
var merged = PdfDocument.Merge(pdfdoc_a, pdfdoc_b);
merged.SaveAs("Merged.pdf");
using IronPdf;
IronPdf.License.LicenseKey = "License-Key goes here";
// Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
var html_a = @"
    <h1>PDF A</h1>
    <p>This is the content of PDF A.</p>
    <p>This is the first page of PDF A.</p>
    <div style='page-break-after: always;'></div>
    <p>This is the second page of PDF A.</p>";
var html_b = @"
    <h1>PDF B</h1>
    <p>This is the content of PDF B.</p>
    <p>This is the first page of PDF B.</p>
    <div style='page-break-after: always;'></div>
    <p>This is the second page of PDF B.</p>";
var renderer = new ChromePdfRenderer();
var pdfdoc_a = renderer.RenderHtmlAsPdf(html_a);
var pdfdoc_b = renderer.RenderHtmlAsPdf(html_b);
var merged = PdfDocument.Merge(pdfdoc_a, pdfdoc_b);
merged.SaveAs("Merged.pdf");
Imports IronPdf
IronPdf.License.LicenseKey = "License-Key goes here"
' Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True
Dim html_a = "
    <h1>PDF A</h1>
    <p>This is the content of PDF A.</p>
    <p>This is the first page of PDF A.</p>
    <div style='page-break-after: always;'></div>
    <p>This is the second page of PDF A.</p>"
Dim html_b = "
    <h1>PDF B</h1>
    <p>This is the content of PDF B.</p>
    <p>This is the first page of PDF B.</p>
    <div style='page-break-after: always;'></div>
    <p>This is the second page of PDF B.</p>"
Dim renderer = New ChromePdfRenderer()
Dim pdfdoc_a = renderer.RenderHtmlAsPdf(html_a)
Dim pdfdoc_b = renderer.RenderHtmlAsPdf(html_b)
Dim merged = PdfDocument.Merge(pdfdoc_a, pdfdoc_b)
merged.SaveAs("Merged.pdf")
VB   C#

7.3 Adding Watermarks

IronPDF allows you to add watermarks to PDF pages, which is useful for branding or marking documents as confidential. This feature supports both text and image watermarks, providing flexibility in how watermarks are applied and displayed.

using IronPdf;
IronPdf.License.LicenseKey = "License-Key goes here";
// Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
// Stamps a Watermark onto a new or existing PDF
var renderer = new ChromePdfRenderer();
var pdf = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf");
pdf.ApplyWatermark("<h2 style='color:red'>SAMPLE</h2>", 30, IronPdf.Editing.VerticalAlignment.Middle, IronPdf.Editing.HorizontalAlignment.Center);
pdf.SaveAs("Watermarked.pdf");
using IronPdf;
IronPdf.License.LicenseKey = "License-Key goes here";
// Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
// Stamps a Watermark onto a new or existing PDF
var renderer = new ChromePdfRenderer();
var pdf = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf");
pdf.ApplyWatermark("<h2 style='color:red'>SAMPLE</h2>", 30, IronPdf.Editing.VerticalAlignment.Middle, IronPdf.Editing.HorizontalAlignment.Center);
pdf.SaveAs("Watermarked.pdf");
Imports IronPdf
IronPdf.License.LicenseKey = "License-Key goes here"
' Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True
' Stamps a Watermark onto a new or existing PDF
Dim renderer = New ChromePdfRenderer()
Dim pdf = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf")
pdf.ApplyWatermark("<h2 style='color:red'>SAMPLE</h2>", 30, IronPdf.Editing.VerticalAlignment.Middle, IronPdf.Editing.HorizontalAlignment.Center)
pdf.SaveAs("Watermarked.pdf")
VB   C#

A Comparison Between IronPDF & Apryse C#: Figure 13 - Outputted PDF with 'SAMPLE' watermark

7.4 PDF Forms

IronPDF supports working with interactive PDF forms. It enables the creation, filling, and submission of PDF forms programmatically. This is particularly useful for applications that need to automate form processing or integrate form data collection into their workflows.

using IronPdf;
IronPdf.License.LicenseKey = "License-Key goes here";
// Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
const string differentFormHtml = @"
    <html>
        <body>
            <h2>Employee Information Form</h2>
            <form>
                First name: <br> 
                Last name: <br> 
                <br>
                <p>Please select your department:</p>
                <select name='department'>
                    <option value='HR'>HR</option>
                    <option value='Finance'>Finance</option>
                    <option value='IT'>IT</option>
                    <option value='Marketing'>Marketing</option>
                </select>
                <br>
                <br>
                <p>Please select your employment status:</p>
                <label for='fulltime'>Full-time</label> <br>
                <label for='parttime'>Part-time</label> <br>
                <br>
                <p>Please select your skills:</p>
                <label for='skill1'> Programming</label><br>
                <label for='skill2'> Design</label><br>
                <label for='skill3'> Marketing</label><br>
            </form>
        </body>
    </html>";
// Instantiate Renderer
var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.CreatePdfFormsFromHtml = true;
renderer.RenderHtmlAsPdf(differentFormHtml).SaveAs("EmployeeInfoForm.pdf");
using IronPdf;
IronPdf.License.LicenseKey = "License-Key goes here";
// Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
const string differentFormHtml = @"
    <html>
        <body>
            <h2>Employee Information Form</h2>
            <form>
                First name: <br> 
                Last name: <br> 
                <br>
                <p>Please select your department:</p>
                <select name='department'>
                    <option value='HR'>HR</option>
                    <option value='Finance'>Finance</option>
                    <option value='IT'>IT</option>
                    <option value='Marketing'>Marketing</option>
                </select>
                <br>
                <br>
                <p>Please select your employment status:</p>
                <label for='fulltime'>Full-time</label> <br>
                <label for='parttime'>Part-time</label> <br>
                <br>
                <p>Please select your skills:</p>
                <label for='skill1'> Programming</label><br>
                <label for='skill2'> Design</label><br>
                <label for='skill3'> Marketing</label><br>
            </form>
        </body>
    </html>";
// Instantiate Renderer
var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.CreatePdfFormsFromHtml = true;
renderer.RenderHtmlAsPdf(differentFormHtml).SaveAs("EmployeeInfoForm.pdf");
Imports IronPdf
IronPdf.License.LicenseKey = "License-Key goes here"
' Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True
Const differentFormHtml As String = "
    <html>
        <body>
            <h2>Employee Information Form</h2>
            <form>
                First name: <br> 
                Last name: <br> 
                <br>
                <p>Please select your department:</p>
                <select name='department'>
                    <option value='HR'>HR</option>
                    <option value='Finance'>Finance</option>
                    <option value='IT'>IT</option>
                    <option value='Marketing'>Marketing</option>
                </select>
                <br>
                <br>
                <p>Please select your employment status:</p>
                <label for='fulltime'>Full-time</label> <br>
                <label for='parttime'>Part-time</label> <br>
                <br>
                <p>Please select your skills:</p>
                <label for='skill1'> Programming</label><br>
                <label for='skill2'> Design</label><br>
                <label for='skill3'> Marketing</label><br>
            </form>
        </body>
    </html>"
' Instantiate Renderer
Dim renderer = New ChromePdfRenderer()
renderer.RenderingOptions.CreatePdfFormsFromHtml = True
renderer.RenderHtmlAsPdf(differentFormHtml).SaveAs("EmployeeInfoForm.pdf")
VB   C#

A Comparison Between IronPDF & Apryse C#: Figure 14 - Outputted PDF with an interactive form

7.5 Security and Encryption

IronPDF provides features to secure PDF documents, including the ability to encrypt PDF files, set permissions, and add digital signatures. This ensures that sensitive information in PDF documents is protected and that document integrity is maintained.

using IronPdf;
IronPdf.License.LicenseKey = "License-Key" goes here;
// Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
var pdf = PdfDocument.FromFile("invoice.pdf");
// Change or set the document encryption password
pdf.SecuritySettings.OwnerPassword = "top-secret"; // password to edit the pdf
pdf.SecuritySettings.UserPassword = "sharable"; // password to open the pdf
pdf.SaveAs("secured.pdf");
using IronPdf;
IronPdf.License.LicenseKey = "License-Key" goes here;
// Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
var pdf = PdfDocument.FromFile("invoice.pdf");
// Change or set the document encryption password
pdf.SecuritySettings.OwnerPassword = "top-secret"; // password to edit the pdf
pdf.SecuritySettings.UserPassword = "sharable"; // password to open the pdf
pdf.SaveAs("secured.pdf");
Imports IronPdf
IronPdf.License.LicenseKey = "License-Key" goes here
' Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True
Dim pdf = PdfDocument.FromFile("invoice.pdf")
' Change or set the document encryption password
pdf.SecuritySettings.OwnerPassword = "top-secret" ' password to edit the pdf
pdf.SecuritySettings.UserPassword = "sharable" ' password to open the pdf
pdf.SaveAs("secured.pdf")
VB   C#

A Comparison Between IronPDF & Apryse C#: Figure 15 - Popup from a password protected PDF

7.6 Advanced PDF Editing

IronPDF goes beyond basic PDF editing by offering advanced editing capabilities. This includes adding headers and footers, customizing page layout and design, and embedding images and fonts. These features allow for dynamic PDF generation and customization according to specific application requirements.

using IronPdf;
IronPdf.License.LicenseKey = "License-Key goes here";
// Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
// Instantiate Renderer
var renderer = new IronPdf.ChromePdfRenderer();
var multi_page_html = @"
    <p> This is 1st Page</p>
    <div style = 'page-break-after: always;' ></div>
    <p> This is 2nd Page</p>
    <div style = 'page-break-after: always;' ></div>
    <p> This is 3rd Page</p>
    <div style = 'page-break-after: always;' ></div>
    <p> This is 4th Page</p>
    <div style = 'page-break-after: always;' ></div>
    <p> This is 5th Page</p>
    <div style = 'page-break-after: always;' ></div>
    <p> This is 6th Page</p>
    <div style = 'page-break-after: always;' ></div>
    <p> This is 7th Page</p>";
// Create a PDF or Load an existing PDF using IronPdf.PdfDocument.Load()
var pdfdoc = renderer.RenderHtmlAsPdf(multi_page_html);
// Create a Header for the first page only
var firstPageHeader = new HtmlHeaderFooter();
firstPageHeader.HtmlFragment = "This is the First Page Header";
pdfdoc.AddHtmlHeaders(firstPageHeader, 1);
pdfdoc.SaveAs("PagesWithHeaders.pdf");
using IronPdf;
IronPdf.License.LicenseKey = "License-Key goes here";
// Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;
// Instantiate Renderer
var renderer = new IronPdf.ChromePdfRenderer();
var multi_page_html = @"
    <p> This is 1st Page</p>
    <div style = 'page-break-after: always;' ></div>
    <p> This is 2nd Page</p>
    <div style = 'page-break-after: always;' ></div>
    <p> This is 3rd Page</p>
    <div style = 'page-break-after: always;' ></div>
    <p> This is 4th Page</p>
    <div style = 'page-break-after: always;' ></div>
    <p> This is 5th Page</p>
    <div style = 'page-break-after: always;' ></div>
    <p> This is 6th Page</p>
    <div style = 'page-break-after: always;' ></div>
    <p> This is 7th Page</p>";
// Create a PDF or Load an existing PDF using IronPdf.PdfDocument.Load()
var pdfdoc = renderer.RenderHtmlAsPdf(multi_page_html);
// Create a Header for the first page only
var firstPageHeader = new HtmlHeaderFooter();
firstPageHeader.HtmlFragment = "This is the First Page Header";
pdfdoc.AddHtmlHeaders(firstPageHeader, 1);
pdfdoc.SaveAs("PagesWithHeaders.pdf");
Imports IronPdf
IronPdf.License.LicenseKey = "License-Key goes here"
' Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True
' Instantiate Renderer
Dim renderer = New IronPdf.ChromePdfRenderer()
Dim multi_page_html = "
    <p> This is 1st Page</p>
    <div style = 'page-break-after: always;' ></div>
    <p> This is 2nd Page</p>
    <div style = 'page-break-after: always;' ></div>
    <p> This is 3rd Page</p>
    <div style = 'page-break-after: always;' ></div>
    <p> This is 4th Page</p>
    <div style = 'page-break-after: always;' ></div>
    <p> This is 5th Page</p>
    <div style = 'page-break-after: always;' ></div>
    <p> This is 6th Page</p>
    <div style = 'page-break-after: always;' ></div>
    <p> This is 7th Page</p>"
' Create a PDF or Load an existing PDF using IronPdf.PdfDocument.Load()
Dim pdfdoc = renderer.RenderHtmlAsPdf(multi_page_html)
' Create a Header for the first page only
Dim firstPageHeader = New HtmlHeaderFooter()
firstPageHeader.HtmlFragment = "This is the First Page Header"
pdfdoc.AddHtmlHeaders(firstPageHeader, 1)
pdfdoc.SaveAs("PagesWithHeaders.pdf")
VB   C#

A Comparison Between IronPDF & Apryse C#: Figure 16 - Outputted multipage PDF

8 Apryse C# Advanced Features

8.1 PDF Annotation and Markup

Apryse C# enables developers to add annotations and markup to PDF documents programmatically. This includes text annotations, highlights, underlines, and shapes, which are essential for document review processes or adding supplementary information to PDFs.

using pdftron;
using pdftron.PDF;
using pdftron.SDF;
class Program
{
    static void Main()
    {
        PDFNet.Initialize("License");
        using (PDFDoc doc = new PDFDoc("input.pdf"))
        {
            Page page = doc.GetPage(1);
           Text txt = Text.Create(doc, new Rect(10, 20, 30, 40));
        txt.SetIcon("UserIcon");
        txt.SetContents("It's an annotation!"); 
        page.AnnotPushBack(txt);
            page.AnnotPushBack(annot);
            doc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized);
        }
    }
}
using pdftron;
using pdftron.PDF;
using pdftron.SDF;
class Program
{
    static void Main()
    {
        PDFNet.Initialize("License");
        using (PDFDoc doc = new PDFDoc("input.pdf"))
        {
            Page page = doc.GetPage(1);
           Text txt = Text.Create(doc, new Rect(10, 20, 30, 40));
        txt.SetIcon("UserIcon");
        txt.SetContents("It's an annotation!"); 
        page.AnnotPushBack(txt);
            page.AnnotPushBack(annot);
            doc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized);
        }
    }
}
Imports pdftron
Imports pdftron.PDF
Imports pdftron.SDF
Friend Class Program
	Shared Sub Main()
		PDFNet.Initialize("License")
		Using doc As New PDFDoc("input.pdf")
			Dim page As Page = doc.GetPage(1)
		   Dim txt As Text = Text.Create(doc, New Rect(10, 20, 30, 40))
		txt.SetIcon("UserIcon")
		txt.SetContents("It's an annotation!")
		page.AnnotPushBack(txt)
			page.AnnotPushBack(annot)
			doc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized)
		End Using
	End Sub
End Class
VB   C#

A Comparison Between IronPDF & Apryse C#: Figure 17 - Outputted PDF with icon and annotation

8.2 Document Conversion

With Apryse C#, developers can convert various document formats to PDF, including Office documents, images, and HTML. This feature is vital for applications that require uniform document formats for archiving, sharing, or displaying.

using pdftron;
using pdftron.PDF;
class Program
{
    static void Main()
    {
        PDFNet.Initialize();
        PDFDoc pdfdoc = new PDFDoc();
        Convert.ToPdf(pdfdoc, "input.docx");
        pdfdoc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized);
    }
}
using pdftron;
using pdftron.PDF;
class Program
{
    static void Main()
    {
        PDFNet.Initialize();
        PDFDoc pdfdoc = new PDFDoc();
        Convert.ToPdf(pdfdoc, "input.docx");
        pdfdoc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized);
    }
}
Imports pdftron
Imports pdftron.PDF
Friend Class Program
	Shared Sub Main()
		PDFNet.Initialize()
		Dim pdfdoc As New PDFDoc()
		Convert.ToPdf(pdfdoc, "input.docx")
		pdfdoc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized)
	End Sub
End Class
VB   C#

8.3 Content Extraction and Analysis

Apryse C# excels in extracting text, images, and other content from PDF documents. This capability is crucial for content analysis, data extraction, and information retrieval applications, enabling the processing of PDF content for various purposes.

using pdftron;
using pdftron.PDF;
using pdftron.SDF;
class Program
{
    static void Main()
    {
        PDFNet.Initialize();
        using (PDFDoc doc = new PDFDoc("input.pdf"))
        {
            PageIterator itr = doc.GetPageIterator();
            for (; itr.HasNext(); itr.Next())
            {
                Page page = itr.Current();
                TextExtractor txt = new TextExtractor();
                txt.Begin(page);
                Console.WriteLine(txt.GetAsText());
            }
        }
    }
}
using pdftron;
using pdftron.PDF;
using pdftron.SDF;
class Program
{
    static void Main()
    {
        PDFNet.Initialize();
        using (PDFDoc doc = new PDFDoc("input.pdf"))
        {
            PageIterator itr = doc.GetPageIterator();
            for (; itr.HasNext(); itr.Next())
            {
                Page page = itr.Current();
                TextExtractor txt = new TextExtractor();
                txt.Begin(page);
                Console.WriteLine(txt.GetAsText());
            }
        }
    }
}
Imports pdftron
Imports pdftron.PDF
Imports pdftron.SDF
Friend Class Program
	Shared Sub Main()
		PDFNet.Initialize()
		Using doc As New PDFDoc("input.pdf")
			Dim itr As PageIterator = doc.GetPageIterator()
			Do While itr.HasNext()
				Dim page As Page = itr.Current()
				Dim txt As New TextExtractor()
				txt.Begin(page)
				Console.WriteLine(txt.GetAsText())
				itr.Next()
			Loop
		End Using
	End Sub
End Class
VB   C#

A Comparison Between IronPDF & Apryse C#: Figure 18 - Console output of the extracted text from a PDF

8.4 Security and Encryption

Apryse C# provides comprehensive tools for securing PDF documents. Developers can apply password protection, encrypt documents, and manage user permissions, ensuring that sensitive information is safeguarded.

using pdftron;
using pdftron.SDF;
using pdftron.PDF;
class Program
{
    static void Main()
    {
        PDFNet.Initialize();
        using (PDFDoc doc = new PDFDoc("input.pdf"))
        {
            doc.InitSecurityHandler();
            SecurityHandler newHandler = new SecurityHandler();
            newHandler.ChangeUserPassword("new_password");
            newHandler.SetPermission(SecurityHandler.Permission.e_print, true);
            doc.SetSecurityHandler(newHandler);
            doc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized);
        }
    }
}
using pdftron;
using pdftron.SDF;
using pdftron.PDF;
class Program
{
    static void Main()
    {
        PDFNet.Initialize();
        using (PDFDoc doc = new PDFDoc("input.pdf"))
        {
            doc.InitSecurityHandler();
            SecurityHandler newHandler = new SecurityHandler();
            newHandler.ChangeUserPassword("new_password");
            newHandler.SetPermission(SecurityHandler.Permission.e_print, true);
            doc.SetSecurityHandler(newHandler);
            doc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized);
        }
    }
}
Imports pdftron
Imports pdftron.SDF
Imports pdftron.PDF
Friend Class Program
	Shared Sub Main()
		PDFNet.Initialize()
		Using doc As New PDFDoc("input.pdf")
			doc.InitSecurityHandler()
			Dim newHandler As New SecurityHandler()
			newHandler.ChangeUserPassword("new_password")
			newHandler.SetPermission(SecurityHandler.Permission.e_print, True)
			doc.SetSecurityHandler(newHandler)
			doc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized)
		End Using
	End Sub
End Class
VB   C#

8.5 Redaction

Apryse C# also supports redacting sensitive information from PDF documents, an essential feature for compliance and privacy concerns. This allows developers to permanently remove or obscure text and images within a PDF.

using pdftron;
using pdftron.PDF;
using pdftron.SDF;
class Program
{
    static void Main()
    {
        PDFNet.Initialize();
        using (PDFDoc doc = new PDFDoc("input.pdf"))
        {
            Redactor.Redaction[] redactions = {
                new Redactor.Redaction(1, new Rect(100, 100, 200, 200), false, "redacted"),
            };
            Redactor.Redact(doc, redactions);
            doc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized);
        }
    }
}
using pdftron;
using pdftron.PDF;
using pdftron.SDF;
class Program
{
    static void Main()
    {
        PDFNet.Initialize();
        using (PDFDoc doc = new PDFDoc("input.pdf"))
        {
            Redactor.Redaction[] redactions = {
                new Redactor.Redaction(1, new Rect(100, 100, 200, 200), false, "redacted"),
            };
            Redactor.Redact(doc, redactions);
            doc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized);
        }
    }
}
Imports pdftron
Imports pdftron.PDF
Imports pdftron.SDF
Friend Class Program
	Shared Sub Main()
		PDFNet.Initialize()
		Using doc As New PDFDoc("input.pdf")
			Dim redactions() As Redactor.Redaction = { New Redactor.Redaction(1, New Rect(100, 100, 200, 200), False, "redacted")}
			Redactor.Redact(doc, redactions)
			doc.Save("output.pdf", SDFDoc.SaveOptions.e_linearized)
		End Using
	End Sub
End Class
VB   C#

9. Documentation and Support

9.1 IronPDF Documentation and Support

Documentation: IronPDF offers comprehensive documentation that covers a wide range of topics, from getting started guides to advanced features like HTML to PDF conversion, PDF editing, merging, splitting, and security. The documentation is designed to be easy to follow, with plenty of code examples and explanations that guide developers through the process of implementing various PDF-related functionalities in their .NET applications.

Support: For developers who need assistance, IronPDF provides support through various channels. This includes email support, ticket support, and live engineering support chat where you can get in touch with their technical support team for help with specific issues. You can also provide feedback using a support system.

A Comparison Between IronPDF & Apryse C#: Figure 19 - Iron Software support team chat

9.2 Apryse C# Documentation and Support

Documentation: Apryse C# (formerly known as PDFTron for .NET) boasts detailed documentation that includes a comprehensive API reference, developer guides, and sample code for a broad spectrum of PDF manipulation tasks.

Support: Apryse provides a support system for developers, featuring direct email support with their technical team for troubleshooting and assistance with implementation questions. You can also ask questions on stack overflow.

10. License Information

10.1 IronPDF License

IronPDF offers several licensing options tailored to different project needs, including Lite, Plus, and Professional licenses, with pricing starting at $749 for a Lite license. These licenses vary based on the number of developers, locations, and projects they cover. Additionally, IronPDF provides options for royalty-free redistribution and extended support and updates, with specific costs for these add-ons.

IronPDF offers a range of perpetual license options for developers:

  • Lite Edition: Costs $749, suitable for 1 developer, 1 location, and 1 project, with email support included.
  • Plus Edition: Priced at $1,499, it covers up to 3 developers, 3 locations, and 3 projects, with 24-hour email and chat support, and phone support.
  • Professional Edition: At $2,999, this edition is for up to 10 developers, 10 locations, and 10 projects, providing comprehensive support including email, chat, phone, and screen-sharing support.

They also offer a monthly subscription at $500 per month, including 10,000 API calls, with additional calls at $0.02 each. For unlimited use, IronPDF provides an enterprise solution with a request for a quote. This solution includes an unlimited perpetual license and unlimited API calls, among other features.

A Comparison Between IronPDF & Apryse C#: Figure 20 - IronPDF licensing webpage

10.2 Apryse C# License

Apryse C# provides a customizable pricing model that adjusts based on specific project requirements, including features, document volume, and deployment scenarios. You have to contact their sales team to get pricing information.

A Comparison Between IronPDF & Apryse C#: Figure 21 - Apryse form to get in contant with their sales team

11 Conclusion

In conclusion, IronPDF and Apryse C# each bring powerful capabilities to the table for .NET developers working with PDFs. IronPDF, however, provides an edge with its extensive PDF manipulation features. It shines with its ability to handle comprehensive tasks such as extensive editing, merging PDFs that adds to its appeal. With the Iron Suite package, developers can access a suite of tools at a cost-effective price point, equipping them with a robust set of utilities for various development needs.

IronPDF stands out for its overall versatility and value proposition in most PDF processing scenarios. The final decision would ideally be based on the project requirements and the specific features needed by the developers.