C# | IronPDF でテンプレートから PDF を生成する方法
RawPrintからIronPDFへの移行は、置き換えというよりは再調整です。RawPrintとIronPDFは異なる問題を解決し、多くのチームにとっての正直なフレーミングは、置き換えではなく"補完"です。このガイドは、IronPDFが本当にRawPrintパイプライン(WindowsでのPDFを作成してからプッシュするワークフロー)を取り込むケースを示し、ESC/POS、ZPL、EPL、生のPCLを維持すべきケースを示します。
なぜRawPrintからIronPDFへ移行するのか
RawPrintを理解する
RawPrint は NuGet パッケージ RawPrint (frogmorecs/RawPrint、v0.5.0、2019年9月に最後にリリースされ、現在は nuget.org で非公開/レガシー)。 これは winspool.Drv の上に薄い P/Invoke ラッパーを置いており、バイトストリームをそのままRAWデータ型でWindowsの印刷スプーラーに送信します。 公開APIは小さく、Printer クラスが IPrinter を RawPrint 名前空間で実装し、PrintRawFile と PrintRawStream のオーバーロードを公開しています。 基礎となる Win32 呼び出し (ClosePrinter) はそのインターフェースの背後に隠されています。パッケージを使用するときに自分で記述する必要はありません。
そのため、RawPrintは、ESC/POSレシートプリンター、ZPL/EPLゼブララベルプリンター、およびプリンターのファームウェアが期待するバイトをすでに生成しているレガシーPCL/PostScriptジョブに適しています。 Windows特有の環境をターゲットとし、プリンターとの直接通信を必要とする開発者に対し、RawPrintはドライバーやグラフィカル・インターフェースのような中間層をバイパスする効率的な経路を提供します。
しかし、RawPrintはPDFライブラリーではありません—データをプリンターに送るだけです。 現在他のライブラリーでPDFを構築し、それをRawPrintに渡している場合、その全体のパイプラインは通常WindowsでIronPDFに統合されることができます。
核心的な問題: PDF が作成できない
RawPrintには、最新のドキュメントワークフローに適さない顕著な制限があります:
- PDF 作成機能なし:RawPrintはデータ転送のみに重点を置いており、PDF の作成、レンダリング、または操作の機能がありません。
2.非常に低レベル:生のバイトを直接処理するため、開発者はプリンターのコマンド言語を深く理解している必要があり、単純なドキュメント印刷タスクにはあまり適していません。
3.プラットフォーム固有:ウィンドウズ印刷スプーラーに依存するため、クロスプラットフォームの適用性が制限されます。
4.ドキュメント処理なし:レンダリング機能のないバイト転送のみ。
5.制限された制御:印刷ジョブの構成オプションは最小限です。
RawPrintとIronPDFの比較
| フィーチャー | RawPrint | IronPDF |
|---|---|---|
| 機能について | 生の印刷データを直接プリンタに送信 | 包括的なPDFの作成と操作 |
| ユースケース | ラベルなどの特殊印刷 | 一般的な文書管理と作成 |
| プラットフォーム依存性について | Windows固有 | クロスプラットフォーム |
| 複雑さ | 低レベル、プリンターコマンドの知識が必要 | ハイレベルでユーザーフレンドリーなAPI |
| PDFの作成。 | なし | はい |
| HTMLからPDFを作成する。 | なし | はい |
| URLからPDFを作成する。 | なし | はい |
| PDFを編集/修正する。 | なし | はい |
| PDFのマージ/スプリット | なし | はい |
| 既存のPDFを印刷する。 | はい(生バイト) | はい(高レベルAPI) |
| プリントコントロール | 基本 | フルオプション |
| 理想的な対象 | プリンタへの直接アクセスのニーズ | ウェブアプリおよびデスクトップアプリにおけるPDF関連タスク |
| 柔軟性 | 生バイト処理のため制限あり | 多機能で広範囲 |
RawPrintとは対照的に、IronPDFはPDFを包括的に扱うための堅牢で多機能なAPIを提供します。 .NET環境で定評のあるIronPDFは、開発者がプラットフォームを超えてPDFを簡単に作成、編集、変換できるようにします。
現代 for .NETをターゲットとするチームには、IronPDFはRawPrintが設計上提供しないクロスプラットフォーム互換性を提供します。
始める前に
前提条件
- .NET環境: .NET Framework 4.6.2+ または.NET Core 3.1+ / .NET 5/6/7/8/9+
- NuGetアクセス: NuGetパッケージをインストールする機能
- IronPDFライセンス: IronPDFからライセンスキーを取得します。
NuGetパッケージの変更
# Remove RawPrint
dotnet remove package RawPrint
# Install IronPDF
dotnet add package IronPdf
# Remove RawPrint
dotnet remove package RawPrint
# Install IronPDF
dotnet add package IronPdf
ライセンス構成
// Add at application startup
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
// Add at application startup
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
' Add at application startup
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY"
RawPrintの使い方を検索する
# Identify allRawPrintusage
grep -r "using RawPrint" --include="*.cs" .
grep -r "PrintRawFile\|PrintRawStream" --include="*.cs" .
# Identify allRawPrintusage
grep -r "using RawPrint" --include="*.cs" .
grep -r "PrintRawFile\|PrintRawStream" --include="*.cs" .
注意: winspool.Drv の周りに手作りの P/Invoke ラッパーを使用している場合、クラス名 RawPrinterHelper を使用してRawPrint使用に見た目が類似することがありますが、それらはパッケージではありません。Win32スプーラーを直接呼び出しています。 パッケージ自体は、PrintRawFile および PrintRawStream で IPrinter のみを公開しています。
完全な API リファレンス
名前空間の変更
// Before: RawPrint
using RawPrint;
// After: IronPDF
using IronPdf;
// Before: RawPrint
using RawPrint;
// After: IronPDF
using IronPdf;
Imports IronPdf
コア API マッピング
| RawPrint (実際の公開API) | IronPDF | ノート |
|---|---|---|
new Printer() / IPrinter |
new ChromePdfRenderer() / PdfDocument |
RawPrintはバイトを送信します; IronPDFはPDFを生成します。 |
printer.PrintRawFile(name, path, paused) |
PdfDocument.FromFile(path).Print() |
IronPDFはOSプリントシステムに再描画します; RAWではありません |
printer.PrintRawStream(name, stream, doc, paused) |
new PdfDocument(stream).Print() |
同じ注意事項 |
printer.OnJobCreated イベント |
n/a | 代わりにIronPDFの印刷オプションを使用してください。 |
| n/a | ChromePdfRenderer.RenderHtmlAsPdf() |
PDF作成 |
| n/a | PdfDocument.Merge() |
PDFのマージ |
| n/a | pdf.ApplyWatermark() |
透かしの追加 |
IronPDFは、文書をOSに渡すことにより印刷します。生のバイトをスプーラーにストリーミングするわけではありません。 プリンターがRAWデータ型を必要とする場合(ESC/POS、ZPL、特定のPCLワークフロー)、それはRawPrintの役割であり、IronPDFでは完全に代替できません。
コード移行の例
例1: HTMLからPDFへの変換
翻訳前(RawPrint):
// NuGet: Install-Package RawPrint
using System;
using System.IO;
using System.Text;
using RawPrint;
class Program
{
static void Main()
{
//RawPrintcannot convert HTML to PDF. Sending raw HTML bytes to a printer just
// prints the HTML source as text — the markup is not rendered.
string html = "<html><body><h1>Hello World</h1></body></html>";
byte[] data = Encoding.ASCII.GetBytes(html);
IPrinter printer = new Printer();
using (var stream = new MemoryStream(data))
{
// PrintRawStream(printerName, stream, documentName, paused)
printer.PrintRawStream("Microsoft Print to PDF", stream, "HTML Document", false);
}
Console.WriteLine("Raw HTML bytes sent to spooler (not rendered).");
}
}
// NuGet: Install-Package RawPrint
using System;
using System.IO;
using System.Text;
using RawPrint;
class Program
{
static void Main()
{
//RawPrintcannot convert HTML to PDF. Sending raw HTML bytes to a printer just
// prints the HTML source as text — the markup is not rendered.
string html = "<html><body><h1>Hello World</h1></body></html>";
byte[] data = Encoding.ASCII.GetBytes(html);
IPrinter printer = new Printer();
using (var stream = new MemoryStream(data))
{
// PrintRawStream(printerName, stream, documentName, paused)
printer.PrintRawStream("Microsoft Print to PDF", stream, "HTML Document", false);
}
Console.WriteLine("Raw HTML bytes sent to spooler (not rendered).");
}
}
Imports System
Imports System.IO
Imports System.Text
Imports RawPrint
Class Program
Shared Sub Main()
' RawPrint cannot convert HTML to PDF. Sending raw HTML bytes to a printer just
' prints the HTML source as text — the markup is not rendered.
Dim html As String = "<html><body><h1>Hello World</h1></body></html>"
Dim data As Byte() = Encoding.ASCII.GetBytes(html)
Dim printer As IPrinter = New Printer()
Using stream As New MemoryStream(data)
' PrintRawStream(printerName, stream, documentName, paused)
printer.PrintRawStream("Microsoft Print to PDF", stream, "HTML Document", False)
End Using
Console.WriteLine("Raw HTML bytes sent to spooler (not rendered).")
End Sub
End Class
翻訳後(IronPDF):。
// NuGet: Install-Package IronPdf
using IronPdf;
using System;
class Program
{
static void Main()
{
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
var renderer = new ChromePdfRenderer();
string html = "<html><body><h1>Hello World</h1></body></html>";
var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SaveAs("output.pdf");
Console.WriteLine("PDF created successfully");
}
}
// NuGet: Install-Package IronPdf
using IronPdf;
using System;
class Program
{
static void Main()
{
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
var renderer = new ChromePdfRenderer();
string html = "<html><body><h1>Hello World</h1></body></html>";
var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SaveAs("output.pdf");
Console.WriteLine("PDF created successfully");
}
}
Imports IronPdf
Imports System
Class Program
Shared Sub Main()
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY"
Dim renderer = New ChromePdfRenderer()
Dim html As String = "<html><body><h1>Hello World</h1></body></html>"
Dim pdf = renderer.RenderHtmlAsPdf(html)
pdf.SaveAs("output.pdf")
Console.WriteLine("PDF created successfully")
End Sub
End Class
このアーキテクチャーの不一致は、パッケージの親しみやすいAPIでも明らかです:RawPrintはバイトをRAWデータ型でWindowsのスプーラーへ送信し、HTMLを渡すとプリンターはソーステキストを印刷します。 IronPDFの ChromePdfRenderer は実際にマークアップをレンダリングします。包括的な例については、HTMLからPDFへのドキュメントを参照してください。
例2: URLからPDFへの変換
翻訳前(RawPrint):
// NuGet: Install-Package RawPrint
using System;
using System.IO;
using System.Net.Http;
using System.Text;
using RawPrint;
class Program
{
static void Main()
{
//RawPrintcannot fetch a URL or render a web page; downloading the HTML and
// shipping it to the spooler just prints the raw HTML source.
using (var client = new HttpClient())
{
string htmlSource = client.GetStringAsync("https://example.com").GetAwaiter().GetResult();
byte[] data = Encoding.UTF8.GetBytes(htmlSource);
IPrinter printer = new Printer();
using (var stream = new MemoryStream(data))
{
printer.PrintRawStream("Microsoft Print to PDF", stream, "Web Page", false);
}
Console.WriteLine("Raw HTML sent to spooler (not a rendered PDF).");
}
}
}
// NuGet: Install-Package RawPrint
using System;
using System.IO;
using System.Net.Http;
using System.Text;
using RawPrint;
class Program
{
static void Main()
{
//RawPrintcannot fetch a URL or render a web page; downloading the HTML and
// shipping it to the spooler just prints the raw HTML source.
using (var client = new HttpClient())
{
string htmlSource = client.GetStringAsync("https://example.com").GetAwaiter().GetResult();
byte[] data = Encoding.UTF8.GetBytes(htmlSource);
IPrinter printer = new Printer();
using (var stream = new MemoryStream(data))
{
printer.PrintRawStream("Microsoft Print to PDF", stream, "Web Page", false);
}
Console.WriteLine("Raw HTML sent to spooler (not a rendered PDF).");
}
}
}
Imports System
Imports System.IO
Imports System.Net.Http
Imports System.Text
Imports RawPrint
Module Program
Sub Main()
' RawPrint cannot fetch a URL or render a web page; downloading the HTML and
' shipping it to the spooler just prints the raw HTML source.
Using client As New HttpClient()
Dim htmlSource As String = client.GetStringAsync("https://example.com").GetAwaiter().GetResult()
Dim data As Byte() = Encoding.UTF8.GetBytes(htmlSource)
Dim printer As IPrinter = New Printer()
Using stream As New MemoryStream(data)
printer.PrintRawStream("Microsoft Print to PDF", stream, "Web Page", False)
End Using
Console.WriteLine("Raw HTML sent to spooler (not a rendered PDF).")
End Using
End Sub
End Module
翻訳後(IronPDF):。
// NuGet: Install-Package IronPdf
using IronPdf;
using System;
class Program
{
static void Main()
{
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
var renderer = new ChromePdfRenderer();
// Render a live website directly to PDF with full CSS, JavaScript, and images
var pdf = renderer.RenderUrlAsPdf("https://example.com");
pdf.SaveAs("webpage.pdf");
Console.WriteLine("Website rendered to PDF successfully");
}
}
// NuGet: Install-Package IronPdf
using IronPdf;
using System;
class Program
{
static void Main()
{
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
var renderer = new ChromePdfRenderer();
// Render a live website directly to PDF with full CSS, JavaScript, and images
var pdf = renderer.RenderUrlAsPdf("https://example.com");
pdf.SaveAs("webpage.pdf");
Console.WriteLine("Website rendered to PDF successfully");
}
}
Imports IronPdf
Imports System
Class Program
Shared Sub Main()
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY"
Dim renderer = New ChromePdfRenderer()
' Render a live website directly to PDF with full CSS, JavaScript, and images
Dim pdf = renderer.RenderUrlAsPdf("https://example.com")
pdf.SaveAs("webpage.pdf")
Console.WriteLine("Website rendered to PDF successfully")
End Sub
End Class
RawPrintはウェブページをレンダリングできません—ただスプーラーにバイトを送るだけです。 HTMLをダウンロードして送信すると、プリンターはソーステキストを印刷し、レンダリングされたコンテンツではありません。 IronPDFの RenderUrlAsPdf() は、CSS、JavaScript、および画像を含めて完全にレンダリングされたウェブページをキャプチャします。 詳しくは、チュートリアルをご覧ください。
例3:ドキュメントのフォーマット
翻訳前(RawPrint):
// NuGet: Install-Package RawPrint
using System;
using System.IO;
using System.Text;
using RawPrint;
class Program
{
static void Main()
{
//RawPrinthas no concept of fonts, margins, or layout — formatting must be
// expressed in the printer's own command language (PCL, PostScript, ESC/POS, ZPL).
// Example: a tiny PCL5 stream that selects portrait and a 16.66cpi font.
string pclCommands = "\x1B&l0O\x1B(s0p16.66h8.5v0s0b3T";
string text = "Plain text document - formatting must be expressed in printer command language";
byte[] data = Encoding.ASCII.GetBytes(pclCommands + text);
IPrinter printer = new Printer();
using (var stream = new MemoryStream(data))
{
printer.PrintRawStream("HP LaserJet", stream, "Raw Document", false);
}
}
}
// NuGet: Install-Package RawPrint
using System;
using System.IO;
using System.Text;
using RawPrint;
class Program
{
static void Main()
{
//RawPrinthas no concept of fonts, margins, or layout — formatting must be
// expressed in the printer's own command language (PCL, PostScript, ESC/POS, ZPL).
// Example: a tiny PCL5 stream that selects portrait and a 16.66cpi font.
string pclCommands = "\x1B&l0O\x1B(s0p16.66h8.5v0s0b3T";
string text = "Plain text document - formatting must be expressed in printer command language";
byte[] data = Encoding.ASCII.GetBytes(pclCommands + text);
IPrinter printer = new Printer();
using (var stream = new MemoryStream(data))
{
printer.PrintRawStream("HP LaserJet", stream, "Raw Document", false);
}
}
}
Imports System
Imports System.IO
Imports System.Text
Imports RawPrint
Module Program
Sub Main()
' RawPrint has no concept of fonts, margins, or layout — formatting must be
' expressed in the printer's own command language (PCL, PostScript, ESC/POS, ZPL).
' Example: a tiny PCL5 stream that selects portrait and a 16.66cpi font.
Dim pclCommands As String = ChrW(&H1B) & "&l0O" & ChrW(&H1B) & "(s0p16.66h8.5v0s0b3T"
Dim text As String = "Plain text document - formatting must be expressed in printer command language"
Dim data As Byte() = Encoding.ASCII.GetBytes(pclCommands & text)
Dim printer As IPrinter = New Printer()
Using stream As New MemoryStream(data)
printer.PrintRawStream("HP LaserJet", stream, "Raw Document", False)
End Using
End Sub
End Module
翻訳後(IronPDF):。
// NuGet: Install-Package IronPdf
using IronPdf;
using System;
class Program
{
static void Main()
{
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
var renderer = new ChromePdfRenderer();
string html = @"
<html>
<head>
<style>
body { font-family: Arial; margin: 40px; }
h1 { color: #2c3e50; font-size: 24px; }
p { line-height: 1.6; color: #34495e; }
.highlight { background-color: yellow; font-weight: bold; }
</style>
</head>
<body>
<h1>Formatted Document</h1>
<p>This is a <span class='highlight'>beautifully formatted</span> document with CSS styling.</p>
<p>Complex layouts, fonts, colors, and images are fully supported.</p>
</body>
</html>";
var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SaveAs("formatted.pdf");
Console.WriteLine("Formatted PDF created successfully");
}
}
// NuGet: Install-Package IronPdf
using IronPdf;
using System;
class Program
{
static void Main()
{
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
var renderer = new ChromePdfRenderer();
string html = @"
<html>
<head>
<style>
body { font-family: Arial; margin: 40px; }
h1 { color: #2c3e50; font-size: 24px; }
p { line-height: 1.6; color: #34495e; }
.highlight { background-color: yellow; font-weight: bold; }
</style>
</head>
<body>
<h1>Formatted Document</h1>
<p>This is a <span class='highlight'>beautifully formatted</span> document with CSS styling.</p>
<p>Complex layouts, fonts, colors, and images are fully supported.</p>
</body>
</html>";
var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SaveAs("formatted.pdf");
Console.WriteLine("Formatted PDF created successfully");
}
}
Imports IronPdf
Imports System
Module Program
Sub Main()
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY"
Dim renderer As New ChromePdfRenderer()
Dim html As String = "
<html>
<head>
<style>
body { font-family: Arial; margin: 40px; }
h1 { color: #2c3e50; font-size: 24px; }
p { line-height: 1.6; color: #34495e; }
.highlight { background-color: yellow; font-weight: bold; }
</style>
</head>
<body>
<h1>Formatted Document</h1>
<p>This is a <span class='highlight'>beautifully formatted</span> document with CSS styling.</p>
<p>Complex layouts, fonts, colors, and images are fully supported.</p>
</body>
</html>"
Dim pdf = renderer.RenderHtmlAsPdf(html)
pdf.SaveAs("formatted.pdf")
Console.WriteLine("Formatted PDF created successfully")
End Sub
End Module
RawPrintでのプレーンバイト以上のフォーマットは、"\x1B&l0O\x1B(s0p16.66h8.5v0s0b3T" のようなプリンターコマンドシーケンスを手で作成し、ターゲットプリンターのPCLまたはPostScript方言を知っていることを意味します。 IronPDFは標準HTMLとCSSを使用します—複雑なレイアウト、フォント、色、および画像はプリンター固有の知識なしに完全にサポートされます。
機能比較の概要
| フィーチャー | RawPrint | IronPDF |
|---|---|---|
| PDFの作成。 | ||
| HTMLからPDFへ | なし | はい |
| URLからPDFへ | なし | はい |
| ゼロから作成 | なし | はい |
| PDF操作 | ||
| PDFのマージ | なし | はい |
| PDFの分割 | なし | はい |
| 透かしの追加 | なし | はい |
| 既存の編集 | なし | はい |
| 印刷。 | ||
| RAWバイトをスプーラーに送る | はい | なし |
| ESC/POS、ZPL、生のPCL | はい | なし |
| OSプリントシステムを経由して印刷 | なし | はい |
| プラットフォーム | ||
| ウィンドウズ | はい | はい |
| Linux | なし | はい |
| macOS | なし | はい |
| Docker | なし | はい |
| その他 | ||
| 暗号化 / セキュリティ | なし | はい |
| デジタル署名 | なし | はい |
| PDF/A | なし | はい |
移行後の新機能
IronPDFに移行することで、RawPrintでは提供できない機能を得ることができます:
PDFマージ
var pdfs = pdfFiles.Select(f => PdfDocument.FromFile(f)).ToList();
var merged = PdfDocument.Merge(pdfs);
merged.SaveAs("complete.pdf");
var pdfs = pdfFiles.Select(f => PdfDocument.FromFile(f)).ToList();
var merged = PdfDocument.Merge(pdfs);
merged.SaveAs("complete.pdf");
Dim pdfs = pdfFiles.Select(Function(f) PdfDocument.FromFile(f)).ToList()
Dim merged = PdfDocument.Merge(pdfs)
merged.SaveAs("complete.pdf")
設定で印刷
var pdf = PdfDocument.FromFile("report.pdf");
pdf.Print(new PrintOptions
{
PrinterName = "HP LaserJet",
NumberOfCopies = 2,
DPI = 300,
GrayScale = false
});
var pdf = PdfDocument.FromFile("report.pdf");
pdf.Print(new PrintOptions
{
PrinterName = "HP LaserJet",
NumberOfCopies = 2,
DPI = 300,
GrayScale = false
});
Dim pdf = PdfDocument.FromFile("report.pdf")
pdf.Print(New PrintOptions With {
.PrinterName = "HP LaserJet",
.NumberOfCopies = 2,
.DPI = 300,
.GrayScale = False
})
1つのワークフローで作成と印刷ができます
var renderer = new ChromePdfRenderer();
var pdf = renderer.RenderHtmlAsPdf(@"
<h1>Invoice #12345</h1>
<p>Customer: John Doe</p>
<p>Amount: $150.00</p>
");
// Print directly
pdf.Print("HP LaserJet");
// Or save first
pdf.SaveAs("invoice.pdf");
var renderer = new ChromePdfRenderer();
var pdf = renderer.RenderHtmlAsPdf(@"
<h1>Invoice #12345</h1>
<p>Customer: John Doe</p>
<p>Amount: $150.00</p>
");
// Print directly
pdf.Print("HP LaserJet");
// Or save first
pdf.SaveAs("invoice.pdf");
Dim renderer = New ChromePdfRenderer()
Dim pdf = renderer.RenderHtmlAsPdf("
<h1>Invoice #12345</h1>
<p>Customer: John Doe</p>
<p>Amount: $150.00</p>
")
' Print directly
pdf.Print("HP LaserJet")
' Or save first
pdf.SaveAs("invoice.pdf")
移行チェックリスト
移行前
- すべてのRawPrint使用を特定してください (
PrintRawStream) - 各呼び出しサイトを分類する:オフィスプリンターに行くPDFはIronPDFの候補です; ESC/POS, ZPL, EPL, または手作りのPCL/PostScriptバイトはRawPrintに残すべきです。
- アプリケーションで使用するプリンター名を文書化する — IronPDFはOSプリントシステムを通じて印刷するため、名前は解決される必要があります。
- 統合できる外部PDF作成コードをメモします
- IronPDFからIronPDFライセンスキーを取得します
コードの更新
-IronPDFパッケージをインストールしてください: dotnet add package IronPdf
- 残りの生バイトチャネルがない場合のみRawPrintを削除してください:
dotnet remove package RawPrint - create-then-RawPrint パイプラインを
ChromePdfRendererとpdf.Print()に置き換えてください - WindowsでPDF作成と印刷を単一のワークフローに統合する
- アプリケーションの起動時にライセンスの初期化を追加
テスティング
- 対象プリンタへのテスト印刷
- 印刷品質を確認する
- 複数のコピーをテストする
- サイレント印刷のテスト
- 必要に応じてクロスプラットフォーム検証

