IRONSOFTWAREHOME
ビデオ

Render WebGL Content in PDFs with IronPDF

Curtis Chau
Curtis Chau
Updated: 2026年7月19日

PDFFilePrintからIronPDFへの移行は、印刷専用のPdfiumラッパーから作成、操作、印刷を単一の統一されたAPIで扱う包括的なPDFライブラリへ。NET PDFワークフローを移動します。 このガイドでは、PDF生成および操作機能を追加しながら、PrinterSettingsに置き換えるためのステップバイステップのマイグレーションパスを提供します。

なぜPDFFilePrintからIronPDFに移行するのか

PDFFilePrintを理解する

PDFFilePrintは小さなオープンソースNuGetパッケージ(MIT、Christian Andersenによる)で、PdfiumViewerとGoogleのPdfiumをラップして、既存のPDFまたはXPSファイルをプリンタードライバーに静かに送信します。 最新リリースは2020年2月10日にリリースされた1.0.3で、Windows上の**.NET Framework 4.6.1+**をターゲットとしています。 特定の印刷タスクには便利ですが、その機能は文書処理の一側面に限定されています。公開されたインターフェイスは本質的にapp.config / Properties.Settings.Defaultキーによって駆動されています。

重要なPDFファイル印刷の制限事項

  1. 印刷専用: PDFを作成、編集、マージ、または変更することはできません。FilePrintクラスは既存のPDF/XPSファイルを消費し、それをスプーラーに渡します。

  2. 設定ファイル駆動のAPI: プリンタ名、用紙サイズ、コピー数、および"ファイルに印刷"モードはapp.config (Properties.Settings.Default)から読み取られ、強い型のオプションオブジェクトとして渡されません。

  3. Windows + .NET Frameworkのみ: net461にターゲットを絞り、PdfiumViewerのWin32ネイティブバイナリを取り込みます。 .NET Core / .NET 6+ TFMやLinux/macOSサポートはありません。

  4. 限られた印刷調整: 両面印刷、ページ範囲、向き、カラーはプリンタードライバーのデフォルトに依存しており、それらに対する一級APIはありません。

  5. 事実上メンテナンスされていない: 1.0.3(2020年2月)以来リリースがなく、NuGetリスティングからリンクされた公開ソースリポジトリはありません。

  6. 単純な例外表面: PdfiumViewer / スプーラーから失敗が一般的な例外としてバブルアップし、型付けされたエラーヒエラルキーではありません。

  7. PDF生成なし: PDF作成ができない — HTML、URL、または画像から印刷ページに移行するには、PDFFilePrintを別のレンダラーとペアリングする必要があります。

PDFFilePrintとIronPDFの比較

アスペクトPDFファイル印刷IronPDF
主な焦点PDF/XPS印刷包括的なPDF API
タイプPdfium印刷ラッパーネイティブ.NETライブラリ + Chromiumレンダラー
統合new FilePrint(...).Print() + app.config直接PdfDocument API
PDF印刷はいはい
PDFの作成なしはい(HTML、URL、画像)
PDF操作なしはい(結合、分割、編集)
クロスプラットフォームWindows専用(net461)Windows、Linux、macOS、Docker
エラー処理PdfiumViewerからの単純な例外型付きIronPdfException
インテリセンス最小(小さな表面)フル
NuGetパッケージPDFFilePrint 1.0.3 (MIT, Feb 2020)IronPdf
最後のリリース1.0.3(2020年2月)アクティブなリリース

モダンな.NET(Framework 4.6.2+および.NET 6/7/8/9/10)をターゲットとするチームにとって、IronPDFはクロスプラットフォームのサポートと活発な開発を提供し、PDFFilePrintのアーキテクチャ上の限界に対処する包括的な基盤を提供します。


始める前に

前提条件

  1. .NET環境: .NET Framework 4.6.2+ または .NET 6/7/8/9/10
  2. NuGetアクセス: NuGetパッケージをインストールする機能
  3. IronPDFライセンス: IronPDFからライセンスキーを取得します。

NuGetパッケージの変更

# RemovePDFファイル印刷package
dotnet remove package PDFFilePrint

# Install IronPDF
dotnet add package IronPdf
SHELL

ライセンス構成

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

PDFFilePrintの使用法を特定する

# FindPDFファイル印刷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

完全な API リファレンス

名前空間の変更

// PDFFilePrint
using PDFFilePrint;

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

コア クラス マッピング

PDFファイル印刷IronPDF
new FilePrint(path, null) (load)PdfDocument.FromFile(path)
new ChromePdfRenderer() (対応なし ― PDFFilePrintはPDFを作成できません)new ChromePdfRenderer()
FilePrintPdfDocument

PDF生成メソッドのマッピング

PDFファイル印刷IronPDF
(利用できません)renderer.RenderHtmlAsPdf(html)
(利用できません)renderer.RenderUrlAsPdf(url)
(利用不可 — 印刷のみ)pdf.SaveAs(path)

PDFの読み込みと印刷マッピング

PDFファイル印刷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()

印刷設定のマッピング (app.config から PrinterSettings)

PDFFilePrint設定 (Settings.Default)IronPDF(System.Drawing.Printing.PrinterSettings)
PrinterNamePrinterName
CopiesCopies
(no silent flag — 常にサイレント)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

PDFFilePrintにはない新しい機能

IronPDFの特徴翻訳内容
PdfDocument.Merge()複数のPDFを結合
pdf.CopyPages()特定のページを抜粋
pdf.ApplyWatermark()透かしの追加
pdf.SecuritySettingsパスワード保護
pdf.ExtractAllText()テキストコンテンツの抽出
pdf.RasterizeToImageFiles()画像に変換
pdf.SignWithDigitalSignature()デジタル署名

コード移行の例

例1: HTMLからPDFへの変換

ビフォア(PDFFilePrint):

// NuGet: Install-Package PDFFilePrint
//PDFファイル印刷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().");
    }
}
C#

翻訳後(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");
    }
}

ここでの基本的な違いはスコープです。 PDFFilePrintにはHTMLからPDFへのパスがありません―その公開インターフェースは既存のPDFをプリンターに渡すFilePrintクラスです。 IronPDFはレンダリングをドキュメントオブジェクトから分離します: SaveAs()で保存します。

この分離により、変換前にレンダリングオプションをレンダラーで設定し、保存前に返されたPdfDocumentを操作(透かし追加、他PDFとのマージ、セキュリティ追加)することも可能です。 その他のレンダリングオプションについては、HTML to PDF documentationを参照してください。

例2: URLからPDFへの変換

ビフォア(PDFFilePrint):

// NuGet: Install-Package PDFFilePrint
//PDFファイル印刷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().");
    }
}
C#

翻訳後(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にはURL取得機能がありません。 IronPDFは、CSS、JavaScript、およびWeb機能のレンダリング用にChromiumエンジンを活用するRenderUrlAsPdf()メソッドを使用します。 URLからPDFへの変換の詳細については、こちらをご覧ください。

例3: PDFの印刷

ビフォア(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");
    }
}

翻訳後(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");
    }
}

この例は、2つのライブラリのアーキテクチャの違いを示しています。 PDFFilePrintはapp.config (Properties.Settings.Default)から読み取ります。 IronPDFは静的ファクトリSystem.Drawing.Printing.PrinterSettingsを渡して明示的に制御することもできます。

主な移行の変更点

  • new FilePrint(path, null)PdfDocument.FromFile(path)
  • Properties.Settings.Default.PrinterName = "..." + Print()pdf.GetPrintDocument(new PrinterSettings { PrinterName = "..." }).Print()
  • デフォルトプリンタ: PrinterNameを空にする → pdf.Print()を呼び出す

高度な印刷設定には、IronPDFはSystem.Drawing.Printing.PrinterSettingsを使用します。 追加オプションについては、印刷ドキュメントをご覧ください。


高度な印刷設定の移行

PDFFilePrintのPrinterSettingsへの移行方法は次のとおりです:

//PDFファイル印刷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();
//
//IronPDFequivalent — 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();
C#

サイレントモード

//PDFファイル印刷is always silent — there is no print-dialog code path.
//IronPDFis silent by default. Pass true explicitly to show the print dialog:
pdf.Print();      // silent
pdf.Print(true);  // shows print dialog
C#

移行後の新機能

IronPDFに移行すると、PDFFilePrintでは提供できない機能が得られます:

ワンステップで作成と印刷ができます

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マージ

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

ウォーターマーク

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

パスワード保護

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

テキスト抽出

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

重要な移行に関する注意事項

クラス パターンの変更

PDFFilePrintは、FilePrintクラスを使用します。 IronPDFは、レンダリング、ドキュメント操作、および印刷を別々のタイプに分けています。

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

//IronPDFcan also create PDFs from HTML —PDFファイル印刷cannot
var renderer = new ChromePdfRenderer();
var newPdf = renderer.RenderHtmlAsPdf(html);
newPdf.SaveAs(path);
C#

メソッド / 設定の命名変更

//PDFファイル印刷→ 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 = ...
//PDFファイル印刷has no native HTML/URL/merge/watermark methods — these are IronPDF-only.
C#

例外処理

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

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

どちらの場合も外部実行可能ファイルはありません

両方のライブラリはNuGetパッケージとして提供されます。 バンドルまたは削除するIronPdfパッケージを介して自己完結型です。


機能比較の概要

フィーチャーPDFファイル印刷IronPDF
基本的な印刷
サイレント印刷✓ (常に無音)
複数部数✓ (via app.config)
ページ範囲ドライバーのデフォルトのみ
デュプレックスドライバーのデフォルトのみ
HTMLから作成
URLから作成
PDFのマージ
PDFの分割
透かしの追加
テキスト抽出
パスワード保護
デジタル署名
クロスプラットフォーム✗ (Windows / net461)
ネイティブ.NET API✓ (small surface)

移行チェックリスト

移行前

  • 全てのnew FilePrint(...)の呼び出しサイトを見つける
  • 現在のapp.config設定を文書化する (PrinterName, PaperName, Copies, PrintToFile, DefaultPrintToDirectory)
  • 環境間で使用されているプリンタ名を識別する
  • 実行時にProperties.Settings.Defaultを変更するコードがあれば記録する 新機能の機会を特定します(HTML/URLレンダリング、マージ、透かし、セキュリティ)
  • IronPDFライセンスキーを取得する

パッケージの変更

  • PDFFilePrintNuGetパッケージを削除する: dotnet remove package PDFFilePrint
  • IronPdfNuGetパッケージをインストールする: dotnet add package IronPdf
  • using IronPdf;に置き換える (必要に応じてusing System.Drawing.Printing;を追加)

コードの変更

  • 起動時にライセンスキー設定を追加する
  • new FilePrint(path, null)PdfDocument.FromFile(path) に置き換えます
  • プリンタ/コピー/用紙設定をSystem.Drawing.Printing.PrinterSettingsに移動
  • サイレントデフォルトプリンタ出力にはpdf.GetPrintDocument(settings).Print()を使用
  • 一般的な例外を以前にキャッチしたところでtry / catch IronPdfExceptionでラップする
  • PDFFilePrintが提供しなかったHTML/URL/マージ/透かし機能にはPdfDocument操作APIを使用する

移行後

  • app.configからPDFFilePrint固有のキーを削除する
  • すべての対象プリンタでテスト印刷
  • クロスプラットフォームのテストを行う場合、Linux印刷にはCUPSが必要です。 新しい機能(透かし、セキュリティ、結合)を必要に応じて追加します
  • ドキュメントの更新

ご注意: PDFFilePrintはその所有者の登録商標です。 このサイトはPDFFilePrintとは提携、承認、またはスポンサーを受けていません。 すべての製品名、ロゴ、およびブランドは各所有者の所有物です。 比較は情報提供のみを目的としており、執筆時点で公開されている情報を反映しています。
Curtis Chau
テクニカルライター

Curtis Chauは、カールトン大学でコンピュータサイエンスの学士号を取得し、Node.js、TypeScript、JavaScript、およびReactに精通したフロントエンド開発を専門としています。直感的で美しいユーザーインターフェースを作成することに情熱を持ち、Curtisは現代のフレームワークを用いた開発や、構造の良い視覚的に魅力的なマニュアルの作成を楽しんでいます。

...
詳しく読む

関連する記事

Key in blue circle

無料の30日間トライアルキーをすぐに入手してください。

Your trial license will be sent to your email address

制限なし。100% ロック解除済み。クレジットカード不要。

bullet_checkedクレジットカードやアカウントの作成は不要です。制限なし。100% ロック解除済み。クレジットカード不要。
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
無料のライブデモを予約する
Booking Badge

世界中の数百万人のエンジニアから信頼されています。

ライセンスはより安く
義務のない相談を受ける
下記のフォームを記入するか、sales@ironsoftware.comにメールしてください。
あなたの詳細は常に守秘されます。
世界中の数百万人のエンジニアから信頼されています。
ライセンスはより安く
あなたの無料30日間の試用キーをすぐに入手。
クレジットカードやアカウントの作成は不要です。