フッターコンテンツにスキップ
製品比較

IronPrintとIronPDFの比較

この記事では、Iron Software が開発した 2 つの強力なライブラリ、IronPrint と IronPDF を包括的に比較します。 これらのライブラリの違いを理解することは、ソフトウェア アプリケーションに印刷機能を組み込もうとする開発者にとって不可欠です。

IronPDFの概要

IronPDF は、PDF ドキュメントの作成、操作、レンダリング用に設計された多目的ソリューションです。 HTML から PDF への変換、結合、分割、既存の PDF ファイルのレンダリングなどのタスクに優れています。 注目すべき機能としては、Windows と macOS のクロスプラットフォーム サポート、さまざまな .NET バージョンとの互換性、NuGet パッケージによる簡単な統合などがあります。 さらに、 JavaPythonNode.jsでも利用できるため、さまざまなプログラミング環境の開発者にとって最適な選択肢となります。

IronPDFの印刷機能

IronPDF の重要な特徴は、PDF ファイルをプログラムによって物理プリンターに印刷できることです。 この機能はPrintメソッドを通じて実現され、複数の PDF を迅速かつ効率的に印刷できます。 IronPDF には、プリンター名を指定したり、プリンターの解像度 (DPI) を設定したり、Microsoft のPrinterSettingsを利用したりするためのオプションが用意されており、開発者は PDF 印刷プロセスをきめ細かく制御できます。

using IronPdf;

// Example demonstrating how to use the Print method in IronPDF
var pdfDocument = new PdfDocument("example.pdf");
pdfDocument.Print("Printer_Name", new PrinterSettings());
using IronPdf;

// Example demonstrating how to use the Print method in IronPDF
var pdfDocument = new PdfDocument("example.pdf");
pdfDocument.Print("Printer_Name", new PrinterSettings());
Imports IronPdf

' Example demonstrating how to use the Print method in IronPDF
Private pdfDocument = New PdfDocument("example.pdf")
pdfDocument.Print("Printer_Name", New PrinterSettings())
$vbLabelText   $csharpLabel

IronPrintの概要

一方、IronPrint は、印刷機能専用に設計された特殊なライブラリです。 印刷関連の機能専用のクラスとメソッドのセットを備えているのが特徴です。 特に、明確で詳細な印刷設定を提供し、開発者が特定の要件を満たすように印刷プロセスのさまざまな側面をカスタマイズできるようにします。

IronPrintの印刷設定

IronPrint は、印刷設定の包括的なカスタマイズに優れています。 開発者は、用紙サイズ、方向、DPI、コピー部数、プリンター名、余白、グレースケール印刷オプションを指定できます。 さらに、ライブラリは非同期関数を提供するため、印刷操作がスレッドをブロックするのを防ぎ、全体的なパフォーマンスが向上します。

using IronPrint;

// Example demonstrating how to use print settings in IronPrint
var printSettings = new PrintSettings
{
    PrinterName = "Printer_Name",
    Dpi = 300,
    NumberOfCopies = 2,
    PaperMargins = new Margins { Top = 10, Bottom = 10, Left = 10, Right = 10 }
};
using IronPrint;

// Example demonstrating how to use print settings in IronPrint
var printSettings = new PrintSettings
{
    PrinterName = "Printer_Name",
    Dpi = 300,
    NumberOfCopies = 2,
    PaperMargins = new Margins { Top = 10, Bottom = 10, Left = 10, Right = 10 }
};
Imports IronPrint

' Example demonstrating how to use print settings in IronPrint
Private printSettings = New PrintSettings With {
	.PrinterName = "Printer_Name",
	.Dpi = 300,
	.NumberOfCopies = 2,
	.PaperMargins = New Margins With {
		.Top = 10,
		.Bottom = 10,
		.Left = 10,
		.Right = 10
	}
}
$vbLabelText   $csharpLabel

IronPrint を開発した理由

IronPDF は PDF 操作と基本的な印刷機能のための強固な基盤を提供しますが、IronPrint は強化された印刷機能とより幅広いプラットフォーム サポートを提供することで、それをさらに一歩進めています。 以下では、IronPDF と IronPrint の機能の主な違いと、IronPrint が IronPDF の機能をどのように拡張して世界規模の開発者の多様な要件に対応しているかについて説明します。

IronPrint 印刷機能

プリンタークラスによる多彩な印刷

IronPrint はPrinterクラスを導入し、画像や PDF ドキュメントなど、さまざまなファイル タイプを印刷するための包括的なメソッド セットを提供します。

印刷プレビューと非同期印刷

IronPrint には、印刷操作を容易にし、スレッドのブロックを防ぐためのShowPrintDialogなどのメソッドと非同期の同等のメソッドが含まれています。

using IronPrint;

// Example for asynchronous printing and showing print dialog
var printer = new Printer();
printer.ShowPrintDialog("example.pdf");
await printer.PrintAsync("example.pdf");
using IronPrint;

// Example for asynchronous printing and showing print dialog
var printer = new Printer();
printer.ShowPrintDialog("example.pdf");
await printer.PrintAsync("example.pdf");
Imports IronPrint

' Example for asynchronous printing and showing print dialog
Private printer = New Printer()
printer.ShowPrintDialog("example.pdf")
Await printer.PrintAsync("example.pdf")
$vbLabelText   $csharpLabel

プラットフォームサポート

幅広い OS 互換性: IronPrint は、Windows、Android、iOS、macOS など、複数のプラットフォームでの印刷をサポートします。

印刷設定

IronPrint はPrintSettingsクラスを採用しており、開発者は印刷設定をカスタマイズできます。 これらの設定は、印刷ダイアログの設定によって上書きされる場合があります。

使用可能なプリンター名を取得するには、 GetPrinterNames()を使用してプリンター名リストを取得します。

var printerNames = Printer.GetPrinterNames();
foreach (var name in printerNames)
{
    Console.WriteLine(name);
}
var printerNames = Printer.GetPrinterNames();
foreach (var name in printerNames)
{
    Console.WriteLine(name);
}
Dim printerNames = Printer.GetPrinterNames()
For Each name In printerNames
	Console.WriteLine(name)
Next name
$vbLabelText   $csharpLabel

解像度と色のオプション

開発者は、 PrintSettingsクラスのDpiGrayscaleなどのプロパティを使用して、印刷解像度 (DPI) を制御し、グレースケール印刷を選択できます。

コピー数と余白

IronPrint では、開発者はPrintSettingsクラスのNumberOfCopiesPaperMarginsなどのプロパティを通じてコピー数や用紙の余白を指定できます。

IronPDF 印刷機能

印刷ドキュメント処理

IronPDF はPdfDocumentクラス内にPrint()メソッドを提供しており、開発者は PDF をコンピューターのプリンターに直接送信して印刷することができます。

高度な印刷オプション

IronPDF は、印刷プレビュー ダイアログのオプションや高度な実際の印刷設定など、 Printメソッドのオーバーロードを提供します。

using IronPdf;

// Example demonstrating advanced print options in IronPDF
var pdfDocument = new PdfDocument("example.pdf");
pdfDocument.Print(printPreview: true, printerSettings: new PrinterSettings());
using IronPdf;

// Example demonstrating advanced print options in IronPDF
var pdfDocument = new PdfDocument("example.pdf");
pdfDocument.Print(printPreview: true, printerSettings: new PrinterSettings());
Imports IronPdf

' Example demonstrating advanced print options in IronPDF
Private pdfDocument = New PdfDocument("example.pdf")
pdfDocument.Print(printPreview:= True, printerSettings:= New PrinterSettings())
$vbLabelText   $csharpLabel

GetPrintDocument(PrinterSettings, PrintController)メソッドは、PDF をプリンターに送信する際の詳細な制御を必要とする開発者向けに用意されています。

プラットフォームサポート

Windows に限定: 印刷機能は Windows でのみサポートされることが明示的に記載されています。

解像度制御

開発者は、 Printメソッドのパラメータを使用して、PDF の水平方向と垂直方向の解像度を設定できます。

結論

IronPDF は、Windows 上での PDF の処理と印刷に特化しています。 対照的に、IronPrint はより汎用性の高いライブラリであり、サポート範囲をより幅広いプラットフォームに拡張しています。 IronPrint は、非同期印刷、専用の Printer クラス、プラットフォーム固有の考慮事項などの機能を提供するため、IronPDF の範囲を超えたさまざまなアプリケーション シナリオに適しています。

よくある質問

C# で HTML を PDF に変換するにはどうすればいいですか?

IronPDF の RenderHtmlAsPdf メソッドを使用して、HTML 文字列を PDF に変換できます。RenderHtmlFileAsPdf を使用して HTML ファイルを PDF に変換することもできます。

どのプラットフォームがPDFのレンダリングと印刷にサポートされていますか?

IronPDFはWindowsとmacOSプラットフォームをサポートし、Java、Python、Node.jsとも互換性があり、さまざまな環境の開発者に多用途ソリューションを提供します。

PDFライブラリを使用してプリンター設定をカスタマイズできますか?

はい、IronPDFはPrintメソッドを介してプリンター名や解像度などのプリンター設定をカスタマイズでき、PDFドキュメントの印刷に柔軟性を提供します。

非同期印刷はどのようにパフォーマンスを向上させますか?

IronPrintで利用可能な非同期印刷は、印刷操作がスレッドをブロックするのを防ぎ、アプリケーションのパフォーマンスと応答性を向上させます。

専門ライブラリでどのような高度な印刷機能が利用できますか?

IronPrintは、カスタマイズ可能な印刷設定(例:用紙サイズ、向き、DPI)、非同期印刷、印刷プレビュー機能を含む高度な機能を提供します。

専門ライブラリにクロスプラットフォーム印刷のサポートはありますか?

はい、IronPrintはクロスプラットフォームサポートを提供し、Windows、Android、iOS、macOSでの印刷機能を可能にし、開発者にとって多用途な選択肢となります。

特化した印刷ライブラリを使用してどの種類のドキュメントを印刷できますか?

IronPrintはその包括的なPrinterクラスを使用して、画像やPDFドキュメントを含むさまざまなドキュメントタイプを印刷することができます。

ソフトウェアアプリケーションに高度な印刷設定を実装する方法は?

You can utilize IronPrint's PrintSettings class to customize various print options, such as printer name, DPI, number of copies, and paper margins.

多用途のPDFライブラリの主要な焦点は何ですか?

IronPDFは主にPDFドキュメントの作成、操作、レンダリングに焦点を当て、基本的な印刷タスクの追加機能を提供しています。

ドキュメントを印刷する前に印刷プレビューを実行する方法は?

IronPrintは印刷プレビューフィーチャーを提供し、開発者が印刷コマンドを実行する前に印刷設定を確認および調整できるため、正確な出力を確保します。

カーティス・チャウ
テクニカルライター

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

開発以外にも、CurtisはIoT(Internet of Things)への強い関心を持ち、ハードウェアとソフトウェアの統合方法を模索しています。余暇には、ゲームをしたりDiscordボットを作成したりして、技術に対する愛情と創造性を組み合わせています。