Skip to footer content
MIGRATION GUIDES

How to Migrate from Nutrient.io to IronPDF in C#

Migrating from Nutrient.io (formerly PSPDFKit) to IronPDF simplifies your .NET PDF workflow by moving from a complex document intelligence platform with async-first patterns to a focused PDF library with straightforward synchronous APIs. This guide provides a comprehensive, step-by-step migration path that eliminates platform overhead while maintaining all essential PDF capabilities.

Why Migrate from Nutrient.io to IronPDF

The Platform Complexity Problem

Nutrient.io (formerly PSPDFKit) has evolved from a PDF SDK into a comprehensive "document intelligence platform." While this transformation broadens capabilities, it introduces significant challenges for teams that simply need reliable PDF operations:

  1. Platform Overengineering: What was once a PDF SDK is now a full document intelligence platform with AI features and document workflow capabilities that may be unnecessary for straightforward PDF tasks.

  2. Enterprise Pricing: Nutrient.io is positioned for large organizations with opaque pricing that requires contacting sales. This creates barriers for small-to-medium teams and makes budget planning difficult.

  3. Rebrand Confusion: The PSPDFKit → Nutrient transition has created documentation issues where references to both names exist. Package names may still use PSPDFKit, and migration paths during the transition remain unclear.

  4. Async-First Complexity: Everything in Nutrient.io requires async/await patterns. Even simple operations need PdfProcessor.CreateAsync() for initialization and async methods for basic tasks, adding overhead for synchronous workflows.

  5. Heavy Dependencies: The full platform requires more resources with a larger package footprint, more initialization time, and additional configuration.

Nutrient.io vs IronPDF Comparison

AspectNutrient.io (PSPDFKit)IronPDF
FocusDocument intelligence platformPDF library
PricingEnterprise (contact sales)Transparent, published
ArchitectureComplex platformSimple library
API StyleAsync-firstSync with async options
DependenciesHeavyLightweight
ConfigurationComplex config objectsStraightforward properties
Learning CurveSteep (platform)Gentle (library)
Target UsersEnterpriseAll team sizes

For teams planning .NET 10 and C# 14 adoption through 2025 and 2026, IronPDF provides a simpler foundation that integrates cleanly without the overhead of a full document intelligence platform.


Before You Start

Prerequisites

  1. .NET Environment: .NET Framework 4.6.2+ or .NET Core 3.1+ / .NET 5/6/7/8/9+
  2. NuGet Access: Ability to install NuGet packages
  3. IronPDF License: Obtain your license key from ironpdf.com

NuGet Package Changes

# Remove Nutrient/PSPDFKit packages
dotnet remove package PSPDFKit.NET
dotnet remove package PSPDFKit.PDF
dotnet remove package Nutrient
dotnet remove package Nutrient.PDF

# Install IronPDF
dotnet add package IronPdf
# Remove Nutrient/PSPDFKit packages
dotnet remove package PSPDFKit.NET
dotnet remove package PSPDFKit.PDF
dotnet remove package Nutrient
dotnet remove package Nutrient.PDF

# Install IronPDF
dotnet add package IronPdf
SHELL

License Configuration

// Add at application startup (Program.cs or Startup.cs)
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
// Add at application startup (Program.cs or Startup.cs)
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
' Add at application startup (Program.vb or Startup.vb)
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY"
$vbLabelText   $csharpLabel

Identify Nutrient.io Usage

# Find all Nutrient/PSPDFKit references
grep -r "PSPDFKit\|Nutrient\|PdfProcessor\|PdfConfiguration" --include="*.cs" .
# Find all Nutrient/PSPDFKit references
grep -r "PSPDFKit\|Nutrient\|PdfProcessor\|PdfConfiguration" --include="*.cs" .
SHELL

Complete API Reference

Initialization Mappings

Nutrient.io (PSPDFKit)IronPDF
await PdfProcessor.CreateAsync()new ChromePdfRenderer()
processor.Dispose()(automatic or manual)
new PdfConfiguration { ... }renderer.RenderingOptions

Document Loading Mappings

Nutrient.io (PSPDFKit)IronPDF
await processor.OpenAsync(path)PdfDocument.FromFile(path)
Document.LoadFromStream(stream)PdfDocument.FromStream(stream)
Document.LoadFromBytes(bytes)new PdfDocument(bytes)

PDF Generation Mappings

Nutrient.io (PSPDFKit)IronPDF
await processor.GeneratePdfFromHtmlStringAsync(html)renderer.RenderHtmlAsPdf(html)
await processor.GeneratePdfFromUrlAsync(url)renderer.RenderUrlAsPdf(url)
await processor.GeneratePdfFromFileAsync(path)renderer.RenderHtmlFileAsPdf(path)

Document Operations Mappings

Nutrient.io (PSPDFKit)IronPDF
await processor.MergeAsync(docs)PdfDocument.Merge(pdfs)
document.PageCountpdf.PageCount
await document.SaveAsync(path)pdf.SaveAs(path)
document.ToBytes()pdf.BinaryData

Annotations and Watermarks Mappings

Nutrient.io (PSPDFKit)IronPDF
await document.AddAnnotationAsync(index, annotation)pdf.ApplyWatermark(html)
new TextAnnotation("text")HTML in watermark
annotation.Opacity = 0.5CSS opacity: 0.5
annotation.FontSize = 48CSS font-size: 48px

Code Migration Examples

Example 1: HTML to PDF Conversion

Before (Nutrient.io):

// NuGet: Install-Package PSPDFKit.Dotnet
using PSPDFKit.Pdf;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        var htmlContent = "<html><body><h1>Hello World</h1></body></html>";

        using var processor = await PdfProcessor.CreateAsync();
        var document = await processor.GeneratePdfFromHtmlStringAsync(htmlContent);
        await document.SaveAsync("output.pdf");
    }
}
// NuGet: Install-Package PSPDFKit.Dotnet
using PSPDFKit.Pdf;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        var htmlContent = "<html><body><h1>Hello World</h1></body></html>";

        using var processor = await PdfProcessor.CreateAsync();
        var document = await processor.GeneratePdfFromHtmlStringAsync(htmlContent);
        await document.SaveAsync("output.pdf");
    }
}
Imports PSPDFKit.Pdf
Imports System.Threading.Tasks

Module Program
    Async Function Main() As Task
        Dim htmlContent As String = "<html><body><h1>Hello World</h1></body></html>"

        Using processor = Await PdfProcessor.CreateAsync()
            Dim document = Await processor.GeneratePdfFromHtmlStringAsync(htmlContent)
            Await document.SaveAsync("output.pdf")
        End Using
    End Function
End Module
$vbLabelText   $csharpLabel

After (IronPDF):

// NuGet: Install-Package IronPdf
using IronPdf;

class Program
{
    static void Main()
    {
        var htmlContent = "<html><body><h1>Hello World</h1></body></html>";

        var renderer = new ChromePdfRenderer();
        var pdf = renderer.RenderHtmlAsPdf(htmlContent);
        pdf.SaveAs("output.pdf");
    }
}
// NuGet: Install-Package IronPdf
using IronPdf;

class Program
{
    static void Main()
    {
        var htmlContent = "<html><body><h1>Hello World</h1></body></html>";

        var renderer = new ChromePdfRenderer();
        var pdf = renderer.RenderHtmlAsPdf(htmlContent);
        pdf.SaveAs("output.pdf");
    }
}
Imports IronPdf

Class Program
    Shared Sub Main()
        Dim htmlContent As String = "<html><body><h1>Hello World</h1></body></html>"

        Dim renderer As New ChromePdfRenderer()
        Dim pdf = renderer.RenderHtmlAsPdf(htmlContent)
        pdf.SaveAs("output.pdf")
    End Sub
End Class
$vbLabelText   $csharpLabel

The Nutrient.io approach requires several async steps: creating a PdfProcessor with await PdfProcessor.CreateAsync(), then calling await processor.GeneratePdfFromHtmlStringAsync(), and finally await document.SaveAsync(). The entire method must be marked async Task, and the processor requires a using statement for proper disposal.

IronPDF simplifies this dramatically. Create a ChromePdfRenderer, call RenderHtmlAsPdf(), and save with SaveAs(). No async/await required, no processor lifecycle to manage, and no using blocks needed for simple operations. This pattern is more intuitive for developers who don't need async patterns for their PDF workflow. See the HTML to PDF documentation for additional rendering options.

Example 2: Merging Multiple PDFs

Before (Nutrient.io):

// NuGet: Install-Package PSPDFKit.Dotnet
using PSPDFKit.Pdf;
using System.Threading.Tasks;
using System.Collections.Generic;

class Program
{
    static async Task Main()
    {
        using var processor = await PdfProcessor.CreateAsync();

        var document1 = await processor.OpenAsync("document1.pdf");
        var document2 = await processor.OpenAsync("document2.pdf");

        var mergedDocument = await processor.MergeAsync(new List<PdfDocument> { document1, document2 });
        await mergedDocument.SaveAsync("merged.pdf");
    }
}
// NuGet: Install-Package PSPDFKit.Dotnet
using PSPDFKit.Pdf;
using System.Threading.Tasks;
using System.Collections.Generic;

class Program
{
    static async Task Main()
    {
        using var processor = await PdfProcessor.CreateAsync();

        var document1 = await processor.OpenAsync("document1.pdf");
        var document2 = await processor.OpenAsync("document2.pdf");

        var mergedDocument = await processor.MergeAsync(new List<PdfDocument> { document1, document2 });
        await mergedDocument.SaveAsync("merged.pdf");
    }
}
Imports PSPDFKit.Pdf
Imports System.Threading.Tasks
Imports System.Collections.Generic

Class Program
    Shared Async Function Main() As Task
        Using processor = Await PdfProcessor.CreateAsync()

            Dim document1 = Await processor.OpenAsync("document1.pdf")
            Dim document2 = Await processor.OpenAsync("document2.pdf")

            Dim mergedDocument = Await processor.MergeAsync(New List(Of PdfDocument) From {document1, document2})
            Await mergedDocument.SaveAsync("merged.pdf")
        End Using
    End Function
End Class
$vbLabelText   $csharpLabel

After (IronPDF):

// NuGet: Install-Package IronPdf
using IronPdf;
using System.Collections.Generic;

class Program
{
    static void Main()
    {
        var pdf1 = PdfDocument.FromFile("document1.pdf");
        var pdf2 = PdfDocument.FromFile("document2.pdf");

        var merged = PdfDocument.Merge(pdf1, pdf2);
        merged.SaveAs("merged.pdf");
    }
}
// NuGet: Install-Package IronPdf
using IronPdf;
using System.Collections.Generic;

class Program
{
    static void Main()
    {
        var pdf1 = PdfDocument.FromFile("document1.pdf");
        var pdf2 = PdfDocument.FromFile("document2.pdf");

        var merged = PdfDocument.Merge(pdf1, pdf2);
        merged.SaveAs("merged.pdf");
    }
}
Imports IronPdf
Imports System.Collections.Generic

Class Program
    Shared Sub Main()
        Dim pdf1 = PdfDocument.FromFile("document1.pdf")
        Dim pdf2 = PdfDocument.FromFile("document2.pdf")

        Dim merged = PdfDocument.Merge(pdf1, pdf2)
        merged.SaveAs("merged.pdf")
    End Sub
End Class
$vbLabelText   $csharpLabel

The Nutrient.io merge operation requires creating a processor with await PdfProcessor.CreateAsync(), opening each document with separate await processor.OpenAsync() calls, creating a List<PdfDocument>, calling await processor.MergeAsync() with that list, and finally await mergedDocument.SaveAsync(). That's five async operations for a basic merge.

IronPDF reduces this to four synchronous lines: load each PDF with PdfDocument.FromFile(), merge with the static PdfDocument.Merge() method, and save. No processor lifecycle, no list creation required (you can pass documents directly), and no async overhead. Learn more about merging and splitting PDFs.

Example 3: Adding Watermarks

Before (Nutrient.io):

// NuGet: Install-Package PSPDFKit.Dotnet
using PSPDFKit.Pdf;
using PSPDFKit.Pdf.Annotation;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        using var processor = await PdfProcessor.CreateAsync();
        var document = await processor.OpenAsync("document.pdf");

        for (int i = 0; i < document.PageCount; i++)
        {
            var watermark = new TextAnnotation("CONFIDENTIAL")
            {
                Opacity = 0.5,
                FontSize = 48
            };
            await document.AddAnnotationAsync(i, watermark);
        }

        await document.SaveAsync("watermarked.pdf");
    }
}
// NuGet: Install-Package PSPDFKit.Dotnet
using PSPDFKit.Pdf;
using PSPDFKit.Pdf.Annotation;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        using var processor = await PdfProcessor.CreateAsync();
        var document = await processor.OpenAsync("document.pdf");

        for (int i = 0; i < document.PageCount; i++)
        {
            var watermark = new TextAnnotation("CONFIDENTIAL")
            {
                Opacity = 0.5,
                FontSize = 48
            };
            await document.AddAnnotationAsync(i, watermark);
        }

        await document.SaveAsync("watermarked.pdf");
    }
}
Imports PSPDFKit.Pdf
Imports PSPDFKit.Pdf.Annotation
Imports System.Threading.Tasks

Class Program
    Shared Async Function Main() As Task
        Using processor = Await PdfProcessor.CreateAsync()
            Dim document = Await processor.OpenAsync("document.pdf")

            For i As Integer = 0 To document.PageCount - 1
                Dim watermark = New TextAnnotation("CONFIDENTIAL") With {
                    .Opacity = 0.5,
                    .FontSize = 48
                }
                Await document.AddAnnotationAsync(i, watermark)
            Next

            Await document.SaveAsync("watermarked.pdf")
        End Using
    End Function
End Class
$vbLabelText   $csharpLabel

After (IronPDF):

// NuGet: Install-Package IronPdf
using IronPdf;
using IronPdf.Editing;

class Program
{
    static void Main()
    {
        var pdf = PdfDocument.FromFile("document.pdf");

        pdf.ApplyWatermark("<h1 style='color:gray;opacity:0.5;'>CONFIDENTIAL</h1>",
            50,
            VerticalAlignment.Middle,
            HorizontalAlignment.Center);

        pdf.SaveAs("watermarked.pdf");
    }
}
// NuGet: Install-Package IronPdf
using IronPdf;
using IronPdf.Editing;

class Program
{
    static void Main()
    {
        var pdf = PdfDocument.FromFile("document.pdf");

        pdf.ApplyWatermark("<h1 style='color:gray;opacity:0.5;'>CONFIDENTIAL</h1>",
            50,
            VerticalAlignment.Middle,
            HorizontalAlignment.Center);

        pdf.SaveAs("watermarked.pdf");
    }
}
Imports IronPdf
Imports IronPdf.Editing

Class Program
    Shared Sub Main()
        Dim pdf = PdfDocument.FromFile("document.pdf")

        pdf.ApplyWatermark("<h1 style='color:gray;opacity:0.5;'>CONFIDENTIAL</h1>", 
                           50, 
                           VerticalAlignment.Middle, 
                           HorizontalAlignment.Center)

        pdf.SaveAs("watermarked.pdf")
    End Sub
End Class
$vbLabelText   $csharpLabel

This example highlights a fundamental architectural difference. Nutrient.io uses an annotation-based approach: you create a TextAnnotation object with properties like Opacity and FontSize, then loop through every page calling await document.AddAnnotationAsync(i, watermark) for each one. This requires understanding the annotation system and managing the loop yourself.

IronPDF uses an HTML-based approach: the ApplyWatermark() method accepts an HTML string with CSS styling. The watermark is automatically applied to all pages in a single call. You control appearance through familiar CSS properties (color, opacity, font-size) rather than annotation-specific object properties. This approach provides more styling flexibility—you can use any HTML/CSS including gradients, images, and complex layouts. See the watermark documentation for advanced examples.


Critical Migration Notes

Async to Sync Conversion

The most significant change is removing unnecessary async/await patterns:

// Nutrient.io: Async-first
using var processor = await PdfProcessor.CreateAsync();
var document = await processor.GeneratePdfFromHtmlStringAsync(html);
await document.SaveAsync("output.pdf");

// IronPDF: Sync by default (async available when needed)
var renderer = new ChromePdfRenderer();
var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SaveAs("output.pdf");
// Nutrient.io: Async-first
using var processor = await PdfProcessor.CreateAsync();
var document = await processor.GeneratePdfFromHtmlStringAsync(html);
await document.SaveAsync("output.pdf");

// IronPDF: Sync by default (async available when needed)
var renderer = new ChromePdfRenderer();
var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SaveAs("output.pdf");
Imports System
Imports System.Threading.Tasks

' Nutrient.io: Async-first
Using processor = Await PdfProcessor.CreateAsync()
    Dim document = Await processor.GeneratePdfFromHtmlStringAsync(html)
    Await document.SaveAsync("output.pdf")
End Using

' IronPDF: Sync by default (async available when needed)
Dim renderer = New ChromePdfRenderer()
Dim pdf = renderer.RenderHtmlAsPdf(html)
pdf.SaveAs("output.pdf")
$vbLabelText   $csharpLabel

If you do need async operations, IronPDF provides async variants like RenderHtmlAsPdfAsync().

Processor Lifecycle Elimination

Nutrient.io requires processor creation and disposal:

// Nutrient.io: Processor lifecycle management
using var processor = await PdfProcessor.CreateAsync();
// ... use processor ...
// Processor disposed at end of using block

// IronPDF: No processor lifecycle
var renderer = new ChromePdfRenderer();
// Reuse renderer, no complex lifecycle management
// Nutrient.io: Processor lifecycle management
using var processor = await PdfProcessor.CreateAsync();
// ... use processor ...
// Processor disposed at end of using block

// IronPDF: No processor lifecycle
var renderer = new ChromePdfRenderer();
// Reuse renderer, no complex lifecycle management
Imports IronPdf

' Nutrient.io: Processor lifecycle management
Using processor = Await PdfProcessor.CreateAsync()
    ' ... use processor ...
    ' Processor disposed at end of using block
End Using

' IronPDF: No processor lifecycle
Dim renderer As New ChromePdfRenderer()
' Reuse renderer, no complex lifecycle management
$vbLabelText   $csharpLabel

Configuration Pattern Change

Nutrient.io uses configuration objects; IronPDF uses properties:

// Nutrient.io: Config object
var config = new PdfConfiguration
{
    PageSize = PageSize.A4,
    Margins = new Margins(20, 20, 20, 20)
};
var doc = await processor.GeneratePdfFromHtmlStringAsync(html, config);

// IronPDF: Properties on RenderingOptions
var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.PaperSize = PdfPaperSize.A4;
renderer.RenderingOptions.MarginTop = 20;
renderer.RenderingOptions.MarginBottom = 20;
renderer.RenderingOptions.MarginLeft = 20;
renderer.RenderingOptions.MarginRight = 20;
var pdf = renderer.RenderHtmlAsPdf(html);
// Nutrient.io: Config object
var config = new PdfConfiguration
{
    PageSize = PageSize.A4,
    Margins = new Margins(20, 20, 20, 20)
};
var doc = await processor.GeneratePdfFromHtmlStringAsync(html, config);

// IronPDF: Properties on RenderingOptions
var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.PaperSize = PdfPaperSize.A4;
renderer.RenderingOptions.MarginTop = 20;
renderer.RenderingOptions.MarginBottom = 20;
renderer.RenderingOptions.MarginLeft = 20;
renderer.RenderingOptions.MarginRight = 20;
var pdf = renderer.RenderHtmlAsPdf(html);
Imports System.Threading.Tasks

' Nutrient.io: Config object
Dim config As New PdfConfiguration With {
    .PageSize = PageSize.A4,
    .Margins = New Margins(20, 20, 20, 20)
}
Dim doc = Await processor.GeneratePdfFromHtmlStringAsync(html, config)

' IronPDF: Properties on RenderingOptions
Dim renderer As New ChromePdfRenderer()
renderer.RenderingOptions.PaperSize = PdfPaperSize.A4
renderer.RenderingOptions.MarginTop = 20
renderer.RenderingOptions.MarginBottom = 20
renderer.RenderingOptions.MarginLeft = 20
renderer.RenderingOptions.MarginRight = 20
Dim pdf = renderer.RenderHtmlAsPdf(html)
$vbLabelText   $csharpLabel

Annotation to HTML Watermarks

Replace annotation objects with HTML strings:

// Nutrient.io: Annotation object with properties
new TextAnnotation("CONFIDENTIAL") { Opacity = 0.5f, FontSize = 48 }

// IronPDF: HTML with CSS
"<h1 style='opacity:0.5; font-size:48px;'>CONFIDENTIAL</h1>"
// Nutrient.io: Annotation object with properties
new TextAnnotation("CONFIDENTIAL") { Opacity = 0.5f, FontSize = 48 }

// IronPDF: HTML with CSS
"<h1 style='opacity:0.5; font-size:48px;'>CONFIDENTIAL</h1>"
' Nutrient.io: Annotation object with properties
New TextAnnotation("CONFIDENTIAL") With {.Opacity = 0.5F, .FontSize = 48}

' IronPDF: HTML with CSS
"<h1 style='opacity:0.5; font-size:48px;'>CONFIDENTIAL</h1>"
$vbLabelText   $csharpLabel

Page Number Handling

Nutrient.io requires manual page counting; IronPDF has built-in placeholders:

// Nutrient.io: Manual loop and page counting
for (int i = 0; i < doc.PageCount; i++)
{
    var footer = new TextAnnotation($"Page {i + 1} of {doc.PageCount}");
    await doc.AddAnnotationAsync(i, footer);
}

// IronPDF: Built-in placeholders
renderer.RenderingOptions.HtmlFooter = new HtmlHeaderFooter
{
    HtmlFragment = "Page {page} of {total-pages}"
};
// Nutrient.io: Manual loop and page counting
for (int i = 0; i < doc.PageCount; i++)
{
    var footer = new TextAnnotation($"Page {i + 1} of {doc.PageCount}");
    await doc.AddAnnotationAsync(i, footer);
}

// IronPDF: Built-in placeholders
renderer.RenderingOptions.HtmlFooter = new HtmlHeaderFooter
{
    HtmlFragment = "Page {page} of {total-pages}"
};
' Nutrient.io: Manual loop and page counting
For i As Integer = 0 To doc.PageCount - 1
    Dim footer = New TextAnnotation($"Page {i + 1} of {doc.PageCount}")
    Await doc.AddAnnotationAsync(i, footer)
Next

' IronPDF: Built-in placeholders
renderer.RenderingOptions.HtmlFooter = New HtmlHeaderFooter With {
    .HtmlFragment = "Page {page} of {total-pages}"
}
$vbLabelText   $csharpLabel

Troubleshooting

Issue 1: PdfProcessor Not Found

Problem: PdfProcessor class doesn't exist in IronPDF.

Solution: Use ChromePdfRenderer:

// Nutrient.io
using var processor = await PdfProcessor.CreateAsync();

// IronPDF
var renderer = new ChromePdfRenderer();
// Nutrient.io
using var processor = await PdfProcessor.CreateAsync();

// IronPDF
var renderer = new ChromePdfRenderer();
' Nutrient.io
Using processor = Await PdfProcessor.CreateAsync()

' IronPDF
Dim renderer = New ChromePdfRenderer()
$vbLabelText   $csharpLabel

Issue 2: GeneratePdfFromHtmlStringAsync Not Found

Problem: Async HTML method doesn't exist.

Solution: Use RenderHtmlAsPdf():

// Nutrient.io
var document = await processor.GeneratePdfFromHtmlStringAsync(html);

// IronPDF
var pdf = renderer.RenderHtmlAsPdf(html);
// Nutrient.io
var document = await processor.GeneratePdfFromHtmlStringAsync(html);

// IronPDF
var pdf = renderer.RenderHtmlAsPdf(html);
' Nutrient.io
Dim document = Await processor.GeneratePdfFromHtmlStringAsync(html)

' IronPDF
Dim pdf = renderer.RenderHtmlAsPdf(html)
$vbLabelText   $csharpLabel

Issue 3: TextAnnotation Not Found

Problem: Annotation classes don't exist in IronPDF.

Solution: Use HTML-based watermarks:

// Nutrient.io
var watermark = new TextAnnotation("DRAFT") { Opacity = 0.5 };
await document.AddAnnotationAsync(0, watermark);

// IronPDF
pdf.ApplyWatermark("<div style='opacity:0.5;'>DRAFT</div>");
// Nutrient.io
var watermark = new TextAnnotation("DRAFT") { Opacity = 0.5 };
await document.AddAnnotationAsync(0, watermark);

// IronPDF
pdf.ApplyWatermark("<div style='opacity:0.5;'>DRAFT</div>");
Imports System.Threading.Tasks

' Nutrient.io
Dim watermark As New TextAnnotation("DRAFT") With {.Opacity = 0.5}
Await document.AddAnnotationAsync(0, watermark)

' IronPDF
pdf.ApplyWatermark("<div style='opacity:0.5;'>DRAFT</div>")
$vbLabelText   $csharpLabel

Issue 4: MergeAsync Not Found

Problem: Async merge method doesn't exist.

Solution: Use static PdfDocument.Merge():

// Nutrient.io
var mergedDocument = await processor.MergeAsync(documentList);

// IronPDF
var merged = PdfDocument.Merge(pdf1, pdf2);
// Nutrient.io
var mergedDocument = await processor.MergeAsync(documentList);

// IronPDF
var merged = PdfDocument.Merge(pdf1, pdf2);
Imports System.Threading.Tasks

' Nutrient.io
Dim mergedDocument = Await processor.MergeAsync(documentList)

' IronPDF
Dim merged = PdfDocument.Merge(pdf1, pdf2)
$vbLabelText   $csharpLabel

Migration Checklist

Pre-Migration

  • Inventory all PSPDFKit/Nutrient usages in codebase
  • Document async patterns that may need adjustment
  • List all configuration objects and their properties
  • Identify annotation-based features (watermarks, headers)
  • Review form handling requirements
  • Obtain IronPDF license key

Package Changes

  • Remove PSPDFKit.NET NuGet package
  • Remove Nutrient NuGet package
  • Install IronPdf NuGet package: dotnet add package IronPdf
  • Update namespace imports

Code Changes

  • Add license key configuration at startup
  • Replace PdfProcessor.CreateAsync() with new ChromePdfRenderer()
  • Replace processor.GeneratePdfFromHtmlStringAsync() with renderer.RenderHtmlAsPdf()
  • Replace processor.MergeAsync() with PdfDocument.Merge()
  • Convert TextAnnotation watermarks to HTML watermarks
  • Replace config objects with RenderingOptions properties
  • Update header/footer to use HtmlHeaderFooter with placeholders
  • Remove unnecessary async/await patterns

Post-Migration

  • Remove async/await where no longer needed
  • Run regression tests comparing PDF output
  • Verify headers/footers with page numbers
  • Test watermark rendering
  • Update CI/CD pipeline

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...

Read More