ネットワーク プリンターから PDF を印刷する

This article was translated from English: Does it need improvement?
Translated
View the article in English

ネットワークプリンタから印刷するためにIronPDFをどのように使用しますか?

IronPDFはC#で利用可能なすべての印刷オプションをサポートしています。

デフォルトのプリンタに送信:

Print メソッドを使用してPDFをデフォルトのプリンタに送信します。

IronPDF.PdfDocument.Print(System.Boolean)

// C# example of sending a PDF document to the default printer
using IronPdf;

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

// Sends the document to the default printer
pdf.Print(showPreview: false); // set `showPreview` to true to see a preview before printing
// C# example of sending a PDF document to the default printer
using IronPdf;

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

// Sends the document to the default printer
pdf.Print(showPreview: false); // set `showPreview` to true to see a preview before printing
' C# example of sending a PDF document to the default printer
Imports IronPdf

Private pdf = PdfDocument.FromFile("example.pdf")

' Sends the document to the default printer
pdf.Print(showPreview:= False) ' set `showPreview` to true to see a preview before printing
$vbLabelText   $csharpLabel

指定された名前のプリンタに送信:

プリンタを名前で指定するためにオーバーロードされたPrintメソッドを使用します。

IronPDF.PdfDocument.Print(System.String, System.Boolean)

// C# example of sending a PDF document to a specific printer by name
using IronPdf;

var pdf = PdfDocument.FromFile("example.pdf");
string printerName = "MyNetworkPrinter";

// Sends the document to the specified printer
pdf.Print(printerName, showPreview: false);
// C# example of sending a PDF document to a specific printer by name
using IronPdf;

var pdf = PdfDocument.FromFile("example.pdf");
string printerName = "MyNetworkPrinter";

// Sends the document to the specified printer
pdf.Print(printerName, showPreview: false);
' C# example of sending a PDF document to a specific printer by name
Imports IronPdf

Private pdf = PdfDocument.FromFile("example.pdf")
Private printerName As String = "MyNetworkPrinter"

' Sends the document to the specified printer
pdf.Print(printerName, showPreview:= False)
$vbLabelText   $csharpLabel

プリンタを発見する:

特定のプリンタにドキュメントを送信するには、プリンタが"発見"されていることを確認してください。

AirPrintの場合:

AirPrintを使用する場合は、次の提案を試してください。

次も試してみてください: PdfDocument.GetPrintDocument() または PdfDocument.Print オーバーロードは印刷プレビュウ・ウィンドウを表示し、AirPrintが使用可能であれば選択可能です。

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

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

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

準備はできましたか?
Nuget ダウンロード 16,685,821 | バージョン: 2025.12 リリース