IRONSOFTWAREHOME
MIGRATION GUIDES

How to Migrate from PDFFilePrint to IronPDF in C#

Curtis Chau
Curtis Chau
Updated: August 1, 2026

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

AspectPDFFilePrintIronPDF
Primary FocusPDF/XPS PrintingComprehensive PDF API
TypePdfium print wrapperNative .NET library + Chromium renderer
Integrationnew FilePrint(...).Print() + app.configDirect PdfDocument API
PDF PrintingYesYes
PDF CreationNoYes (HTML, URL, images)
PDF ManipulationNoYes (merge, split, edit)
Cross-PlatformWindows-only (net461)Windows, Linux, macOS, Docker
Error HandlingPlain exceptions from PdfiumViewerTyped IronPdfException
IntelliSenseMinimal (small surface)Full
NuGet PackagePDFFilePrint 1.0.3 (MIT, Feb 2020)IronPdf
Last release1.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
SHELL

License Configuration

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

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" .
SHELL

Complete API Reference

Namespace Changes

// PDFFilePrint
using PDFFilePrint;

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

Core Class Mappings

PDFFilePrintIronPDF
new FilePrint(path, null) (load)PdfDocument.FromFile(path)
new ChromePdfRenderer() (no equivalent - PDFFilePrint cannot create PDFs)new ChromePdfRenderer()
FilePrintPdfDocument

PDF Generation Method Mappings

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

PDF Loading and Printing Mappings

PDFFilePrintIronPDF
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()
PDFFilePrint Setting (Settings.Default)IronPDF (System.Drawing.Printing.PrinterSettings)
PrinterNamePrinterName
CopiesCopies
(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
PaperNameDefaultPageSettings.PaperSize
PrintToFile + DefaultPrintToDirectoryPrintToFile + PrintFileName

New Capabilities Not in PDFFilePrint

IronPDF FeatureDescription
PdfDocument.Merge()Combine multiple PDFs
pdf.CopyPages()Extract specific pages
pdf.ApplyWatermark()Add watermarks
pdf.SecuritySettingsPassword 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().");
    }
}

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");
    }
}

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().");
    }
}

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");
    }
}

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");
    }
}

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");
    }
}

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();

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

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();

PDF Merging

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

Watermarks

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

Password Protection

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

Text Extraction

var pdf = PdfDocument.FromFile("document.pdf");
string text = pdf.ExtractAllText();

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);

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 = 3new PrinterSettings { Copies = 3 }
Properties.Settings.Default.PaperName = "A4"    → settings.DefaultPageSettings.PaperSize = ...
// PDFFilePrint has no native HTML/URL/merge/watermark methods — these are IronPDF-only.

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
}

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

FeaturePDFFilePrintIronPDF
Basic printing
Silent printing✓ (always silent)
Multiple copies✓ (via app.config)
Page rangeDriver default only
DuplexDriver 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 note: PDFFilePrint 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

Related Articles

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required