MIGRATION GUIDES How to Migrate from NReco PDF Generator to IronPDF in C# 커티스 차우 게시됨:1월 25, 2026 다운로드 IronPDF NuGet 다운로드 DLL 다운로드 윈도우 설치 프로그램 무료 체험 시작하기 LLM용 사본 LLM용 사본 LLM용 마크다운 형식으로 페이지를 복사하세요 ChatGPT에서 열기 ChatGPT에 이 페이지에 대해 문의하세요 제미니에서 열기 제미니에게 이 페이지에 대해 문의하세요 Grok에서 열기 Grok에게 이 페이지에 대해 문의하세요 혼란 속에서 열기 Perplexity에게 이 페이지에 대해 문의하세요 공유하다 페이스북에 공유하기 트위터에 공유하기 LinkedIn에 공유하기 URL 복사 이메일로 기사 보내기 Why Migrate from NReco PDF Generator to IronPDF Critical Security Issues with NReco PDF Generator NReco PDF Generator wraps the deprecated wkhtmltopdf binary, inheriting all its security vulnerabilities. This is not a theoretical concern—there are 20+ documented CVEs with no patches available since wkhtmltopdf was abandoned in 2020: CVE-2020-21365: Server-side request forgery (SSRF) CVE-2022-35583: Local file read via HTML injection CVE-2022-35580: Remote code execution potential These vulnerabilities cannot be patched because the underlying wkhtmltopdf project is no longer maintained. Additional NReco PDF Generator Limitations Watermarked Free Version: Production use requires a paid license with opaque pricing that requires contacting sales. Deprecated Rendering Engine: WebKit Qt (circa 2012) provides limited modern web support: No CSS Grid or Flexbox No modern JavaScript (ES6+) Poor web font support No CSS variables or custom properties External Binary Dependency: Requires managing wkhtmltopdf binaries per platform (wkhtmltopdf.exe, wkhtmltox.dll). No Active Development: The wrapper receives maintenance without underlying engine updates. Limited Async Support: Synchronous API blocks threads in web applications. NReco PDF Generator vs IronPDF Comparison Aspect NReco PDF Generator IronPDF Rendering Engine WebKit Qt (2012) Chromium (current) Security 20+ CVEs, no patches Active security updates CSS Support CSS2.1, limited CSS3 Full CSS3, Grid, Flexbox JavaScript Basic ES5 Full ES6+, async/await Dependencies External wkhtmltopdf binary Self-contained Async Support Synchronous only Full async/await Web Fonts Limited Full Google Fonts, @font-face Licensing Opaque pricing, contact sales Transparent pricing Free Trial Watermarked Full functionality For teams planning .NET 10 and C# 14 adoption through 2025 and 2026, IronPDF provides a future-proof foundation with active development and modern rendering capabilities. Before You Start Prerequisites .NET Environment: .NET Framework 4.6.2+ or .NET Core 3.1+ / .NET 5/6/7/8/9+ NuGet Access: Ability to install NuGet packages IronPDF License: Obtain your license key from ironpdf.com NuGet Package Changes # Remove NReco.PdfGenerator dotnet remove package NReco.PdfGenerator # Install IronPDF dotnet add package IronPdf # Remove NReco.PdfGenerator dotnet remove package NReco.PdfGenerator # Install IronPDF dotnet add package IronPdf SHELL Also remove wkhtmltopdf binaries from your deployment: Delete wkhtmltopdf.exe, wkhtmltox.dll from project Remove any wkhtmltopdf installation scripts Delete platform-specific binary folders License Configuration // 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"; $vbLabelText $csharpLabel Identify NReco PDF Generator Usage # Find all NReco.PdfGenerator references grep -r "NReco.PdfGenerator\|HtmlToPdfConverter\|GeneratePdf" --include="*.cs" . # Find all NReco.PdfGenerator references grep -r "NReco.PdfGenerator\|HtmlToPdfConverter\|GeneratePdf" --include="*.cs" . SHELL Complete API Reference Core Class Mappings NReco PDF Generator IronPDF HtmlToPdfConverter ChromePdfRenderer PageMargins Individual margin properties PageOrientation PdfPaperOrientation PageSize PdfPaperSize Rendering Method Mappings NReco PDF Generator IronPDF GeneratePdf(html) RenderHtmlAsPdf(html) GeneratePdfFromFile(url, output) RenderUrlAsPdf(url) GeneratePdfFromFile(htmlPath, output) RenderHtmlFileAsPdf(path) (async not supported) RenderHtmlAsPdfAsync(html) (async not supported) RenderUrlAsPdfAsync(url) Page Configuration Mappings NReco PDF Generator IronPDF PageWidth = 210 RenderingOptions.PaperSize = PdfPaperSize.A4 PageHeight = 297 RenderingOptions.SetCustomPaperSizeinMilimeters(w, h) Orientation = PageOrientation.Landscape RenderingOptions.PaperOrientation = PdfPaperOrientation.Landscape Size = PageSize.A4 RenderingOptions.PaperSize = PdfPaperSize.A4 Margin Mappings NReco PDF Generator IronPDF Margins.Top = 10 RenderingOptions.MarginTop = 10 Margins.Bottom = 10 RenderingOptions.MarginBottom = 10 Margins.Left = 10 RenderingOptions.MarginLeft = 10 Margins.Right = 10 RenderingOptions.MarginRight = 10 new PageMargins { ... } Individual properties Header/Footer Placeholder Mappings NReco PDF Generator (wkhtmltopdf) IronPDF [page] {page} [topage] {total-pages} [date] {date} [time] {time} [title] {html-title} Output Handling Mappings NReco PDF Generator IronPDF byte[] pdfBytes = GeneratePdf(html) PdfDocument pdf = RenderHtmlAsPdf(html) File.WriteAllBytes(path, bytes) pdf.SaveAs(path) return pdfBytes return pdf.BinaryData new MemoryStream(pdfBytes) pdf.Stream Code Migration Examples Example 1: Basic HTML to PDF Before (NReco PDF Generator): // NuGet: Install-Package NReco.PdfGenerator using NReco.PdfGenerator; using System.IO; class Program { static void Main() { var htmlToPdf = new HtmlToPdfConverter(); var htmlContent = "<html><body><h1>Hello World</h1><p>This is a PDF document.</p></body></html>"; var pdfBytes = htmlToPdf.GeneratePdf(htmlContent); File.WriteAllBytes("output.pdf", pdfBytes); } } // NuGet: Install-Package NReco.PdfGenerator using NReco.PdfGenerator; using System.IO; class Program { static void Main() { var htmlToPdf = new HtmlToPdfConverter(); var htmlContent = "<html><body><h1>Hello World</h1><p>This is a PDF document.</p></body></html>"; var pdfBytes = htmlToPdf.GeneratePdf(htmlContent); File.WriteAllBytes("output.pdf", pdfBytes); } } $vbLabelText $csharpLabel After (IronPDF): // NuGet: Install-Package IronPdf using IronPdf; using System.IO; class Program { static void Main() { var renderer = new ChromePdfRenderer(); var htmlContent = "<html><body><h1>Hello World</h1><p>This is a PDF document.</p></body></html>"; var pdf = renderer.RenderHtmlAsPdf(htmlContent); pdf.SaveAs("output.pdf"); } } // NuGet: Install-Package IronPdf using IronPdf; using System.IO; class Program { static void Main() { var renderer = new ChromePdfRenderer(); var htmlContent = "<html><body><h1>Hello World</h1><p>This is a PDF document.</p></body></html>"; var pdf = renderer.RenderHtmlAsPdf(htmlContent); pdf.SaveAs("output.pdf"); } } $vbLabelText $csharpLabel The fundamental difference is in the return type and save pattern. NReco PDF Generator's HtmlToPdfConverter.GeneratePdf() returns a byte[] that you must manually write to disk using File.WriteAllBytes(). IronPDF's ChromePdfRenderer.RenderHtmlAsPdf() returns a PdfDocument object with a built-in SaveAs() method. This object-oriented approach provides additional benefits: you can manipulate the PDF (add watermarks, merge documents, add security) before saving. If you need the raw bytes for compatibility with existing code, use pdf.BinaryData. See the HTML to PDF documentation for additional rendering options. Example 2: Custom Page Size with Margins Before (NReco PDF Generator): // NuGet: Install-Package NReco.PdfGenerator using NReco.PdfGenerator; using System.IO; class Program { static void Main() { var htmlToPdf = new HtmlToPdfConverter(); htmlToPdf.PageWidth = 210; htmlToPdf.PageHeight = 297; htmlToPdf.Margins = new PageMargins { Top = 10, Bottom = 10, Left = 10, Right = 10 }; var htmlContent = "<html><body><h1>Custom Page Size</h1><p>A4 size document with margins.</p></body></html>"; var pdfBytes = htmlToPdf.GeneratePdf(htmlContent); File.WriteAllBytes("custom-size.pdf", pdfBytes); } } // NuGet: Install-Package NReco.PdfGenerator using NReco.PdfGenerator; using System.IO; class Program { static void Main() { var htmlToPdf = new HtmlToPdfConverter(); htmlToPdf.PageWidth = 210; htmlToPdf.PageHeight = 297; htmlToPdf.Margins = new PageMargins { Top = 10, Bottom = 10, Left = 10, Right = 10 }; var htmlContent = "<html><body><h1>Custom Page Size</h1><p>A4 size document with margins.</p></body></html>"; var pdfBytes = htmlToPdf.GeneratePdf(htmlContent); File.WriteAllBytes("custom-size.pdf", pdfBytes); } } $vbLabelText $csharpLabel After (IronPDF): // NuGet: Install-Package IronPdf using IronPdf; using IronPdf.Rendering; class Program { static void Main() { var renderer = new ChromePdfRenderer(); renderer.RenderingOptions.PaperSize = PdfPaperSize.A4; renderer.RenderingOptions.MarginTop = 10; renderer.RenderingOptions.MarginBottom = 10; renderer.RenderingOptions.MarginLeft = 10; renderer.RenderingOptions.MarginRight = 10; var htmlContent = "<html><body><h1>Custom Page Size</h1><p>A4 size document with margins.</p></body></html>"; var pdf = renderer.RenderHtmlAsPdf(htmlContent); pdf.SaveAs("custom-size.pdf"); } } // NuGet: Install-Package IronPdf using IronPdf; using IronPdf.Rendering; class Program { static void Main() { var renderer = new ChromePdfRenderer(); renderer.RenderingOptions.PaperSize = PdfPaperSize.A4; renderer.RenderingOptions.MarginTop = 10; renderer.RenderingOptions.MarginBottom = 10; renderer.RenderingOptions.MarginLeft = 10; renderer.RenderingOptions.MarginRight = 10; var htmlContent = "<html><body><h1>Custom Page Size</h1><p>A4 size document with margins.</p></body></html>"; var pdf = renderer.RenderHtmlAsPdf(htmlContent); pdf.SaveAs("custom-size.pdf"); } } $vbLabelText $csharpLabel NReco PDF Generator uses numeric dimensions (PageWidth = 210, PageHeight = 297) and a PageMargins object. IronPDF uses the PdfPaperSize enum (which includes standard sizes like A4, Letter, Legal) and individual margin properties on the RenderingOptions object. The key migration changes: PageWidth/PageHeight → RenderingOptions.PaperSize = PdfPaperSize.A4 new PageMargins { Top = 10, ... } → Individual properties: RenderingOptions.MarginTop = 10 For custom paper sizes not covered by the enum, use RenderingOptions.SetCustomPaperSizeinMilimeters(width, height). Learn more about page configuration options. Example 3: URL to PDF Conversion Before (NReco PDF Generator): // NuGet: Install-Package NReco.PdfGenerator using NReco.PdfGenerator; using System.IO; class Program { static void Main() { var htmlToPdf = new HtmlToPdfConverter(); var pdfBytes = htmlToPdf.GeneratePdfFromFile("https://www.example.com", null); File.WriteAllBytes("webpage.pdf", pdfBytes); } } // NuGet: Install-Package NReco.PdfGenerator using NReco.PdfGenerator; using System.IO; class Program { static void Main() { var htmlToPdf = new HtmlToPdfConverter(); var pdfBytes = htmlToPdf.GeneratePdfFromFile("https://www.example.com", null); File.WriteAllBytes("webpage.pdf", pdfBytes); } } $vbLabelText $csharpLabel After (IronPDF): // NuGet: Install-Package IronPdf using IronPdf; class Program { static void Main() { var renderer = new ChromePdfRenderer(); var pdf = renderer.RenderUrlAsPdf("https://www.example.com"); pdf.SaveAs("webpage.pdf"); } } // NuGet: Install-Package IronPdf using IronPdf; class Program { static void Main() { var renderer = new ChromePdfRenderer(); var pdf = renderer.RenderUrlAsPdf("https://www.example.com"); pdf.SaveAs("webpage.pdf"); } } $vbLabelText $csharpLabel NReco PDF Generator uses the confusingly named GeneratePdfFromFile() method for both local files and URLs, with a nullable second parameter. IronPDF provides dedicated methods: RenderUrlAsPdf() for URLs and RenderHtmlFileAsPdf() for local HTML files. The IronPDF approach is cleaner and more intuitive. For async web applications, use await renderer.RenderUrlAsPdfAsync(url) to avoid blocking threads—something NReco PDF Generator simply cannot do. Critical Migration Notes Zoom Value Conversion NReco PDF Generator uses float values (0.0-2.0), while IronPDF uses percentage integers: // NReco PDF Generator: Zoom = 0.9f (90%) // IronPDF: Zoom = 90 // Conversion formula: int ironPdfZoom = (int)(nrecoZoom * 100); // NReco PDF Generator: Zoom = 0.9f (90%) // IronPDF: Zoom = 90 // Conversion formula: int ironPdfZoom = (int)(nrecoZoom * 100); $vbLabelText $csharpLabel Placeholder Syntax Update All header/footer placeholders must be updated: NReco PDF Generator IronPDF [page] {page} [topage] {total-pages} [date] {date} [title] {html-title} // NReco PDF Generator: converter.PageFooterHtml = "<div>Page [page] of [topage]</div>"; // IronPDF: renderer.RenderingOptions.HtmlFooter = new HtmlHeaderFooter { HtmlFragment = "<div>Page {page} of {total-pages}</div>", MaxHeight = 20 }; // NReco PDF Generator: converter.PageFooterHtml = "<div>Page [page] of [topage]</div>"; // IronPDF: renderer.RenderingOptions.HtmlFooter = new HtmlHeaderFooter { HtmlFragment = "<div>Page {page} of {total-pages}</div>", MaxHeight = 20 }; $vbLabelText $csharpLabel Return Type Change NReco PDF Generator returns byte[] directly; IronPDF returns PdfDocument: // NReco PDF Generator pattern: byte[] pdfBytes = converter.GeneratePdf(html); File.WriteAllBytes("output.pdf", pdfBytes); // IronPDF pattern: var pdf = renderer.RenderHtmlAsPdf(html); pdf.SaveAs("output.pdf"); // Or if you need bytes: byte[] pdfBytes = renderer.RenderHtmlAsPdf(html).BinaryData; // NReco PDF Generator pattern: byte[] pdfBytes = converter.GeneratePdf(html); File.WriteAllBytes("output.pdf", pdfBytes); // IronPDF pattern: var pdf = renderer.RenderHtmlAsPdf(html); pdf.SaveAs("output.pdf"); // Or if you need bytes: byte[] pdfBytes = renderer.RenderHtmlAsPdf(html).BinaryData; $vbLabelText $csharpLabel Thread Safety and Reusability NReco PDF Generator typically creates a new converter per call. IronPDF's ChromePdfRenderer is thread-safe and can be reused: // NReco PDF Generator pattern (creates new each time): public byte[] Generate(string html) { var converter = new HtmlToPdfConverter(); return converter.GeneratePdf(html); } // IronPDF pattern (reuse renderer, thread-safe): private readonly ChromePdfRenderer _renderer = new ChromePdfRenderer(); public byte[] Generate(string html) { return _renderer.RenderHtmlAsPdf(html).BinaryData; } // NReco PDF Generator pattern (creates new each time): public byte[] Generate(string html) { var converter = new HtmlToPdfConverter(); return converter.GeneratePdf(html); } // IronPDF pattern (reuse renderer, thread-safe): private readonly ChromePdfRenderer _renderer = new ChromePdfRenderer(); public byte[] Generate(string html) { return _renderer.RenderHtmlAsPdf(html).BinaryData; } $vbLabelText $csharpLabel Async Support (New Capability) IronPDF supports async/await patterns that NReco PDF Generator cannot provide: // NReco PDF Generator: No async support available // IronPDF: Full async support public async Task<byte[]> GenerateAsync(string html) { var pdf = await _renderer.RenderHtmlAsPdfAsync(html); return pdf.BinaryData; } // NReco PDF Generator: No async support available // IronPDF: Full async support public async Task<byte[]> GenerateAsync(string html) { var pdf = await _renderer.RenderHtmlAsPdfAsync(html); return pdf.BinaryData; } $vbLabelText $csharpLabel Troubleshooting Issue 1: HtmlToPdfConverter Not Found Problem: HtmlToPdfConverter class doesn't exist in IronPDF. Solution: Use ChromePdfRenderer: // NReco PDF Generator var converter = new HtmlToPdfConverter(); // IronPDF var renderer = new ChromePdfRenderer(); // NReco PDF Generator var converter = new HtmlToPdfConverter(); // IronPDF var renderer = new ChromePdfRenderer(); $vbLabelText $csharpLabel Issue 2: GeneratePdf Returns Wrong Type Problem: Code expects byte[] but gets PdfDocument. Solution: Access .BinaryData property: // NReco PDF Generator byte[] pdfBytes = converter.GeneratePdf(html); // IronPDF byte[] pdfBytes = renderer.RenderHtmlAsPdf(html).BinaryData; // NReco PDF Generator byte[] pdfBytes = converter.GeneratePdf(html); // IronPDF byte[] pdfBytes = renderer.RenderHtmlAsPdf(html).BinaryData; $vbLabelText $csharpLabel Issue 3: PageMargins Object Not Found Problem: PageMargins class doesn't exist in IronPDF. Solution: Use individual margin properties: // NReco PDF Generator converter.Margins = new PageMargins { Top = 10, Bottom = 10, Left = 10, Right = 10 }; // IronPDF renderer.RenderingOptions.MarginTop = 10; renderer.RenderingOptions.MarginBottom = 10; renderer.RenderingOptions.MarginLeft = 10; renderer.RenderingOptions.MarginRight = 10; // NReco PDF Generator converter.Margins = new PageMargins { Top = 10, Bottom = 10, Left = 10, Right = 10 }; // IronPDF renderer.RenderingOptions.MarginTop = 10; renderer.RenderingOptions.MarginBottom = 10; renderer.RenderingOptions.MarginLeft = 10; renderer.RenderingOptions.MarginRight = 10; $vbLabelText $csharpLabel Issue 4: Page Numbers Not Appearing Problem: [page] and [topage] placeholders don't work. Solution: Update to IronPDF placeholder syntax: // NReco PDF Generator converter.PageFooterHtml = "<div>Page [page] of [topage]</div>"; // IronPDF renderer.RenderingOptions.HtmlFooter = new HtmlHeaderFooter { HtmlFragment = "<div>Page {page} of {total-pages}</div>", MaxHeight = 20 }; // NReco PDF Generator converter.PageFooterHtml = "<div>Page [page] of [topage]</div>"; // IronPDF renderer.RenderingOptions.HtmlFooter = new HtmlHeaderFooter { HtmlFragment = "<div>Page {page} of {total-pages}</div>", MaxHeight = 20 }; $vbLabelText $csharpLabel Migration Checklist Pre-Migration Inventory all NReco.PdfGenerator usages in codebase Document all CustomWkHtmlArgs and CustomWkHtmlPageArgs values List all header/footer HTML templates with placeholders Identify async requirements (web controllers, services) Review zoom and margin settings Backup existing PDF outputs for comparison Obtain IronPDF license key Package Changes Remove NReco.PdfGenerator NuGet package Install IronPdf NuGet package: dotnet add package IronPdf Update namespace imports from using NReco.PdfGenerator; to using IronPdf; Code Changes Add license key configuration at startup Replace HtmlToPdfConverter with ChromePdfRenderer Replace GeneratePdf(html) with RenderHtmlAsPdf(html) Replace GeneratePdfFromFile(url, null) with RenderUrlAsPdf(url) Convert PageMargins object to individual margin properties Update zoom values from float to percentage Update placeholder syntax: [page] → {page}, [topage] → {total-pages} Replace File.WriteAllBytes() with pdf.SaveAs() Convert sync calls to async where beneficial Post-Migration Remove wkhtmltopdf binaries from project/deployment Update Docker files to remove wkhtmltopdf installation Run regression tests comparing PDF output Verify header/footer placeholders render correctly Test on all target platforms (Windows, Linux, macOS) Update CI/CD pipeline to remove wkhtmltopdf steps Update security scanning to confirm CVE removal 커티스 차우 지금 바로 엔지니어링 팀과 채팅하세요 기술 문서 작성자 커티스 차우는 칼턴 대학교에서 컴퓨터 과학 학사 학위를 취득했으며, Node.js, TypeScript, JavaScript, React를 전문으로 하는 프론트엔드 개발자입니다. 직관적이고 미적으로 뛰어난 사용자 인터페이스를 만드는 데 열정을 가진 그는 최신 프레임워크를 활용하고, 잘 구성되고 시각적으로 매력적인 매뉴얼을 제작하는 것을 즐깁니다. 커티스는 개발 분야 외에도 사물 인터넷(IoT)에 깊은 관심을 가지고 있으며, 하드웨어와 소프트웨어를 통합하는 혁신적인 방법을 연구합니다. 여가 시간에는 게임을 즐기거나 디스코드 봇을 만들면서 기술에 대한 애정과 창의성을 결합합니다. 관련 기사 게시됨 2월 1, 2026 How to Migrate from ZetPDF to IronPDF in C# Master the migration from ZetPDF to IronPDF with this complete C# guide. Switch from a coordinate-based library to a modern HTML-to-PDF solution. Includes code examples for HTML conversion, merging PDFs, and removing PDFSharp dependencies. 더 읽어보기 게시됨 2월 1, 2026 How to Migrate from Scryber.Core to IronPDF in C# Master the migration from Scryber.Core to IronPDF with this complete C# guide. Switch from custom XML/HTML parsing to a modern Chromium renderer. Includes code examples for HTML conversion, URL rendering, and replacing proprietary bindings. 더 읽어보기 게시됨 2월 1, 2026 How to Migrate from XFINIUM.PDF to IronPDF in C# Master the migration from XFINIUM.PDF to IronPDF with this complete C# guide. Switch from manual coordinate-based positioning to declarative HTML/CSS rendering. Includes code examples for replacing graphics primitives and automatic layout. 더 읽어보기 How to Migrate from Nutrient.io to IronPDF in C#How to Migrate from MuPDF to IronPD...
게시됨 2월 1, 2026 How to Migrate from ZetPDF to IronPDF in C# Master the migration from ZetPDF to IronPDF with this complete C# guide. Switch from a coordinate-based library to a modern HTML-to-PDF solution. Includes code examples for HTML conversion, merging PDFs, and removing PDFSharp dependencies. 더 읽어보기
게시됨 2월 1, 2026 How to Migrate from Scryber.Core to IronPDF in C# Master the migration from Scryber.Core to IronPDF with this complete C# guide. Switch from custom XML/HTML parsing to a modern Chromium renderer. Includes code examples for HTML conversion, URL rendering, and replacing proprietary bindings. 더 읽어보기
게시됨 2월 1, 2026 How to Migrate from XFINIUM.PDF to IronPDF in C# Master the migration from XFINIUM.PDF to IronPDF with this complete C# guide. Switch from manual coordinate-based positioning to declarative HTML/CSS rendering. Includes code examples for replacing graphics primitives and automatic layout. 더 읽어보기