Skip to footer content
MIGRATION GUIDES

How to Migrate from PDFFilePrint to IronPDF in C#

Migrating from PDFFilePrint to IronPDF moves your .NET PDF workflow from a print-only Pdfium wrapper to a comprehensive PDF library that handles creation, manipulation, and printing in a single unified API. This guide provides a step-by-step migration path that replaces app.config-driven print settings with strongly-typed PrinterSettings, while adding PDF generation and manipulation capabilities that PDFFilePrint does not provide.

Why Migrate from PDFFilePrint to IronPDF

Understanding PDFFilePrint

PDFFilePrint is a small open-source NuGet package (MIT, by Christian Andersen) that wraps PdfiumViewer and Google's Pdfium to silently send an existing PDF or XPS file to a printer driver. The latest release is 1.0.3, published 2020-02-10, targeting .NET Framework 4.6.1+ on Windows. While useful for targeted printing tasks, its functionality is limited to one aspect of document handling — the public surface is essentially new FilePrint(path, null).Print() driven by app.config / Properties.Settings.Default keys.

Critical PDFFilePrint Limitations

  1. Printing-Only: Cannot create, edit, merge, or modify PDFs — the FilePrint class consumes existing PDF/XPS files and hands them to the spooler.

  2. Config-File-Driven API: Printer name, paper size, copy count, and "print to file" mode are read from app.config (Properties.Settings.Default), not passed as a strongly-typed options object.

  3. Windows + .NET Framework Only: Targets net461 and pulls in PdfiumViewer's Win32 native binaries. No .NET Core / .NET 6+ TFM, and no Linux/macOS support.

  4. Limited Print Knobs: Duplex, page range, orientation, and color rely on the printer driver default — there is no first-class API for them.

  5. Effectively Unmaintained: No release since 1.0.3 (February 2020) and no public source repository linked from the NuGet listing.

  6. Plain Exception Surface: Failures bubble up from PdfiumViewer / the spooler as generic exceptions rather than a typed error hierarchy.

  7. No PDF Generation: Cannot create PDFs — to go from HTML, a URL, or images to a printed page, you must pair PDFFilePrint with a separate renderer.

PDFFilePrint vs IronPDF Comparison

Aspect PDFFilePrint IronPDF
Primary Focus PDF/XPS Printing Comprehensive PDF API
Type Pdfium print wrapper Native .NET library + Chromium renderer
Integration new FilePrint(...).Print() + app.config Direct PdfDocument API
PDF Printing Yes Yes
PDF Creation No Yes (HTML, URL, images)
PDF Manipulation No Yes (merge, split, edit)
Cross-Platform Windows-only (net461) Windows, Linux, macOS, Docker
Error Handling Plain exceptions from PdfiumViewer Typed IronPdfException
IntelliSense Minimal (small surface) Full
NuGet Package PDFFilePrint 1.0.3 (MIT, Feb 2020) IronPdf
Last release 1.0.3 (Feb 2020) Active releases

For teams targeting modern .NET (Framework 4.6.2+ and .NET 6/7/8/9/10), IronPDF provides a comprehensive foundation with cross-platform support and active development, addressing PDFFilePrint's architectural limitations.


Before You Start

Prerequisites

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

NuGet Package Changes

# Remove PDFFilePrint package
dotnet remove package PDFFilePrint

# Install IronPDF
dotnet add package IronPdf
# Remove PDFFilePrint package
dotnet remove package PDFFilePrint

# 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 PDFFilePrint Usage

# Find PDFFilePrint API usages
grep -r "using PDFFilePrint\|new FilePrint" --include="*.cs" .

# Find related app.config keys
grep -r "PrinterName\|PaperName\|PrintToFile\|DefaultPrintToDirectory" \
    --include="*.config" --include="*.settings" .
# Find PDFFilePrint API usages
grep -r "using PDFFilePrint\|new FilePrint" --include="*.cs" .

# Find related app.config keys
grep -r "PrinterName\|PaperName\|PrintToFile\|DefaultPrintToDirectory" \
    --include="*.config" --include="*.settings" .
SHELL

Complete API Reference

Namespace Changes

// PDFFilePrint
using PDFFilePrint;

// IronPDF — printing flows through System.Drawing.Printing
using IronPdf;
using System.Drawing.Printing;
// PDFFilePrint
using PDFFilePrint;

// IronPDF — printing flows through System.Drawing.Printing
using IronPdf;
using System.Drawing.Printing;
Imports PDFFilePrint
Imports IronPdf
Imports System.Drawing.Printing
$vbLabelText   $csharpLabel

Core Class Mappings

PDFFilePrint IronPDF
new FilePrint(path, null) (load) PdfDocument.FromFile(path)
new ChromePdfRenderer() (no equivalent — PDFFilePrint cannot create PDFs) new ChromePdfRenderer()
FilePrint PdfDocument

PDF Generation Method Mappings

PDFFilePrint IronPDF
(not available) renderer.RenderHtmlAsPdf(html)
(not available) renderer.RenderUrlAsPdf(url)
(not available — print-only) pdf.SaveAs(path)

PDF Loading and Printing Mappings

PDFFilePrint IronPDF
new FilePrint(path, null) PdfDocument.FromFile(path)
fileprint.Print() (silent, always) pdf.Print() (silent) / pdf.Print(true) (dialog)
Properties.Settings.Default.PrinterName = "..." then Print() pdf.GetPrintDocument(new PrinterSettings { PrinterName = "..." }).Print()

Print Settings Mapping (app.config to PrinterSettings)

PDFFilePrint Setting (Settings.Default) IronPDF (System.Drawing.Printing.PrinterSettings)
PrinterName PrinterName
Copies Copies
(no silent flag — always silent) pdf.Print() (silent) / pdf.Print(true) (show dialog)
(driver default) FromPage, ToPage, PrintRange
(driver default) DefaultPageSettings.Landscape
(driver default) Duplex
(driver default) Collate
PaperName DefaultPageSettings.PaperSize
PrintToFile + DefaultPrintToDirectory PrintToFile + PrintFileName

New Capabilities Not in PDFFilePrint

IronPDF Feature Description
PdfDocument.Merge() Combine multiple PDFs
pdf.CopyPages() Extract specific pages
pdf.ApplyWatermark() Add watermarks
pdf.SecuritySettings Password protection
pdf.ExtractAllText() Extract text content
pdf.RasterizeToImageFiles() Convert to images
pdf.SignWithDigitalSignature() Digital signatures

Code Migration Examples

Example 1: HTML to PDF Conversion

Before (PDFFilePrint):

// NuGet: Install-Package PDFFilePrint
// PDFFilePrint is a print-only wrapper around PdfiumViewer / Pdfium.
// Its FilePrint class only consumes existing PDF/XPS files — there is
// no CreateFromHtml or document-creation method.
using System;

class Program
{
    static void Main()
    {
        throw new NotSupportedException(
            "PDFFilePrint cannot convert HTML to PDF. Render the HTML to a PDF " +
            "with another library, then pass the path to new FilePrint(path, null).Print().");
    }
}
// NuGet: Install-Package PDFFilePrint
// PDFFilePrint is a print-only wrapper around PdfiumViewer / Pdfium.
// Its FilePrint class only consumes existing PDF/XPS files — there is
// no CreateFromHtml or document-creation method.
using System;

class Program
{
    static void Main()
    {
        throw new NotSupportedException(
            "PDFFilePrint cannot convert HTML to PDF. Render the HTML to a PDF " +
            "with another library, then pass the path to new FilePrint(path, null).Print().");
    }
}
Imports System

Class Program
    Shared Sub Main()
        Throw New NotSupportedException("PDFFilePrint cannot convert HTML to PDF. Render the HTML to a PDF " & _
                                        "with another library, then pass the path to new FilePrint(path, null).Print().")
    End Sub
End Class
$vbLabelText   $csharpLabel

After (IronPDF):

// NuGet: Install-Package IronPdf
using IronPdf;
using System;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();
        string htmlContent = "<html><body><h1>Hello World</h1></body></html>";
        var pdf = renderer.RenderHtmlAsPdf(htmlContent);
        pdf.SaveAs("output.pdf");
    }
}
// NuGet: Install-Package IronPdf
using IronPdf;
using System;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();
        string htmlContent = "<html><body><h1>Hello World</h1></body></html>";
        var pdf = renderer.RenderHtmlAsPdf(htmlContent);
        pdf.SaveAs("output.pdf");
    }
}
Imports IronPdf
Imports System

Class Program
    Shared Sub Main()
        Dim renderer = New ChromePdfRenderer()
        Dim htmlContent As String = "<html><body><h1>Hello World</h1></body></html>"
        Dim pdf = renderer.RenderHtmlAsPdf(htmlContent)
        pdf.SaveAs("output.pdf")
    End Sub
End Class
$vbLabelText   $csharpLabel

The fundamental difference here is scope. PDFFilePrint has no HTML-to-PDF path — its public surface is a FilePrint class that hands an existing PDF to the printer. IronPDF separates rendering from the document object: ChromePdfRenderer handles the HTML-to-PDF conversion and returns a PdfDocument you then save with SaveAs().

This separation also lets you configure rendering options on the renderer before conversion, and manipulate the returned PdfDocument (add watermarks, merge with other PDFs, add security) before saving. See the HTML to PDF documentation for additional rendering options.

Example 2: URL to PDF Conversion

Before (PDFFilePrint):

// NuGet: Install-Package PDFFilePrint
// PDFFilePrint cannot fetch a URL or render HTML — it only sends existing
// PDF/XPS files to a printer. URL-to-PDF requires a separate renderer.
using System;

class Program
{
    static void Main()
    {
        throw new NotSupportedException(
            "PDFFilePrint cannot convert URLs to PDF. Render the URL to a PDF with " +
            "another library first, then call new FilePrint(pdfPath, null).Print().");
    }
}
// NuGet: Install-Package PDFFilePrint
// PDFFilePrint cannot fetch a URL or render HTML — it only sends existing
// PDF/XPS files to a printer. URL-to-PDF requires a separate renderer.
using System;

class Program
{
    static void Main()
    {
        throw new NotSupportedException(
            "PDFFilePrint cannot convert URLs to PDF. Render the URL to a PDF with " +
            "another library first, then call new FilePrint(pdfPath, null).Print().");
    }
}
Imports System

Class Program
    Shared Sub Main()
        Throw New NotSupportedException("PDFFilePrint cannot convert URLs to PDF. Render the URL to a PDF with " & _
                                        "another library first, then call new FilePrint(pdfPath, null).Print().")
    End Sub
End Class
$vbLabelText   $csharpLabel

After (IronPDF):

// NuGet: Install-Package IronPdf
using IronPdf;
using System;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();
        var pdf = renderer.RenderUrlAsPdf("https://www.example.com");
        pdf.SaveAs("webpage.pdf");
    }
}
// NuGet: Install-Package IronPdf
using IronPdf;
using System;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();
        var pdf = renderer.RenderUrlAsPdf("https://www.example.com");
        pdf.SaveAs("webpage.pdf");
    }
}
Imports IronPdf
Imports System

Class Program
    Shared Sub Main()
        Dim renderer = New ChromePdfRenderer()
        Dim pdf = renderer.RenderUrlAsPdf("https://www.example.com")
        pdf.SaveAs("webpage.pdf")
    End Sub
End Class
$vbLabelText   $csharpLabel

PDFFilePrint has no URL-fetching capability. IronPDF uses the dedicated RenderUrlAsPdf() method on ChromePdfRenderer, which leverages a Chromium engine for rendering of modern CSS, JavaScript, and web features. Learn more about URL to PDF conversion.

Example 3: PDF Printing

Before (PDFFilePrint):

// NuGet: Install-Package PDFFilePrint
using System;
using PDFFilePrint;

class Program
{
    static void Main()
    {
        // Optional: override the configured printer / copy count at runtime.
        Properties.Settings.Default.PrinterName = "Default Printer";

        var fileprint = new FilePrint("document.pdf", null);
        fileprint.Print();
        Console.WriteLine("PDF sent to printer");
    }
}
// NuGet: Install-Package PDFFilePrint
using System;
using PDFFilePrint;

class Program
{
    static void Main()
    {
        // Optional: override the configured printer / copy count at runtime.
        Properties.Settings.Default.PrinterName = "Default Printer";

        var fileprint = new FilePrint("document.pdf", null);
        fileprint.Print();
        Console.WriteLine("PDF sent to printer");
    }
}
Imports System
Imports PDFFilePrint

Module Program
    Sub Main()
        ' Optional: override the configured printer / copy count at runtime.
        Properties.Settings.[Default].PrinterName = "Default Printer"

        Dim fileprint = New FilePrint("document.pdf", Nothing)
        fileprint.Print()
        Console.WriteLine("PDF sent to printer")
    End Sub
End Module
$vbLabelText   $csharpLabel

After (IronPDF):

// NuGet: Install-Package IronPdf
using IronPdf;
using System;
using System.Drawing.Printing;

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

        // Silent print to the default printer
        pdf.Print();

        // Or print to a named printer with explicit PrinterSettings:
        // var settings = new PrinterSettings { PrinterName = "HP LaserJet Pro" };
        // pdf.GetPrintDocument(settings).Print();

        Console.WriteLine("PDF sent to printer");
    }
}
// NuGet: Install-Package IronPdf
using IronPdf;
using System;
using System.Drawing.Printing;

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

        // Silent print to the default printer
        pdf.Print();

        // Or print to a named printer with explicit PrinterSettings:
        // var settings = new PrinterSettings { PrinterName = "HP LaserJet Pro" };
        // pdf.GetPrintDocument(settings).Print();

        Console.WriteLine("PDF sent to printer");
    }
}
Imports IronPdf
Imports System
Imports System.Drawing.Printing

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

        ' Silent print to the default printer
        pdf.Print()

        ' Or print to a named printer with explicit PrinterSettings:
        ' Dim settings As New PrinterSettings With {.PrinterName = "HP LaserJet Pro"}
        ' pdf.GetPrintDocument(settings).Print()

        Console.WriteLine("PDF sent to printer")
    End Sub
End Module
$vbLabelText   $csharpLabel

This example shows the architectural difference between the two libraries. PDFFilePrint instantiates new FilePrint(path, null) and calls Print(), with printer name and copy count read from app.config (Properties.Settings.Default). IronPDF uses the static factory PdfDocument.FromFile() to load, then Print() which uses the default printer — or you pass a System.Drawing.Printing.PrinterSettings via GetPrintDocument(settings).Print() for explicit control.

The key migration changes:

  • new FilePrint(path, null)PdfDocument.FromFile(path)
  • Properties.Settings.Default.PrinterName = "..." + Print()pdf.GetPrintDocument(new PrinterSettings { PrinterName = "..." }).Print()
  • Default printer: leave PrinterName empty in Settings.Default → call pdf.Print()

For advanced print settings, IronPDF uses System.Drawing.Printing.PrinterSettings. See the printing documentation for additional options.


Advanced Print Settings Migration

For applications using PDFFilePrint's app.config keys, here's how to migrate to IronPDF's strongly-typed PrinterSettings:

// PDFFilePrint approach — settings live in app.config and are read via
// Properties.Settings.Default. To override at runtime you mutate Settings.Default
// before instantiating FilePrint:
//   Properties.Settings.Default.PrinterName = "HP LaserJet";
//   Properties.Settings.Default.Copies = 3;
//   new FilePrint("document.pdf", null).Print();
//
// IronPDF equivalent — pass a System.Drawing.Printing.PrinterSettings per call:
using IronPdf;
using System.Drawing.Printing;

var pdf = PdfDocument.FromFile("document.pdf");

var settings = new PrinterSettings
{
    PrinterName = "HP LaserJet",
    Copies = 3,
    FromPage = 1,
    ToPage = 5,
    PrintRange = PrintRange.SomePages
};

pdf.GetPrintDocument(settings).Print();
// PDFFilePrint approach — settings live in app.config and are read via
// Properties.Settings.Default. To override at runtime you mutate Settings.Default
// before instantiating FilePrint:
//   Properties.Settings.Default.PrinterName = "HP LaserJet";
//   Properties.Settings.Default.Copies = 3;
//   new FilePrint("document.pdf", null).Print();
//
// IronPDF equivalent — pass a System.Drawing.Printing.PrinterSettings per call:
using IronPdf;
using System.Drawing.Printing;

var pdf = PdfDocument.FromFile("document.pdf");

var settings = new PrinterSettings
{
    PrinterName = "HP LaserJet",
    Copies = 3,
    FromPage = 1,
    ToPage = 5,
    PrintRange = PrintRange.SomePages
};

pdf.GetPrintDocument(settings).Print();
Imports IronPdf
Imports System.Drawing.Printing

Dim pdf = PdfDocument.FromFile("document.pdf")

Dim settings As New PrinterSettings With {
    .PrinterName = "HP LaserJet",
    .Copies = 3,
    .FromPage = 1,
    .ToPage = 5,
    .PrintRange = PrintRange.SomePages
}

pdf.GetPrintDocument(settings).Print()
$vbLabelText   $csharpLabel

Silent Mode

// PDFFilePrint is always silent — there is no print-dialog code path.
// IronPDF is silent by default. Pass true explicitly to show the print dialog:
pdf.Print();      // silent
pdf.Print(true);  // shows print dialog
// PDFFilePrint is always silent — there is no print-dialog code path.
// IronPDF is silent by default. Pass true explicitly to show the print dialog:
pdf.Print();      // silent
pdf.Print(true);  // shows print dialog
' PDFFilePrint is always silent — there is no print-dialog code path.
' IronPDF is silent by default. Pass True explicitly to show the print dialog:
pdf.Print()      ' silent
pdf.Print(True)  ' shows print dialog
$vbLabelText   $csharpLabel

New Capabilities After Migration

After migrating to IronPDF, you gain capabilities that PDFFilePrint cannot provide:

Create and Print in One Step

using IronPdf;
using System.Drawing.Printing;

var renderer = new ChromePdfRenderer();
var pdf = renderer.RenderHtmlAsPdf("<h1>Invoice #12345</h1><p>Thank you for your order.</p>");

var settings = new PrinterSettings { PrinterName = "Office Printer" };
pdf.GetPrintDocument(settings).Print();
using IronPdf;
using System.Drawing.Printing;

var renderer = new ChromePdfRenderer();
var pdf = renderer.RenderHtmlAsPdf("<h1>Invoice #12345</h1><p>Thank you for your order.</p>");

var settings = new PrinterSettings { PrinterName = "Office Printer" };
pdf.GetPrintDocument(settings).Print();
Imports IronPdf
Imports System.Drawing.Printing

Dim renderer As New ChromePdfRenderer()
Dim pdf = renderer.RenderHtmlAsPdf("<h1>Invoice #12345</h1><p>Thank you for your order.</p>")

Dim settings As New PrinterSettings With {.PrinterName = "Office Printer"}
pdf.GetPrintDocument(settings).Print()
$vbLabelText   $csharpLabel

PDF Merging

var pdf1 = PdfDocument.FromFile("document1.pdf");
var pdf2 = PdfDocument.FromFile("document2.pdf");
var merged = PdfDocument.Merge(pdf1, pdf2);
merged.SaveAs("merged.pdf");
var pdf1 = PdfDocument.FromFile("document1.pdf");
var pdf2 = PdfDocument.FromFile("document2.pdf");
var merged = PdfDocument.Merge(pdf1, pdf2);
merged.SaveAs("merged.pdf");
Dim pdf1 = PdfDocument.FromFile("document1.pdf")
Dim pdf2 = PdfDocument.FromFile("document2.pdf")
Dim merged = PdfDocument.Merge(pdf1, pdf2)
merged.SaveAs("merged.pdf")
$vbLabelText   $csharpLabel

Watermarks

var pdf = PdfDocument.FromFile("document.pdf");
pdf.ApplyWatermark("<h1 style='color:red; opacity:0.3;'>CONFIDENTIAL</h1>");
pdf.SaveAs("watermarked.pdf");
var pdf = PdfDocument.FromFile("document.pdf");
pdf.ApplyWatermark("<h1 style='color:red; opacity:0.3;'>CONFIDENTIAL</h1>");
pdf.SaveAs("watermarked.pdf");
Dim pdf = PdfDocument.FromFile("document.pdf")
pdf.ApplyWatermark("<h1 style='color:red; opacity:0.3;'>CONFIDENTIAL</h1>")
pdf.SaveAs("watermarked.pdf")
$vbLabelText   $csharpLabel

Password Protection

var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SecuritySettings.UserPassword = "userpassword";
pdf.SecuritySettings.OwnerPassword = "ownerpassword";
pdf.SaveAs("secured.pdf");
var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SecuritySettings.UserPassword = "userpassword";
pdf.SecuritySettings.OwnerPassword = "ownerpassword";
pdf.SaveAs("secured.pdf");
Dim pdf = renderer.RenderHtmlAsPdf(html)
pdf.SecuritySettings.UserPassword = "userpassword"
pdf.SecuritySettings.OwnerPassword = "ownerpassword"
pdf.SaveAs("secured.pdf")
$vbLabelText   $csharpLabel

Text Extraction

var pdf = PdfDocument.FromFile("document.pdf");
string text = pdf.ExtractAllText();
var pdf = PdfDocument.FromFile("document.pdf");
string text = pdf.ExtractAllText();
Dim pdf = PdfDocument.FromFile("document.pdf")
Dim text As String = pdf.ExtractAllText()
$vbLabelText   $csharpLabel

Critical Migration Notes

Class Pattern Change

PDFFilePrint uses a small FilePrint class with a single Print() method, driven by app.config. IronPDF separates rendering, document manipulation, and printing into distinct types:

// PDFFilePrint: load + silent print (settings come from app.config)
Properties.Settings.Default.PrinterName = "HP LaserJet";
var fileprint = new FilePrint(path, null);
fileprint.Print();

// IronPDF: PdfDocument for load/manipulate, PrinterSettings for print options
var pdf = PdfDocument.FromFile(path);
var settings = new PrinterSettings { PrinterName = "HP LaserJet" };
pdf.GetPrintDocument(settings).Print();

// IronPDF can also create PDFs from HTML — PDFFilePrint cannot
var renderer = new ChromePdfRenderer();
var newPdf = renderer.RenderHtmlAsPdf(html);
newPdf.SaveAs(path);
// PDFFilePrint: load + silent print (settings come from app.config)
Properties.Settings.Default.PrinterName = "HP LaserJet";
var fileprint = new FilePrint(path, null);
fileprint.Print();

// IronPDF: PdfDocument for load/manipulate, PrinterSettings for print options
var pdf = PdfDocument.FromFile(path);
var settings = new PrinterSettings { PrinterName = "HP LaserJet" };
pdf.GetPrintDocument(settings).Print();

// IronPDF can also create PDFs from HTML — PDFFilePrint cannot
var renderer = new ChromePdfRenderer();
var newPdf = renderer.RenderHtmlAsPdf(html);
newPdf.SaveAs(path);
Imports System.Drawing.Printing
Imports IronPdf

' PDFFilePrint: load + silent print (settings come from app.config)
Properties.Settings.Default.PrinterName = "HP LaserJet"
Dim fileprint = New FilePrint(path, Nothing)
fileprint.Print()

' IronPDF: PdfDocument for load/manipulate, PrinterSettings for print options
Dim pdf = PdfDocument.FromFile(path)
Dim settings = New PrinterSettings With {.PrinterName = "HP LaserJet"}
pdf.GetPrintDocument(settings).Print()

' IronPDF can also create PDFs from HTML — PDFFilePrint cannot
Dim renderer = New ChromePdfRenderer()
Dim newPdf = renderer.RenderHtmlAsPdf(html)
newPdf.SaveAs(path)
$vbLabelText   $csharpLabel

Method / Setting Naming Changes

// PDFFilePrint → IronPDF
new FilePrint(path, null)                       → PdfDocument.FromFile(path)
fileprint.Print()                               → pdf.Print()  // silent default
Properties.Settings.Default.PrinterName = "X"   → new PrinterSettings { PrinterName = "X" }
Properties.Settings.Default.Copies = 3          → new PrinterSettings { Copies = 3 }
Properties.Settings.Default.PaperName = "A4"    → settings.DefaultPageSettings.PaperSize = ...
// PDFFilePrint has no native HTML/URL/merge/watermark methods — these are IronPDF-only.
// PDFFilePrint → IronPDF
new FilePrint(path, null)                       → PdfDocument.FromFile(path)
fileprint.Print()                               → pdf.Print()  // silent default
Properties.Settings.Default.PrinterName = "X"   → new PrinterSettings { PrinterName = "X" }
Properties.Settings.Default.Copies = 3          → new PrinterSettings { Copies = 3 }
Properties.Settings.Default.PaperName = "A4"    → settings.DefaultPageSettings.PaperSize = ...
// PDFFilePrint has no native HTML/URL/merge/watermark methods — these are IronPDF-only.
' PDFFilePrint → IronPDF
PdfDocument.FromFile(path) ' new FilePrint(path, null)
pdf.Print() ' fileprint.Print()  // silent default
Dim printerSettings As New PrinterSettings With {
    .PrinterName = "X",
    .Copies = 3
}
settings.DefaultPageSettings.PaperSize = ... ' Properties.Settings.Default.PaperName = "A4"
' PDFFilePrint has no native HTML/URL/merge/watermark methods — these are IronPDF-only.
$vbLabelText   $csharpLabel

Exception Handling

// PDFFilePrint: failures bubble up from PdfiumViewer as plain exceptions
try {
    new FilePrint(path, null).Print();
}
catch (Exception ex) {
    // No granular error type — log the message and inner exception.
}

// IronPDF: typed exception hierarchy
try {
    pdf.Print();
}
catch (IronPdf.Exceptions.IronPdfException ex) {
    // Granular error details
}
// PDFFilePrint: failures bubble up from PdfiumViewer as plain exceptions
try {
    new FilePrint(path, null).Print();
}
catch (Exception ex) {
    // No granular error type — log the message and inner exception.
}

// IronPDF: typed exception hierarchy
try {
    pdf.Print();
}
catch (IronPdf.Exceptions.IronPdfException ex) {
    // Granular error details
}
Imports IronPdf.Exceptions

' PDFFilePrint: failures bubble up from PdfiumViewer as plain exceptions
Try
    Dim filePrint As New FilePrint(path, Nothing)
    filePrint.Print()
Catch ex As Exception
    ' No granular error type — log the message and inner exception.
End Try

' IronPDF: typed exception hierarchy
Try
    pdf.Print()
Catch ex As IronPdfException
    ' Granular error details
End Try
$vbLabelText   $csharpLabel

No External Executable Either Way

Both libraries ship as NuGet packages. There is no PDFFilePrint.exe to bundle or remove — dotnet remove package PDFFilePrint is enough on the PDFFilePrint side. IronPDF is similarly self-contained via the IronPdf package, with native dependencies resolved at restore time.


Feature Comparison Summary

Feature PDFFilePrint IronPDF
Basic printing
Silent printing ✓ (always silent)
Multiple copies ✓ (via app.config)
Page range Driver default only
Duplex Driver default only
Create from HTML
Create from URL
Merge PDFs
Split PDFs
Add watermarks
Extract text
Password protection
Digital signatures
Cross-platform ✗ (Windows / net461)
Native .NET API ✓ (small surface)

Migration Checklist

Pre-Migration

  • Locate all using PDFFilePrint; and new FilePrint(...) call sites
  • Document current app.config settings (PrinterName, PaperName, Copies, PrintToFile, DefaultPrintToDirectory)
  • Identify printer names used across environments
  • Note any code that mutates Properties.Settings.Default at runtime
  • Identify opportunities for new features (HTML/URL rendering, merging, watermarks, security)
  • Obtain IronPDF license key

Package Changes

  • Remove PDFFilePrint NuGet package: dotnet remove package PDFFilePrint
  • Install IronPdf NuGet package: dotnet add package IronPdf
  • Replace using PDFFilePrint; with using IronPdf; (add using System.Drawing.Printing; where needed)

Code Changes

  • Add license key configuration at startup
  • Replace new FilePrint(path, null) with PdfDocument.FromFile(path)
  • Move printer/copy/paper settings out of app.config and into System.Drawing.Printing.PrinterSettings
  • Use pdf.Print() for silent default-printer output, or pdf.GetPrintDocument(settings).Print() for explicit options
  • Wrap Print() calls in try / catch IronPdfException where you previously caught generic exceptions
  • For HTML/URL/merge/watermark features (which PDFFilePrint never offered), use ChromePdfRenderer and the PdfDocument manipulation API

Post-Migration

  • Remove PDFFilePrint-specific keys from app.config
  • Test printing on all target printers
  • Test cross-platform if applicable (Linux printing requires CUPS)
  • Add new features (watermarks, security, merging) as needed
  • Update documentation

Please notePDFFilePrint is a registered trademark of its respective owner. This site is not affiliated with, endorsed by, or sponsored by PDFFilePrint. All product names, logos, and brands are property of their respective owners. Comparisons are for informational purposes only and reflect publicly available information at the time of writing.

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

Iron Support Team

We're online 24 hours, 5 days a week.
Chat
Email
Call Me