PDFPrinting.NET에서 IronPDF로의 마이그레이션 방법 (C#)
PDFPrinting.NET에서 IronPDF로의 마이그레이션을 통해 인쇄 전용 라이브러리에서 PDF의 생성, 조작, 추출, 보안 및 인쇄를 포함하는 완전한 PDF 수명 주기를 처리하는 종합 솔루션으로 PDF 기능이 확장됩니다. 이 가이드는 PDF 생성, HTML 변환 및 크로스 플랫폼 지원 기능을 추가하면서 기존의 인쇄 워크플로를 보존하는 완전한 단계별 마이그레이션 경로를 제공합니다.
PDFPrinting.NET에서 IronPDF로 마이그레이션해야 하는 이유
PDFPrinting.NET 이해하기
PDFPrinting.NET (Terminalworks; NuGet PdfPrintingNet)은 Windows 환경에서 무음 PDF 인쇄에 중점을 둔 전문 라이브러리입니다. 기존 PDF의 무음 인쇄에 중점을 둔 전용 도구로, 사용자 개입 없이 프로그래밍 방식으로 문서를 프린터로 발송하는 작업을 간소화합니다. 새로운 진입점은 PdfPrint 클래스입니다; 이전 코드는 여전히 오래된 TerminalWorks.PDFPrinting.PDFPrinter를 참조할 수 있습니다.
핵심 강점은 무음 인쇄입니다 — 일반적인 인쇄 대화 상자를 우회하여 완전히 자동화된 워크플로우가 간섭 없이 실행될 수 있도록 합니다.
인쇄 중심의 제한
PDFPrinting.NET은 제한된 작업 세트에 집중하며 새 PDF 콘텐츠를 작성하지 않습니다. 그 범위는 기존 문서를 인쇄, 보기, 기본 편집 및 래스터화하는 것입니다:
-
인쇄 중심: 새 PDF 콘텐츠를 작성하지 않습니다 — 미리 존재하는 PDF만 인쇄, 보기, 편집 및 래스터화합니다.
-
Windows 전용 인쇄: Windows 인쇄 인프라에 묶여 있어 플랫폼 간 사용성이 제한됩니다.
-
HTML/URL-to-PDF API 없음:
HtmlToPdfConverter와WebPageToPdfConverter클래스가 없습니다 — 이러한 기능은 API 표면에 존재하지 않습니다. -
제한된 조작: 기본 병합/분할/추출은
PdfPrintDocument을 통해 가능합니다; 워터마킹이나 현대적 콘텐츠 저작은 없습니다. -
종합적인 텍스트 추출 표면 없음.
- 양식 채우기 또는 평면화 없음.
PDFPrinting.NET 대IronPDF비교
| 기능 | PDFPrinting.NET | IronPDF |
|---|---|---|
| 주요 기능 | 조용한 PDF 인쇄 | 전체 사이클 처리 (생성, 편집, 인쇄) |
| 플랫폼 지원 | Windows 전용 | 크로스 플랫폼 |
| PDF 생성/조작 기능 | 아니요 | 예 |
| HTML을 PDF로 변환 | 아니요 | 예 |
| 자동화된 워크플로우에 적합 | 높음 | 높음 |
| 추가 종속성 | Windows 프린터에 의존 | 내장 브라우저 엔진을 사용하여 렌더링 |
| 조용한 인쇄 | 예 | 예 |
| 텍스트 추출 | 지원되지 않음 | 지원됨 |
| 라이선스 | 상업적 | 상업적 |
IronPDF는 PDF 처리의 전체 수명 주기를 다룰 수 있는 더 포괄적인 솔루션을 제공합니다. PDF 문서를 생성, 편집, 변환 및 인쇄할 수 있어 개발자에게 단일 API를 통한 전체 기능 패키지를 제공합니다. PDFPrinting.NET과 달리 IronPDF는 다양한 플랫폼에 배포될 수 있으며, 다양한 환경에서 작동하는 응용 프로그램에 유연한 선택이 됩니다.
현대 .NET을 사용하는 팀에게 IronPDF는 Windows, Linux, macOS 환경에서 모두 작동하는 종합적인 PDF 솔루션을 제공합니다.
시작하기 전에
필수 조건
- .NET 환경: .NET Framework 4.6.2+ 또는 .NET Core 3.1+ / .NET 5/6/7/8/9+
- NuGet 접근 권한: NuGet 패키지를 설치할 수 있는 능력
- IronPDF 라이선스: ironpdf.com에서 라이선스 키를 획득하세요
NuGet 패키지 변경 사항
# Remove PDFPrinting.NET (the actual NuGet ID is PdfPrintingNet)
dotnet remove package PdfPrintingNet
# Install IronPDF
dotnet add package IronPdf
# Remove PDFPrinting.NET (the actual NuGet ID is PdfPrintingNet)
dotnet remove package PdfPrintingNet
# Install IronPDF
dotnet add package IronPdf
라이선스 구성
// Add at application startup (Program.cs or Startup.cs)
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
// Add at application startup (Program.cs or Startup.cs)
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
' Add at application startup (Program.vb or Startup.vb)
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY"
PDFPrinting.NET 사용 식별하기
# Find PDFPrinting.NET usage (newer + legacy namespaces)
grep -rE "PdfPrintingNet|TerminalWorks\.PDFPrinting|PdfPrint\b|PdfPrintDocument|PDFPrinter" --include="*.cs" .
# Find print-related code
grep -r "\.Print(\|PrinterName\|GetPrintDocument" --include="*.cs" .
# Find PDFPrinting.NET usage (newer + legacy namespaces)
grep -rE "PdfPrintingNet|TerminalWorks\.PDFPrinting|PdfPrint\b|PdfPrintDocument|PDFPrinter" --include="*.cs" .
# Find print-related code
grep -r "\.Print(\|PrinterName\|GetPrintDocument" --include="*.cs" .
완전한 API 참조
네임스페이스 변경
// Before: PDFPrinting.NET
// Newer API:
using PdfPrintingNet;
// Older code may use:
using TerminalWorks.PDFPrinting;
// After: IronPDF
using IronPdf;
using IronPdf.Rendering;
using IronPdf.Printing;
// Before: PDFPrinting.NET
// Newer API:
using PdfPrintingNet;
// Older code may use:
using TerminalWorks.PDFPrinting;
// After: IronPDF
using IronPdf;
using IronPdf.Rendering;
using IronPdf.Printing;
' Before: PDFPrinting.NET
' Newer API:
Imports PdfPrintingNet
' Older code may use:
Imports TerminalWorks.PDFPrinting
' After: IronPDF
Imports IronPdf
Imports IronPdf.Rendering
Imports IronPdf.Printing
핵심 클래스 매핑
| PDFPrinting.NET | IronPDF |
|---|---|
PdfPrint (새로운) / PDFPrinter (오래된) |
PdfDocument + Print() |
PdfPrintDocument |
PdfDocument |
| (HTML-to-PDF 클래스 없음) | ChromePdfRenderer.RenderHtmlAsPdf |
| (URL-to-PDF 클래스 없음) | ChromePdfRenderer.RenderUrlAsPdf |
| 인쇄 설정 속성 | PrintSettings |
인쇄 방법 맵핑
| PDFPrinting.NET | IronPDF |
|---|---|
pdfPrint.Print(filePath) |
pdf.Print() |
pdfPrint.PrinterName = "..."; pdfPrint.Print(path)|pdf.Print(printerName)` |
|
new PdfPrintDocument(...) |
pdf.GetPrintDocument() |
pdfPrint.Copies = n |
printSettings.NumberOfCopies = n |
pdfPrint.Duplex = true |
printSettings.DuplexMode = Duplex.Vertical |
pdfPrint.Collate = true |
printSettings.Collate = true |
PDFPrinting.NET에 없는 새로운 기능
| IronPDF기능 | 설명 |
|---|---|
renderer.RenderHtmlAsPdf(html) |
HTML을 PDF로 변환 |
renderer.RenderUrlAsPdf(url) |
URL을 PDF로 변환 |
PdfDocument.Merge(pdfs) |
여러 PDF 병합 |
pdf.ApplyWatermark(html) |
워터마크 추가 |
pdf.SecuritySettings.UserPassword |
암호 보호 |
pdf.ExtractAllText() |
텍스트 추출 |
코드 마이그레이션 예제
예제 1: HTML에서 PDF로 변환
이전 (PDFPrinting.NET): PDFPrinting.NET에는 HTML-to-PDF API가 없습니다 — HtmlToPdfConverter 클래스가 없습니다. 가장 가까운 워크플로우는 다른 라이브러리로 PDF를 생성한 다음 파일을 인쇄하거나 전달하는 것입니다:
// NuGet: Install-Package PdfPrintingNet
using PdfPrintingNet;
using System;
class Program
{
static void Main()
{
// Step 1: Produce the PDF with another library (PDFPrinting.NET cannot).
// Step 2: Print the existing PDF file.
var pdfPrint = new PdfPrint("license-owner", "license-key");
var status = pdfPrint.Print("output.pdf");
Console.WriteLine($"Printed: {status}");
}
}
// NuGet: Install-Package PdfPrintingNet
using PdfPrintingNet;
using System;
class Program
{
static void Main()
{
// Step 1: Produce the PDF with another library (PDFPrinting.NET cannot).
// Step 2: Print the existing PDF file.
var pdfPrint = new PdfPrint("license-owner", "license-key");
var status = pdfPrint.Print("output.pdf");
Console.WriteLine($"Printed: {status}");
}
}
Imports PdfPrintingNet
Imports System
Class Program
Shared Sub Main()
' Step 1: Produce the PDF with another library (PDFPrinting.NET cannot).
' Step 2: Print the existing PDF file.
Dim pdfPrint = New PdfPrint("license-owner", "license-key")
Dim status = pdfPrint.Print("output.pdf")
Console.WriteLine($"Printed: {status}")
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 As 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
PDFPrinting.NET은 PDF를 전혀 작성할 수 없기 때문에, 마이그레이션은 클래스 교환이 아니라 새로운 기능을 채택하는 것입니다. IronPDF의 ChromePdfRenderer.RenderHtmlAsPdf()는 PdfDocument를 반환하며, 이는 저장하기 전에 SaveAs()로 조작할 수 있습니다 (워터마크, 병합, 보안). Chromium 기반 엔진을 활용하여 IronPDF는 현대 CSS 및 JavaScript 렌더링을 높은 충실도로 재현합니다. HTML에서 PDF로의 문서에서 포괄적인 예제를 참조하세요.
예제 2: URL에서 PDF로 변환
이전 (PDFPrinting.NET): WebPageToPdfConverter 클래스가 없습니다 — PDFPrinting.NET은 웹 페이지를 다운로드하거나 렌더링하지 않습니다. 별도의 라이브러리가 URL을 먼저 PDF로 캡처해야 하며, PDFPrinting.NET은 그 결과 파일을 인쇄할 수 있습니다:
// NuGet: Install-Package PdfPrintingNet
using PdfPrintingNet;
using System;
class Program
{
static void Main()
{
// Step 1: Capture the URL with another library (PDFPrinting.NET cannot).
// Step 2: Print the resulting PDF.
var pdfPrint = new PdfPrint("license-owner", "license-key");
var status = pdfPrint.Print("webpage.pdf");
Console.WriteLine($"Printed: {status}");
}
}
// NuGet: Install-Package PdfPrintingNet
using PdfPrintingNet;
using System;
class Program
{
static void Main()
{
// Step 1: Capture the URL with another library (PDFPrinting.NET cannot).
// Step 2: Print the resulting PDF.
var pdfPrint = new PdfPrint("license-owner", "license-key");
var status = pdfPrint.Print("webpage.pdf");
Console.WriteLine($"Printed: {status}");
}
}
Imports PdfPrintingNet
Imports System
Class Program
Shared Sub Main()
' Step 1: Capture the URL with another library (PDFPrinting.NET cannot).
' Step 2: Print the resulting PDF.
Dim pdfPrint As New PdfPrint("license-owner", "license-key")
Dim status = pdfPrint.Print("webpage.pdf")
Console.WriteLine($"Printed: {status}")
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 url = "https://www.example.com";
var pdf = renderer.RenderUrlAsPdf(url);
pdf.SaveAs("webpage.pdf");
Console.WriteLine("PDF from URL 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 url = "https://www.example.com";
var pdf = renderer.RenderUrlAsPdf(url);
pdf.SaveAs("webpage.pdf");
Console.WriteLine("PDF from URL created successfully");
}
}
Imports IronPdf
Imports System
Module Program
Sub Main()
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY"
Dim renderer As New ChromePdfRenderer()
Dim url As String = "https://www.example.com"
Dim pdf = renderer.RenderUrlAsPdf(url)
pdf.SaveAs("webpage.pdf")
Console.WriteLine("PDF from URL created successfully")
End Sub
End Module
IronPDF는 HTML 문자열과 URL 모두에 대해 단일 ChromePdfRenderer 클래스를 사용하며, RenderUrlAsPdf()는 단일 호출에서 웹 캡처를 처리합니다. 더 많은 정보를 보려면 튜토리얼을 참조하세요.
예제 3: 헤더 및 푸터
이전 (PDFPrinting.NET): PDFPrinting.NET은 헤더 또는 풋터를 저작할 수 없습니다 — HTML이나 다른 소스에서 PDF를 생성하지 않으며, 헤더/풋터 구성 API도 제공하지 않습니다. PDF가 이미 그것들을 포함하고 있다면 라이브러리는 인쇄할 수 있습니다:
// NuGet: Install-Package PdfPrintingNet
using PdfPrintingNet;
using System;
class Program
{
static void Main()
{
// Headers/footers must already be baked into the PDF.
var pdfPrint = new PdfPrint("license-owner", "license-key");
pdfPrint.Print("report.pdf");
Console.WriteLine("PDF with pre-existing headers/footers printed");
}
}
// NuGet: Install-Package PdfPrintingNet
using PdfPrintingNet;
using System;
class Program
{
static void Main()
{
// Headers/footers must already be baked into the PDF.
var pdfPrint = new PdfPrint("license-owner", "license-key");
pdfPrint.Print("report.pdf");
Console.WriteLine("PDF with pre-existing headers/footers printed");
}
}
Imports PdfPrintingNet
Imports System
Module Program
Sub Main()
' Headers/footers must already be baked into the PDF.
Dim pdfPrint As New PdfPrint("license-owner", "license-key")
pdfPrint.Print("report.pdf")
Console.WriteLine("PDF with pre-existing headers/footers printed")
End Sub
End Module
이후 (IronPDF):
// NuGet: Install-Package IronPdf
using IronPdf;
using IronPdf.Rendering;
using System;
class Program
{
static void Main()
{
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.HtmlHeader = new HtmlHeaderFooter()
{
HtmlFragment = "<div style='text-align:center'>Company Report</div>"
};
renderer.RenderingOptions.HtmlFooter = new HtmlHeaderFooter()
{
HtmlFragment = "<div style='text-align:center'>Page {page} of {total-pages}</div>"
};
string html = "<html><body><h1>Document Content</h1></body></html>";
var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SaveAs("report.pdf");
Console.WriteLine("PDF with headers/footers created");
}
}
// NuGet: Install-Package IronPdf
using IronPdf;
using IronPdf.Rendering;
using System;
class Program
{
static void Main()
{
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.HtmlHeader = new HtmlHeaderFooter()
{
HtmlFragment = "<div style='text-align:center'>Company Report</div>"
};
renderer.RenderingOptions.HtmlFooter = new HtmlHeaderFooter()
{
HtmlFragment = "<div style='text-align:center'>Page {page} of {total-pages}</div>"
};
string html = "<html><body><h1>Document Content</h1></body></html>";
var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SaveAs("report.pdf");
Console.WriteLine("PDF with headers/footers created");
}
}
Imports IronPdf
Imports IronPdf.Rendering
Imports System
Module Program
Sub Main()
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY"
Dim renderer As New ChromePdfRenderer()
renderer.RenderingOptions.HtmlHeader = New HtmlHeaderFooter() With {
.HtmlFragment = "<div style='text-align:center'>Company Report</div>"
}
renderer.RenderingOptions.HtmlFooter = New HtmlHeaderFooter() With {
.HtmlFragment = "<div style='text-align:center'>Page {page} of {total-pages}</div>"
}
Dim html As String = "<html><body><h1>Document Content</h1></body></html>"
Dim pdf = renderer.RenderHtmlAsPdf(html)
pdf.SaveAs("report.pdf")
Console.WriteLine("PDF with headers/footers created")
End Sub
End Module
IronPDF는 전체 HTML을 수용하는 HtmlFragment 속성을 가진 HtmlHeaderFooter 객체를 사용하여 CSS로 풍부한 스타일을 적용할 수 있습니다. {page} 및 {total-pages}과 같은 플레이스홀더는 렌더링 시점에 대체됩니다.
중요한 마이그레이션 노트
헤더/풋터 플레이스홀더는IronPDF전용 기능입니다
PDFPrinting.NET에는 전혀 헤더 또는 풋터 저작 API가 없으므로 마이그레이션할 플레이스홀더 구문이 없습니다. IronPDF는 HtmlHeaderFooter.HtmlFragment 내에서 {page} 및 {total-pages} 플레이스홀더를 지원합니다:
//IronPDF placeholders
"Page {page} of {total-pages}"
//IronPDF placeholders
"Page {page} of {total-pages}"
로드-후-출력 패턴
PDFPrinting.NET은 파일 경로를 Print()에 직접 전달합니다; IronPDF는 먼저 문서를 로드합니다:
// PDFPrinting.NET: Direct path to Print()
pdfPrint.Print("document.pdf");
// IronPDF: Load first, then operate
var pdf = PdfDocument.FromFile("document.pdf");
pdf.Print();
// PDFPrinting.NET: Direct path to Print()
pdfPrint.Print("document.pdf");
// IronPDF: Load first, then operate
var pdf = PdfDocument.FromFile("document.pdf");
pdf.Print();
' PDFPrinting.NET: Direct path to Print()
pdfPrint.Print("document.pdf")
' IronPDF: Load first, then operate
Dim pdf = PdfDocument.FromFile("document.pdf")
pdf.Print()
출력 설정 마이그레이션
PDFPrinting.NET은 PdfPrint에 대한 프로퍼티를 사용합니다; IronPDF는 설정 객체를 사용합니다:
// PDFPrinting.NET: Properties on PdfPrint
pdfPrint.Copies = 2;
pdfPrint.Duplex = true;
// IronPDF: Settings object
var settings = new PrintSettings
{
NumberOfCopies = 2,
DuplexMode = System.Drawing.Printing.Duplex.Vertical
};
pdf.Print(settings);
// PDFPrinting.NET: Properties on PdfPrint
pdfPrint.Copies = 2;
pdfPrint.Duplex = true;
// IronPDF: Settings object
var settings = new PrintSettings
{
NumberOfCopies = 2,
DuplexMode = System.Drawing.Printing.Duplex.Vertical
};
pdf.Print(settings);
' PDFPrinting.NET: Properties on PdfPrint
pdfPrint.Copies = 2
pdfPrint.Duplex = True
' IronPDF: Settings object
Dim settings As New PrintSettings With {
.NumberOfCopies = 2,
.DuplexMode = System.Drawing.Printing.Duplex.Vertical
}
pdf.Print(settings)
이동 후 새로운 기능
IronPDF로 마이그레이션하면 PDFPrinting.NET이 제공할 수 없는 기능을 얻게 됩니다:
PDF 병합
var pdf1 = PdfDocument.FromFile("document1.pdf");
var pdf2 = PdfDocument.FromFile("document2.pdf");
var merged = PdfDocument.Merge(pdf1, pdf2);
merged.SaveAs("merged.pdf");
var pdf1 = PdfDocument.FromFile("document1.pdf");
var pdf2 = PdfDocument.FromFile("document2.pdf");
var merged = PdfDocument.Merge(pdf1, pdf2);
merged.SaveAs("merged.pdf");
Dim pdf1 = PdfDocument.FromFile("document1.pdf")
Dim pdf2 = PdfDocument.FromFile("document2.pdf")
Dim merged = PdfDocument.Merge(pdf1, pdf2)
merged.SaveAs("merged.pdf")
워터마크
pdf.ApplyWatermark("<h2 style='color:red;'>CONFIDENTIAL</h2>");
pdf.ApplyWatermark("<h2 style='color:red;'>CONFIDENTIAL</h2>");
pdf.ApplyWatermark("<h2 style='color:red;'>CONFIDENTIAL</h2>")
비밀번호 보호
pdf.SecuritySettings.UserPassword = "userpassword";
pdf.SecuritySettings.OwnerPassword = "ownerpassword";
pdf.SecuritySettings.UserPassword = "userpassword";
pdf.SecuritySettings.OwnerPassword = "ownerpassword";
pdf.SecuritySettings.UserPassword = "userpassword"
pdf.SecuritySettings.OwnerPassword = "ownerpassword"
텍스트 추출
string text = pdf.ExtractAllText();
string text = pdf.ExtractAllText();
Dim text As String = pdf.ExtractAllText()
생성-후-출력 워크플로우
IronPDF를 사용하면 PDF를 생성하고 하나의 워크플로우 내에서 출력할 수 있습니다:
var renderer = new ChromePdfRenderer();
var pdf = renderer.RenderHtmlAsPdf("<h1>Invoice</h1>");
pdf.Print("Invoice Printer");
var renderer = new ChromePdfRenderer();
var pdf = renderer.RenderHtmlAsPdf("<h1>Invoice</h1>");
pdf.Print("Invoice Printer");
Dim renderer As New ChromePdfRenderer()
Dim pdf = renderer.RenderHtmlAsPdf("<h1>Invoice</h1>")
pdf.Print("Invoice Printer")
크로스 플랫폼 출력
PDFPrinting.NET은 Windows 전용입니다. IronPDF는 크로스 플랫폼에서 작동합니다:
윈도우
pdf.Print("HP LaserJet");
pdf.Print("HP LaserJet");
pdf.Print("HP LaserJet")
리눅스
// Requires CUPS (Common Unix Printing System)
// Install: apt-get install cups
pdf.Print("HP_LaserJet"); // CUPS uses underscores instead of spaces
// Requires CUPS (Common Unix Printing System)
// Install: apt-get install cups
pdf.Print("HP_LaserJet"); // CUPS uses underscores instead of spaces
macOS
pdf.Print("HP LaserJet");
pdf.Print("HP LaserJet");
pdf.Print("HP LaserJet")
기능 비교 요약
| 기능 | PDFPrinting.NET | IronPDF |
|---|---|---|
| 무음 인쇄 | ✓ | ✓ |
| 출력 설정 | ✓ | ✓ |
| HTML to PDF | ✗ | ✓ |
| URL을 PDF로 변환 | ✗ | ✓ |
| 헤더/푸터 | 기초적인 | 전체 HTML |
| PDF 병합 | ✗ | ✓ |
| PDF 분할 | ✗ | ✓ |
| 워터마크 | ✗ | ✓ |
| 텍스트 추출 | ✗ | ✓ |
| 비밀번호 보호 | ✗ | ✓ |
| 크로스 플랫폼 | ✗ | ✓ |
마이그레이션 체크리스트
사전 마이그레이션
- 코드베이스에서 모든 PDFPrinting.NET 사용 목록 작성
- 현재 사용 중인 모든 프린터 이름 문서화
- 모든 출력 설정 구성 주석
- 크로스 플랫폼 지원이 필요한지 식별 -IronPDF라이선스 키 저장 계획 (환경 변수 권장) -IronPDF체험판 라이선스로 먼저 테스트
패키지 변경 사항
PdfPrintingNetNuGet 패키지 제거IronPdfNuGet Install-Package:dotnet add package IronPdf
코드 변경 사항
- 네임스페이스 임포트 업데이트 (
PdfPrintingNet/ legacyTerminalWorks.PDFPrinting→IronPdf) pdfPrint.Print(path)호출을PdfDocument.FromFile(path).Print()` 패턴으로 변환- 프린트마다 속성 (
Copies,Duplex,Collate,PrinterName)을PrintSettings객체로 이동 - 새로운 기능 채택: HTML 및 URL 입력에 대해
ChromePdfRenderer.RenderHtmlAsPdf/RenderUrlAsPdf사용 (PDFPrinting.NET에서는 이와 동등한 것이 존재하지 않았음) - 머리글/바닥글을
RenderingOptions.HtmlHeader및HtmlFooter로 구성 (새로운 기능) - 애플리케이션 시작 시
IronPdf.License.LicenseKey설정
마이그레이션 이후
- 모든 대상 플랫폼에서 출력 테스트
- 헤더/푸터 렌더링 검증
- 동적 문서용 PDF 생성 추가 고려
- 필요에 따라 새로운 기능 추가 (병합, 워터마크, 보안)

