C#에서 PDF Duo에서 IronPDF로 마이그레이션하는 방법
PDF Duo .NET에서 IronPDF로 이동하면 .NET PDF 워크플로가 제한된 문서 라이브러리에서 안정적이고 철저하게 문서화된 적극적으로 유지 관리되는 솔루션으로 전환됩니다. 이 안내서는 더 이상 활성 상태가 아닌 구성 요소에 의존하는 위험을 해결하면서 PDF Duo의 문서화된 API가 다루지 않는 기능에 접근할 수 있는 단계적 전환 경로를 제공합니다.
왜 PDF Duo에서 IronPDF로 마이그레이션해야 하는가
PDF Duo 위험 문제
PDF Duo .NET (DuoDimension Software)은 .NET용으로 제작된 틈새 HTML-to-PDF 구성 요소입니다. 자체 포함된 DLL을 찾는 팀에게 매력적일 수 있었지만, 여러 가지 특성 때문에 현재의 생산 애플리케이션에 적합하지 않을 수 있습니다:
-
공급 업체 및 출처: 퍼블리셔는 공개 로드맵도, GitHub 저장소도 없는 소규모 ISV인 DuoDimension Software (duodimension.com)입니다.
-
드문드문한 문서화: 하나의 공급 업체 제품 페이지, 몇 개의 샘플 스니펫, 그리고 2010년 보도 자료. API 레퍼런스 사이트도 없고 Stack Overflow 존재도 미미합니다.
-
사실상 방치됨: 마지막 공개 릴리스는 2010년 12월 10일, 약 15년 동안 새로운 버전이 없는 v2.4입니다.
-
문서화된 좁은 표면: 공용 API는 본질적으로
DuoDimension.HtmlToPdf에OpenHTML(...)와SavePDF(...)이 포함됩니다. 워터마킹, 암호화, 서명, 양식 채우기, 텍스트 추출, PDF 병합을 위한 문서화된 네이티브 API가 없습니다. -
렌더링 엔진이 공개되지 않음: 공급 업체 자료는 자체 포함된 구성 요소를 Office나 Acrobat 의존성 없이 설명하지만, 어떤 HTML/CSS 엔진이 사용되는지는 공개되지 않습니다. CSS3, 최신 JavaScript, 웹폰트, 플렉스/그리드 레이아웃은 주장되지 않습니다.
- 예전 .NET 타겟팅: 문서화된 지원은 .NET Framework 1.1에서 3.5까지이며, Windows XP / Vista / 7 / 2000 / 2003에서만 동작합니다. .NET Framework 4.x, .NET Core, .NET 5+, Linux, 또는 Docker에 대한 문서화된 지원은 없습니다.
PDF Duo와IronPDF비교
| 측면 | PDF Duo .NET | IronPDF |
|---|---|---|
| 마지막 릴리스 | v2.4 (2010년 12월) | 활성, 정규 릴리스 |
| 배포 | duodimension.com에서 다운로드한 DLL (NuGet 아님) | NuGet IronPdf |
| 런타임 지원 | .NET Framework 1.1 – 3.5, Windows만 지원 | .NET FX 4.6.2+, .NET 6/7/8/9/10, Linux, macOS, Docker |
| 문서화 | 하나의 공급 업체 제품 페이지 | 종합 문서 + API 레퍼런스 |
| 지원 | 보이지 않음 | 전문적인 지원 팀 |
| Community | 미미함 | 41M+ NuGet 다운로드 (Iron Software 스택) |
| 렌더링 | 엔진이 공개되지 않음 | 최신 크로뮴 |
| 기능 | HTML-to-PDF 전용 | HTML-to-PDF, 병합, 보안, 서명, OCR, 양식, 워터마크 |
| 라이센스 | 공급 업체 가격 페이지당 | 상업적, 영구적 또는 구독 |
현대 .NET을 사용하는 팀에게 IronPDF는 2010년 12월에 마지막으로 게시된 v2.4 구성 요소 대신 안정적인 기반을 제공하며, 철저히 문서화가 되어있고 지속적으로 개발됩니다.
시작하기 전에
필수 조건
- .NET 환경: .NET Framework 4.6.2+ 또는 .NET Core 3.1+ / .NET 5/6/7/8/9+
- NuGet 접근 권한: NuGet 패키지를 설치할 수 있는 능력
- IronPDF 라이선스: ironpdf.com에서 라이선스 키를 획득하세요
패키지 / 레퍼런스 변경사항
PDF Duo .NET은 NuGet을 통해 배포되지 않습니다. 제거는 수동 스텝입니다:
# In Visual Studio: References -> remove PDFDuo.dll (and any associated
# PDF Duo files) and delete the vendored binary from your /lib folder.
# Install IronPDF
dotnet add package IronPdf
# In Visual Studio: References -> remove PDFDuo.dll (and any associated
# PDF Duo files) and delete the vendored binary from your /lib folder.
# 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"
PDF Duo 사용 여부 식별
# Find all PDF Duo references
grep -r "DuoDimension\|HtmlToPdf\b\|OpenHTML\|SavePDF" --include="*.cs" .
# Find all PDF Duo references
grep -r "DuoDimension\|HtmlToPdf\b\|OpenHTML\|SavePDF" --include="*.cs" .
API 레퍼런스
공급업체의 문서화된 루트 네임스페이스는 DuoDimension입니다. 공용 표면은 본질적으로 HtmlToPdf 클래스에 OpenHTML(...)와 SavePDF(...)이 포함됩니다. IronPDF에 대한 하위 네임스페이스는 IronPDF의 구조를 반영합니다; PDF Duo .NET은 하위 네임스페이스를 문서화하지 않습니다.
네임스페이스 변경
| PDF Duo .NET | IronPDF |
|---|---|
using DuoDimension; |
using IronPdf; |
| (문서화된 하위 네임스페이스 없음) | using IronPdf.Rendering; |
HTML을 PDF로 변환 매핑
| PDF Duo .NET | IronPDF |
|---|---|
new DuoDimension.HtmlToPdf() |
new ChromePdfRenderer() |
conv.OpenHTML(htmlFile); conv.SavePDF(path); |
renderer.RenderHtmlFileAsPdf(htmlFile).SaveAs(path) |
conv.OpenHTML(url); conv.SavePDF(path); |
renderer.RenderUrlAsPdf(url).SaveAs(path) |
(문자열을 임시 .html에 쓰고 나서 OpenHTML) |
renderer.RenderHtmlAsPdf(html).SaveAs(path) |
페이지 구성 매핑
DuoDimension.HtmlToPdf은 용지 크기, 방향 또는 여백에 대한 설정 객체를 문서화하지 않습니다. 아래IronPDF열은 명시적인 RenderingOptions 동등물을 보여줍니다.
| PDF Duo .NET | IronPDF |
|---|---|
| (문서화된 페이지 크기 옵션 없음) | RenderingOptions.PaperSize = PdfPaperSize.A4 |
| (문서화된 페이지 크기 옵션 없음) | RenderingOptions.PaperSize = PdfPaperSize.Letter |
| (문서화된 방향 옵션 없음) | RenderingOptions.PaperOrientation = PdfPaperOrientation.Landscape |
| (문서화된 여백 객체 없음) | 개별 여백 속성 |
여백 매핑
| PDF Duo .NET | IronPDF |
|---|---|
| (문서화된 여백 객체 없음) | 개별 속성 |
| (동등한 항목 없음) | RenderingOptions.MarginTop |
| (동등한 항목 없음) | RenderingOptions.MarginRight |
| (동등한 항목 없음) | RenderingOptions.MarginBottom |
| (동등한 항목 없음) | RenderingOptions.MarginLeft |
문서 작업 매핑
PDF Duo .NET은 HTML을 PDF로 변환하는 변환기만입니다. 공급업체 제품 페이지는 DuoDimension.HtmlToPdf에서 로드, 바이트 또는 병합 API를 문서화하지 않습니다. 아래의 행은 PDF Duo를 사용할 때 인접 라이브러리에서 팀이 보통 무엇을 사용하는지, 그리고 그 작업을 통합하는IronPDF호출을 보여줍니다.
| 필요 | PDF Duo .NET | IronPDF |
|---|---|---|
| 기존 PDF 로드 | 기본 내장 아님 — iTextSharp 4.x 또는 유사와 짝지어 사용 | PdfDocument.FromFile(path) |
| PDF 저장 | conv.SavePDF(path) |
pdf.SaveAs(path) |
| PDF 바이트 가져오기 | not native | pdf.BinaryData |
| PDF 병합 | 기본 내장 아님 — iTextSharp 4.x 또는 유사와 짝지어 사용 | PdfDocument.Merge(pdf1, pdf2) |
PDF Duo의 문서화된 API에서 제공되지 않는 신규 기능들
| 기능 | IronPDF |
|---|---|
| 헤더/푸터 | RenderingOptions.HtmlHeader, HtmlFooter |
| 페이지 번호 | {page}, {total-pages} 자리 표시자 |
| 워터마크 | pdf.ApplyWatermark(html) |
| 암호 보호 | pdf.SecuritySettings |
| 양식 채우기 | pdf.Form.Fields |
| 디지털 서명 | pdf.SignWithFile() |
| 텍스트 추출 | pdf.ExtractAllText() |
| PDF를 이미지로 | pdf.RasterizeToImageFiles() |
코드 마이그레이션 예제
예제 1: HTML에서 PDF로 변환
이전 (PDF Duo):
//PDF Duo .NETis not on NuGet — reference PDFDuo.dll from the vendor download.
using DuoDimension;
using System;
using System.IO;
class Program
{
static void Main()
{
// OpenHTML accepts a file path, URL, or stream; there is no documented
// "convert HTML string" call, so write the markup to a temp file first.
var tempHtml = Path.GetTempFileName() + ".html";
File.WriteAllText(tempHtml, "<h1>Hello World</h1><p>This is a PDF document.</p>");
var conv = new HtmlToPdf();
conv.OpenHTML(tempHtml);
conv.SavePDF("output.pdf");
Console.WriteLine("PDF created successfully!");
}
}
//PDF Duo .NETis not on NuGet — reference PDFDuo.dll from the vendor download.
using DuoDimension;
using System;
using System.IO;
class Program
{
static void Main()
{
// OpenHTML accepts a file path, URL, or stream; there is no documented
// "convert HTML string" call, so write the markup to a temp file first.
var tempHtml = Path.GetTempFileName() + ".html";
File.WriteAllText(tempHtml, "<h1>Hello World</h1><p>This is a PDF document.</p>");
var conv = new HtmlToPdf();
conv.OpenHTML(tempHtml);
conv.SavePDF("output.pdf");
Console.WriteLine("PDF created successfully!");
}
}
Imports DuoDimension
Imports System
Imports System.IO
Module Program
Sub Main()
' OpenHTML accepts a file path, URL, or stream; there is no documented
' "convert HTML string" call, so write the markup to a temp file first.
Dim tempHtml As String = Path.GetTempFileName() & ".html"
File.WriteAllText(tempHtml, "<h1>Hello World</h1><p>This is a PDF document.</p>")
Dim conv As New HtmlToPdf()
conv.OpenHTML(tempHtml)
conv.SavePDF("output.pdf")
Console.WriteLine("PDF created successfully!")
End Sub
End Module
이후 (IronPDF):
// NuGet: Install-Package IronPdf
using IronPdf;
using System;
class Program
{
static void Main()
{
var renderer = new ChromePdfRenderer();
var htmlContent = "<h1>Hello World</h1><p>This is a PDF document.</p>";
var pdf = renderer.RenderHtmlAsPdf(htmlContent);
pdf.SaveAs("output.pdf");
Console.WriteLine("PDF created successfully!");
}
}
// NuGet: Install-Package IronPdf
using IronPdf;
using System;
class Program
{
static void Main()
{
var renderer = new ChromePdfRenderer();
var htmlContent = "<h1>Hello World</h1><p>This is a PDF document.</p>";
var pdf = renderer.RenderHtmlAsPdf(htmlContent);
pdf.SaveAs("output.pdf");
Console.WriteLine("PDF created successfully!");
}
}
Imports IronPdf
Imports System
Class Program
Shared Sub Main()
Dim renderer = New ChromePdfRenderer()
Dim htmlContent = "<h1>Hello World</h1><p>This is a PDF document.</p>"
Dim pdf = renderer.RenderHtmlAsPdf(htmlContent)
pdf.SaveAs("output.pdf")
Console.WriteLine("PDF created successfully!")
End Sub
End Class
여기에서 근본적인 차이는 API 패턴입니다. PDF Duo의 HtmlToPdf.OpenHTML(...)는 파일 경로, URL 또는 스트림을 허용하며 "이 HTML 문자열을 렌더링" 호출을 문서화하지 않으므로 팀은 먼저 마크업을 임시 파일에 쓰고 나서 디스크에 쓰기 위해 SavePDF(path)를 호출합니다. IronPDF의 ChromePdfRenderer.RenderHtmlAsPdf()는 문자열을 직접 렌더링하고 PdfDocument 객체를 반환하며, 이를 SaveAs()로 저장할 수 있습니다.
이 객체 지향 접근법은 추가적인 유연성을 제공합니다: 저장하기 전에 PDF를 조작(워터마크 추가, 문서 병합, 보안 추가, 텍스트 추출 등)할 수 있습니다. 이는 PDF Duo .NET의 문서화된 API에는 없습니다. HTML to PDF 문서에서 추가 렌더링 옵션을 참조하십시오.
예제 2: URL에서 PDF로 변환
이전 (PDF Duo):
//PDF Duo .NETis not on NuGet — reference PDFDuo.dll from the vendor download.
using DuoDimension;
using System;
class Program
{
static void Main()
{
var conv = new HtmlToPdf();
conv.OpenHTML("https://www.example.com");
conv.SavePDF("webpage.pdf");
Console.WriteLine("Webpage converted to PDF!");
}
}
//PDF Duo .NETis not on NuGet — reference PDFDuo.dll from the vendor download.
using DuoDimension;
using System;
class Program
{
static void Main()
{
var conv = new HtmlToPdf();
conv.OpenHTML("https://www.example.com");
conv.SavePDF("webpage.pdf");
Console.WriteLine("Webpage converted to PDF!");
}
}
Imports DuoDimension
Imports System
Module Program
Sub Main()
Dim conv As New HtmlToPdf()
conv.OpenHTML("https://www.example.com")
conv.SavePDF("webpage.pdf")
Console.WriteLine("Webpage converted to PDF!")
End Sub
End Module
이후 (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");
Console.WriteLine("Webpage converted to PDF!");
}
}
// 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");
Console.WriteLine("Webpage converted to PDF!");
}
}
Imports IronPdf
Imports System
Class Program
Shared Sub Main()
Dim renderer = New ChromePdfRenderer()
Dim pdf = renderer.RenderUrlAsPdf("https://www.example.com")
pdf.SaveAs("webpage.pdf")
Console.WriteLine("Webpage converted to PDF!")
End Sub
End Class
PDF Duo는 URL을 DuoDimension.HtmlToPdf에 전달한 다음 SavePDF(path)를 수행하여 URL 변환에 동일한 OpenHTML(...) 클래스를 사용합니다. IronPDF는 전용 RenderUrlAsPdf(url) 메서드를 사용하여 ChromePdfRenderer를 사용하여 PdfDocument 객체를 반환합니다.
주요 이점은 IronPDF의 Chromium 기반 렌더링 엔진이 최신 CSS3 및 JavaScript 지원을 제공한다는 것입니다. 반면, PDF Duo의 벤더 자료는 사용된 HTML/CSS 엔진을 공개하지 않습니다. URL에서 PDF로 변환에 대해 더 알아보세요.
예제 3: PDF 병합
이전 (PDF Duo):
PDF Duo .NET은 네이티브 PDF 병합 API를 제공하지 않습니다. 문서화된 표면은 HTML을 PDF로 변환하는 것만이라, 병합이 필요한 팀은 각 PDF를 PDF Duo로 렌더링한 후, 별도의 라이브러리(2010년대 프로젝트에서는 일반적으로 iTextSharp 4.x)를 사용하여 결합했습니다:
//PDF Duo .NETis not on NuGet — reference PDFDuo.dll from the vendor download.
using DuoDimension;
using System;
class Program
{
static void Main()
{
// Render each source HTML to its own PDF
var conv = new HtmlToPdf();
conv.OpenHTML("page1.html");
conv.SavePDF("document1.pdf");
conv = new HtmlToPdf();
conv.OpenHTML("page2.html");
conv.SavePDF("document2.pdf");
// Merging into a single PDF requires another library (e.g., iTextSharp).
Console.WriteLine("PDF Duo has no native merge — combine output with another library.");
}
}
//PDF Duo .NETis not on NuGet — reference PDFDuo.dll from the vendor download.
using DuoDimension;
using System;
class Program
{
static void Main()
{
// Render each source HTML to its own PDF
var conv = new HtmlToPdf();
conv.OpenHTML("page1.html");
conv.SavePDF("document1.pdf");
conv = new HtmlToPdf();
conv.OpenHTML("page2.html");
conv.SavePDF("document2.pdf");
// Merging into a single PDF requires another library (e.g., iTextSharp).
Console.WriteLine("PDF Duo has no native merge — combine output with another library.");
}
}
Imports DuoDimension
Imports System
Module Program
Sub Main()
' Render each source HTML to its own PDF
Dim conv As New HtmlToPdf()
conv.OpenHTML("page1.html")
conv.SavePDF("document1.pdf")
conv = New HtmlToPdf()
conv.OpenHTML("page2.html")
conv.SavePDF("document2.pdf")
' Merging into a single PDF requires another library (e.g., iTextSharp).
Console.WriteLine("PDF Duo has no native merge — combine output with another library.")
End Sub
End Module
이후 (IronPDF):
// NuGet: Install-Package IronPdf
using IronPdf;
using System;
class Program
{
static void Main()
{
var pdf1 = PdfDocument.FromFile("document1.pdf");
var pdf2 = PdfDocument.FromFile("document2.pdf");
var merged = PdfDocument.Merge(pdf1, pdf2);
merged.SaveAs("merged.pdf");
Console.WriteLine("PDFs merged successfully!");
}
}
// NuGet: Install-Package IronPdf
using IronPdf;
using System;
class Program
{
static void Main()
{
var pdf1 = PdfDocument.FromFile("document1.pdf");
var pdf2 = PdfDocument.FromFile("document2.pdf");
var merged = PdfDocument.Merge(pdf1, pdf2);
merged.SaveAs("merged.pdf");
Console.WriteLine("PDFs merged successfully!");
}
}
Imports IronPdf
Imports System
Class Program
Shared Sub Main()
Dim pdf1 = PdfDocument.FromFile("document1.pdf")
Dim pdf2 = PdfDocument.FromFile("document2.pdf")
Dim merged = PdfDocument.Merge(pdf1, pdf2)
merged.SaveAs("merged.pdf")
Console.WriteLine("PDFs merged successfully!")
End Sub
End Class
이 예는 근본적인 아키텍처 차이를 보여줍니다. PDF Duo .NET에는 병합 API가 전혀 없습니다 — PDF Duo 워크플로우에서의 병합은 전통적으로 iTextSharp 4.x 같은 두 번째 라이브러리와 짝지어 사용을 의미했습니다.
IronPDF는 이를 단일 종속성으로 통합합니다: PdfDocument.FromFile()를 사용하여 각각의 PDF를 PdfDocument로 로드한 다음, PdfDocument.Merge() 정적 메서드를 사용하여 이를 결합합니다. 이것은 SaveAs()로 별도로 저장하는 새로운 PdfDocument 객체를 반환합니다.
IronPDF 접근법은 또한 병합하기 전에 PDF를 조작하고, 병합된 결과에 워터마크를 추가하고, 보안 설정을 적용하는 것을 허용합니다. 여러 파일을 병합하려면 LINQ를 사용할 수 있습니다:
var paths = new[] { "document1.pdf", "document2.pdf", "document3.pdf" };
var pdfs = paths.Select(PdfDocument.FromFile).ToList();
var merged = PdfDocument.Merge(pdfs);
merged.SaveAs("merged.pdf");
var paths = new[] { "document1.pdf", "document2.pdf", "document3.pdf" };
var pdfs = paths.Select(PdfDocument.FromFile).ToList();
var merged = PdfDocument.Merge(pdfs);
merged.SaveAs("merged.pdf");
Dim paths = {"document1.pdf", "document2.pdf", "document3.pdf"}
Dim pdfs = paths.Select(AddressOf PdfDocument.FromFile).ToList()
Dim merged = PdfDocument.Merge(pdfs)
merged.SaveAs("merged.pdf")
PDF 병합 및 분할에 대해 더 알아보세요.
이동 후 새로운 기능
IronPDF로 이동한 후, PDF Duo에서는 제공할 수 없는 기능을 얻을 수 있습니다:
페이지 번호가 있는 헤더 및 푸터
using IronPdf;
var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.HtmlHeader = new HtmlHeaderFooter
{
HtmlFragment = "<div style='text-align:center; font-size:10px;'>Company Report</div>",
MaxHeight = 25
};
renderer.RenderingOptions.HtmlFooter = new HtmlHeaderFooter
{
HtmlFragment = "<div style='text-align:center; font-size:10px;'>Page {page} of {total-pages}</div>",
MaxHeight = 25
};
var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SaveAs("report.pdf");
using IronPdf;
var renderer = new ChromePdfRenderer();
renderer.RenderingOptions.HtmlHeader = new HtmlHeaderFooter
{
HtmlFragment = "<div style='text-align:center; font-size:10px;'>Company Report</div>",
MaxHeight = 25
};
renderer.RenderingOptions.HtmlFooter = new HtmlHeaderFooter
{
HtmlFragment = "<div style='text-align:center; font-size:10px;'>Page {page} of {total-pages}</div>",
MaxHeight = 25
};
var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SaveAs("report.pdf");
Imports IronPdf
Dim renderer As New ChromePdfRenderer()
renderer.RenderingOptions.HtmlHeader = New HtmlHeaderFooter With {
.HtmlFragment = "<div style='text-align:center; font-size:10px;'>Company Report</div>",
.MaxHeight = 25
}
renderer.RenderingOptions.HtmlFooter = New HtmlHeaderFooter With {
.HtmlFragment = "<div style='text-align:center; font-size:10px;'>Page {page} of {total-pages}</div>",
.MaxHeight = 25
}
Dim pdf = renderer.RenderHtmlAsPdf(html)
pdf.SaveAs("report.pdf")
PDF Duo는 머리글이나 바닥글을 지원하지 않으며, 이에 해당하는 기능이 없습니다. IronPDF는 페이지 번호와 같은 동적 콘텐츠에 대한 내장 플레이스홀더를 사용한 전체 HTML/CSS 지원을 제공합니다. 머리글 및 바닥글 가이드를 참조하세요.
워터마크
using IronPdf;
using IronPdf.Editing;
var pdf = PdfDocument.FromFile("document.pdf");
pdf.ApplyWatermark(
"<h1 style='color:red; opacity:0.3;'>CONFIDENTIAL</h1>",
45,
VerticalAlignment.Middle,
HorizontalAlignment.Center);
pdf.SaveAs("watermarked.pdf");
using IronPdf;
using IronPdf.Editing;
var pdf = PdfDocument.FromFile("document.pdf");
pdf.ApplyWatermark(
"<h1 style='color:red; opacity:0.3;'>CONFIDENTIAL</h1>",
45,
VerticalAlignment.Middle,
HorizontalAlignment.Center);
pdf.SaveAs("watermarked.pdf");
Imports IronPdf
Imports IronPdf.Editing
Dim pdf = PdfDocument.FromFile("document.pdf")
pdf.ApplyWatermark("<h1 style='color:red; opacity:0.3;'>CONFIDENTIAL</h1>", 45, VerticalAlignment.Middle, HorizontalAlignment.Center)
pdf.SaveAs("watermarked.pdf")
PDF Duo는 워터마크를 지원하지 않습니다. IronPDF는 전체 CSS 스타일링 지원을 갖춘 HTML 기반의 워터마크를 제공합니다.
비밀번호 보호
var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SecuritySettings.UserPassword = "userpassword";
pdf.SecuritySettings.OwnerPassword = "ownerpassword";
pdf.SecuritySettings.AllowUserPrinting = IronPdf.Security.PdfPrintSecurity.FullPrintRights;
pdf.SaveAs("secured.pdf");
var pdf = renderer.RenderHtmlAsPdf(html);
pdf.SecuritySettings.UserPassword = "userpassword";
pdf.SecuritySettings.OwnerPassword = "ownerpassword";
pdf.SecuritySettings.AllowUserPrinting = IronPdf.Security.PdfPrintSecurity.FullPrintRights;
pdf.SaveAs("secured.pdf");
Dim pdf = renderer.RenderHtmlAsPdf(html)
pdf.SecuritySettings.UserPassword = "userpassword"
pdf.SecuritySettings.OwnerPassword = "ownerpassword"
pdf.SecuritySettings.AllowUserPrinting = IronPdf.Security.PdfPrintSecurity.FullPrintRights
pdf.SaveAs("secured.pdf")
PDF Duo는 비밀번호 보호나 보안 설정을 지원하지 않습니다.
텍스트 추출
var pdf = PdfDocument.FromFile("document.pdf");
string text = pdf.ExtractAllText();
var pdf = PdfDocument.FromFile("document.pdf");
string text = pdf.ExtractAllText();
Dim pdf = PdfDocument.FromFile("document.pdf")
Dim text As String = pdf.ExtractAllText()
PDF Duo는 텍스트 추출을 지원하지 않습니다.
중요한 마이그레이션 노트
PDF Duo의 HtmlToPdf에 페이지 레이아웃 옵션 없음
DuoDimension.HtmlToPdf은 용지 크기, 방향 또는 여백을 다루는 설정 객체를 문서화하지 않습니다. IronPDF는 이들을 RenderingOptions에 명시적으로 노출합니다:
// PDF Duo: no documented per-instance settings — OpenHTML / SavePDF only.
// IronPDF:
renderer.RenderingOptions.PaperSize = PdfPaperSize.A4;
renderer.RenderingOptions.MarginTop = 20;
renderer.RenderingOptions.MarginRight = 15;
renderer.RenderingOptions.MarginBottom = 20;
renderer.RenderingOptions.MarginLeft = 15;
// PDF Duo: no documented per-instance settings — OpenHTML / SavePDF only.
// IronPDF:
renderer.RenderingOptions.PaperSize = PdfPaperSize.A4;
renderer.RenderingOptions.MarginTop = 20;
renderer.RenderingOptions.MarginRight = 15;
renderer.RenderingOptions.MarginBottom = 20;
renderer.RenderingOptions.MarginLeft = 15;
' PDF Duo: no documented per-instance settings — OpenHTML / SavePDF only.
' IronPDF:
renderer.RenderingOptions.PaperSize = PdfPaperSize.A4
renderer.RenderingOptions.MarginTop = 20
renderer.RenderingOptions.MarginRight = 15
renderer.RenderingOptions.MarginBottom = 20
renderer.RenderingOptions.MarginLeft = 15
저장 메서드 명명
파일 쓰기를 위한 다른 메소드 이름:
// PDF Duo:
conv.SavePDF("output.pdf");
// IronPDF:
pdf.SaveAs("output.pdf");
// PDF Duo:
conv.SavePDF("output.pdf");
// IronPDF:
pdf.SaveAs("output.pdf");
' PDF Duo:
conv.SavePDF("output.pdf")
' IronPDF:
pdf.SaveAs("output.pdf")
기존 PDF 로딩
PDF Duo .NET은 PDF를 작성만 합니다 — '기존 PDF를 로드하기' 호출이 문서화되지 않습니다. 기존 PDF를 작업하려면IronPDF(또는 다른 라이브러리)로 이동해야 합니다:
// PDF Duo: no equivalent.
// IronPDF:
var pdf = PdfDocument.FromFile("document.pdf");
// PDF Duo: no equivalent.
// IronPDF:
var pdf = PdfDocument.FromFile("document.pdf");
Imports IronPdf
Dim pdf = PdfDocument.FromFile("document.pdf")
HTML 문자열 입력
PDF Duo의 OpenHTML는 "이 HTML 문자열을 렌더링" 호출을 문서화하지 않습니다; 팀은 마크업을 임시 파일에 먼저 씁니다. IronPDF는 문자열을 직접 렌더링합니다:
// PDF Duo:
File.WriteAllText("temp.html", html);
var conv = new DuoDimension.HtmlToPdf();
conv.OpenHTML("temp.html");
conv.SavePDF("output.pdf");
// IronPDF:
var renderer = new ChromePdfRenderer();
renderer.RenderHtmlAsPdf(html).SaveAs("output.pdf");
// PDF Duo:
File.WriteAllText("temp.html", html);
var conv = new DuoDimension.HtmlToPdf();
conv.OpenHTML("temp.html");
conv.SavePDF("output.pdf");
// IronPDF:
var renderer = new ChromePdfRenderer();
renderer.RenderHtmlAsPdf(html).SaveAs("output.pdf");
' PDF Duo:
File.WriteAllText("temp.html", html)
Dim conv = New DuoDimension.HtmlToPdf()
conv.OpenHTML("temp.html")
conv.SavePDF("output.pdf")
' IronPDF:
Dim renderer = New ChromePdfRenderer()
renderer.RenderHtmlAsPdf(html).SaveAs("output.pdf")
기능 비교
| 기능 | PDF Duo .NET | IronPDF |
|---|---|---|
| HTML to PDF | 예 (엔진 공개하지 않음) | 전체 CSS3, JavaScript |
| URL을 PDF로 변환 | 예 | 인증 지원 포함 |
| PDF 병합 | 문서화된 API에 없음 | 예 |
| 헤더/푸터 | 문서화된 API에 없음 | 전체 HTML 지원 |
| 페이지 번호 | 문서화된 API에 없음 | 내장된 플레이스홀더 |
| 워터마크 | 문서화된 API에 없음 | HTML 기반 |
| 비밀번호 보호 | 문서화된 API에 없음 | 전체 보안 옵션 |
| 폼 채우기 | 문서화된 API에 없음 | 예 |
| 디지털 서명 | 문서화된 API에 없음 | 예 |
| 텍스트 추출 | 문서화된 API에 없음 | 예 |
| PDF를 이미지로 | 문서화된 API에 없음 | 예 |
| 비동기 지원 | 문서화된 API에 없음 | 완전한 async/await |
| .NET Core/5+ | 문서화된 런타임 목록에 없음 | 지원됨 |
마이그레이션 체크리스트
사전 마이그레이션
- 코드베이스에서 모든 PDF Duo 참조 찾기
- 현재 설정(페이지 크기, 여백 등) 문서화
- 사용된 모든 PDF 작업 목록 작성
- 새로운 기능(머리글, 워터마크, 보안) 기회 식별 -IronPDF라이센스 키를 받으세요
패키지 변경 사항
PDFDuo.dll에 대한 프로젝트 참조를 제거하십시오 (PDF Duo .NET은 NuGet에 없습니다) 그리고 공급업체의 바이너리를 삭제하세요IronPdfNuGet Install-Package:dotnet add package IronPdf- 네임스페이스 가져오기를
using DuoDimension;에서using IronPdf;로 업데이트하세요
코드 변경 사항
- 시작 시 라이선스 키 구성 추가
DuoDimension.HtmlToPdf를ChromePdfRenderer로 교체하십시오OpenHTML(path) + SavePDF(path)를RenderHtmlFileAsPdf(path).SaveAs(path)로 교체하십시오- HTML 문자열을 위한 임시 파일 경유 대신
RenderHtmlAsPdf(html).SaveAs(path)를 사용하십시오 OpenHTML(url) + SavePDF(path)을RenderUrlAsPdf(url).SaveAs(path)로 교체하십시오- 외부 병합 단계를
PdfDocument.Merge()로 교체하십시오 - 페이지 크기와 여백을
RenderingOptions를 통해 명시적으로 설정하세요 (PDF Duo에는 해당 없음) SavePDF()을SaveAs()로 교체하십시오- 기존 PDF를 로드하는 워크플로에 대해
PdfDocument.FromFile()을 사용하십시오 (PDF Duo에는 해당 없음)
마이그레이션 이후
- PDF 출력 비교 회귀 테스트 실행
- 페이지 크기와 여백이 일치하는지 확인
- 복잡한 HTML/CSS로 테스트(IronPDF의 현대적 엔진이 더 잘 처리해야 함)
- 새로운 기능 추가(머리글, 바닥글, 워터마크, 보안)
- 문서 업데이트

