푸터 콘텐츠로 바로가기
MIGRATION GUIDES

How to Migrate from TuesPechkin to IronPDF in C#

TuesPechkin has served as a thread-safe wrapper around the wkhtmltopdf library, helping .NET developers convert HTML to PDF for years. However, the underlying wkhtmltopdf technology was last updated in 2015 and officially abandoned in December 2022. This creates critical security, stability, and rendering limitations that development teams can no longer ignore.

This guide provides a complete migration path from TuesPechkin to IronPDF, with step-by-step instructions, code comparisons, and practical examples for professional .NET developers evaluating this transition.

Why Migrate from TuesPechkin Now

The decision to migrate from TuesPechkin is no longer optional for security-conscious development teams. The underlying wkhtmltopdf library carries critical unpatched vulnerabilities that will never be fixed.

Critical Security Vulnerability: CVE-2022-35583

Attribute Value
CVE ID CVE-2022-35583
Severity CRITICAL (9.8/10)
Attack Vector Network
Status WILL NEVER BE PATCHED
Affected ALL TuesPechkin versions

The wkhtmltopdf maintainers explicitly stated they will NOT fix security vulnerabilities. Every application using TuesPechkin is permanently exposed to Server-Side Request Forgery (SSRF) attacks.

How the Attack Works

When processing user-provided HTML, attackers can inject malicious content:


<iframe src="http://169.254.169.254/latest/meta-data/iam/security-credentials/"></iframe>
<img src="http://internal-admin-panel:8080/api/users?export=all" />

<iframe src="http://169.254.169.254/latest/meta-data/iam/security-credentials/"></iframe>
<img src="http://internal-admin-panel:8080/api/users?export=all" />
HTML

This allows attackers to access AWS/Azure/GCP metadata endpoints, steal internal API data, port scan internal networks, and exfiltrate sensitive configuration.

The Technology Crisis

TuesPechkin wraps wkhtmltopdf, which uses Qt WebKit 4.8—ancient, pre-Chrome era technology. This means:

  • No Flexbox support
  • No CSS Grid support
  • Broken JavaScript execution
  • No ES6+ support

The Stability Crisis

Even with the advertised ThreadSafeConverter, TuesPechkin crashes under high load:

// ❌ TuesPechkin - "ThreadSafeConverter" still crashes
var converter = new TuesPechkin.ThreadSafeConverter(
    new TuesPechkin.RemotingToolset<PechkinBindings>());

// Under high load, you'll see:
// System.AccessViolationException: Attempted to read or write protected memory
// Process terminated unexpectedly
// Converter hangs indefinitely
// ❌ TuesPechkin - "ThreadSafeConverter" still crashes
var converter = new TuesPechkin.ThreadSafeConverter(
    new TuesPechkin.RemotingToolset<PechkinBindings>());

// Under high load, you'll see:
// System.AccessViolationException: Attempted to read or write protected memory
// Process terminated unexpectedly
// Converter hangs indefinitely
$vbLabelText   $csharpLabel

IronPDF vs TuesPechkin: Feature Comparison

Understanding the architectural differences helps technical decision-makers evaluate the migration investment:

Feature TuesPechkin IronPDF
License Free (MIT License) Commercial
Thread Safety Requires Manual Management Native Support
Concurrency Limited, may crash under load Robust, handles high concurrency
Development Inactive, last updated 2015 Active, continuous improvements
Ease of Use Complex setup User-friendly with guides
Documentation Basic Extensive with examples
Security ❌ Critical CVEs ✅ No known vulnerabilities
HTML to PDF ⚠️ Outdated WebKit ✅ Modern Chromium
CSS3 ❌ Partial ✅ Supported
Flexbox/Grid ❌ Not supported ✅ Supported
JavaScript ⚠️ Unreliable ✅ Full ES6+
PDF Manipulation ❌ Not available ✅ Full
Digital Signatures ❌ Not available ✅ Full
PDF/A Compliance ❌ Not available ✅ Full
Form Filling ❌ Not available ✅ Full
Watermarks ❌ Not available ✅ Full
Merge/Split ❌ Not available ✅ Full

Quick Start: TuesPechkin to IronPDF Migration

The migration can begin immediately with these foundational steps.

Step 1: Replace NuGet Packages

Remove all TuesPechkin packages:

# Remove TuesPechkin and all related packages
dotnet remove package TuesPechkin
dotnet remove package TuesPechkin.Wkhtmltox.Win64
dotnet remove package TuesPechkin.Wkhtmltox.Win32
# Remove TuesPechkin and all related packages
dotnet remove package TuesPechkin
dotnet remove package TuesPechkin.Wkhtmltox.Win64
dotnet remove package TuesPechkin.Wkhtmltox.Win32
SHELL

Install IronPDF:

# Install IronPDF
dotnet add package IronPdf
# Install IronPDF
dotnet add package IronPdf
SHELL

Step 2: Remove Native Binaries

Delete these files and folders from your project:

  • wkhtmltox.dll
  • wkhtmltopdf.exe
  • Any wkhtmlto* files
  • TuesPechkin.Wkhtmltox folder

Step 3: Update Namespaces

Replace TuesPechkin namespaces with the IronPdf namespace:

// Before (TuesPechkin)
using TuesPechkin;
using TuesPechkin.Wkhtmltox.Win64;

// After (IronPDF)
using IronPdf;
// Before (TuesPechkin)
using TuesPechkin;
using TuesPechkin.Wkhtmltox.Win64;

// After (IronPDF)
using IronPdf;
$vbLabelText   $csharpLabel

Step 4: Initialize License

Add license initialization at application startup:

IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
$vbLabelText   $csharpLabel

Code Migration Examples

Converting HTML to PDF

The most common use case demonstrates the complexity difference between these .NET PDF libraries.

TuesPechkin Approach:

// NuGet: Install-Package TuesPechkin
using TuesPechkin;
using System.IO;

class Program
{
    static void Main()
    {
        var converter = new StandardConverter(
            new RemotingToolset<PdfToolset>(
                new Win64EmbeddedDeployment(
                    new TempFolderDeployment())));

        string html = "<html><body><h1>Hello World</h1></body></html>";
        byte[] pdfBytes = converter.Convert(new HtmlToPdfDocument
        {
            Objects = { new ObjectSettings { HtmlText = html } }
        });

        File.WriteAllBytes("output.pdf", pdfBytes);
    }
}
// NuGet: Install-Package TuesPechkin
using TuesPechkin;
using System.IO;

class Program
{
    static void Main()
    {
        var converter = new StandardConverter(
            new RemotingToolset<PdfToolset>(
                new Win64EmbeddedDeployment(
                    new TempFolderDeployment())));

        string html = "<html><body><h1>Hello World</h1></body></html>";
        byte[] pdfBytes = converter.Convert(new HtmlToPdfDocument
        {
            Objects = { new ObjectSettings { HtmlText = html } }
        });

        File.WriteAllBytes("output.pdf", pdfBytes);
    }
}
$vbLabelText   $csharpLabel

IronPDF Approach:

// NuGet: Install-Package IronPdf
using IronPdf;
using System;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();

        string html = "<html><body><h1>Hello World</h1></body></html>";
        var pdf = renderer.RenderHtmlAsPdf(html);

        pdf.SaveAs("output.pdf");
    }
}
// NuGet: Install-Package IronPdf
using IronPdf;
using System;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();

        string html = "<html><body><h1>Hello World</h1></body></html>";
        var pdf = renderer.RenderHtmlAsPdf(html);

        pdf.SaveAs("output.pdf");
    }
}
$vbLabelText   $csharpLabel

The TuesPechkin version requires creating a StandardConverter with a complex initialization chain: RemotingToolset, Win64EmbeddedDeployment, and TempFolderDeployment. You must also manually write bytes to a file.

IronPDF eliminates this ceremony entirely. Create a ChromePdfRenderer, render HTML, and save. The code is self-documenting and requires no understanding of deployment toolsets or platform-specific binary management.

For advanced HTML-to-PDF scenarios, see the HTML to PDF conversion guide.

Converting URLs to PDF

URL-to-PDF conversion shows similar complexity differences.

TuesPechkin Approach:

// NuGet: Install-Package TuesPechkin
using TuesPechkin;
using System.IO;

class Program
{
    static void Main()
    {
        var converter = new StandardConverter(
            new RemotingToolset<PdfToolset>(
                new Win64EmbeddedDeployment(
                    new TempFolderDeployment())));

        byte[] pdfBytes = converter.Convert(new HtmlToPdfDocument
        {
            Objects = {
                new ObjectSettings {
                    PageUrl = "https://www.example.com"
                }
            }
        });

        File.WriteAllBytes("webpage.pdf", pdfBytes);
    }
}
// NuGet: Install-Package TuesPechkin
using TuesPechkin;
using System.IO;

class Program
{
    static void Main()
    {
        var converter = new StandardConverter(
            new RemotingToolset<PdfToolset>(
                new Win64EmbeddedDeployment(
                    new TempFolderDeployment())));

        byte[] pdfBytes = converter.Convert(new HtmlToPdfDocument
        {
            Objects = {
                new ObjectSettings {
                    PageUrl = "https://www.example.com"
                }
            }
        });

        File.WriteAllBytes("webpage.pdf", pdfBytes);
    }
}
$vbLabelText   $csharpLabel

IronPDF Approach:

// 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");
    }
}
// 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");
    }
}
$vbLabelText   $csharpLabel

TuesPechkin uses ObjectSettings.PageUrl nested inside an HtmlToPdfDocument. IronPDF provides a dedicated RenderUrlAsPdf method that clearly expresses intent.

Explore the URL to PDF documentation for authentication and custom header options.

Custom Rendering Settings

Page orientation, paper size, and margins require different configuration approaches.

TuesPechkin Approach:

// NuGet: Install-Package TuesPechkin
using TuesPechkin;
using System.IO;

class Program
{
    static void Main()
    {
        var converter = new StandardConverter(
            new RemotingToolset<PdfToolset>(
                new Win64EmbeddedDeployment(
                    new TempFolderDeployment())));

        string html = "<html><body><h1>Custom PDF</h1></body></html>";

        var document = new HtmlToPdfDocument
        {
            GlobalSettings = {
                Orientation = GlobalSettings.PdfOrientation.Landscape,
                PaperSize = GlobalSettings.PdfPaperSize.A4,
                Margins = new MarginSettings { Unit = Unit.Millimeters, Top = 10, Bottom = 10 }
            },
            Objects = {
                new ObjectSettings { HtmlText = html }
            }
        };

        byte[] pdfBytes = converter.Convert(document);
        File.WriteAllBytes("custom.pdf", pdfBytes);
    }
}
// NuGet: Install-Package TuesPechkin
using TuesPechkin;
using System.IO;

class Program
{
    static void Main()
    {
        var converter = new StandardConverter(
            new RemotingToolset<PdfToolset>(
                new Win64EmbeddedDeployment(
                    new TempFolderDeployment())));

        string html = "<html><body><h1>Custom PDF</h1></body></html>";

        var document = new HtmlToPdfDocument
        {
            GlobalSettings = {
                Orientation = GlobalSettings.PdfOrientation.Landscape,
                PaperSize = GlobalSettings.PdfPaperSize.A4,
                Margins = new MarginSettings { Unit = Unit.Millimeters, Top = 10, Bottom = 10 }
            },
            Objects = {
                new ObjectSettings { HtmlText = html }
            }
        };

        byte[] pdfBytes = converter.Convert(document);
        File.WriteAllBytes("custom.pdf", pdfBytes);
    }
}
$vbLabelText   $csharpLabel

IronPDF Approach:

// NuGet: Install-Package IronPdf
using IronPdf;
using IronPdf.Engines.Chrome;
using System;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();

        renderer.RenderingOptions.PaperOrientation = PdfPaperOrientation.Landscape;
        renderer.RenderingOptions.PaperSize = PdfPaperSize.A4;
        renderer.RenderingOptions.MarginTop = 10;
        renderer.RenderingOptions.MarginBottom = 10;

        string html = "<html><body><h1>Custom PDF</h1></body></html>";
        var pdf = renderer.RenderHtmlAsPdf(html);

        pdf.SaveAs("custom.pdf");
    }
}
// NuGet: Install-Package IronPdf
using IronPdf;
using IronPdf.Engines.Chrome;
using System;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();

        renderer.RenderingOptions.PaperOrientation = PdfPaperOrientation.Landscape;
        renderer.RenderingOptions.PaperSize = PdfPaperSize.A4;
        renderer.RenderingOptions.MarginTop = 10;
        renderer.RenderingOptions.MarginBottom = 10;

        string html = "<html><body><h1>Custom PDF</h1></body></html>";
        var pdf = renderer.RenderHtmlAsPdf(html);

        pdf.SaveAs("custom.pdf");
    }
}
$vbLabelText   $csharpLabel

TuesPechkin separates settings into GlobalSettings for document-wide options and ObjectSettings for content. IronPDF consolidates everything into RenderingOptions with clear, discoverable property names.

TuesPechkin API to IronPDF Mapping Reference

This mapping accelerates migration by showing direct API equivalents:

TuesPechkin IronPDF
StandardConverter ChromePdfRenderer
ThreadSafeConverter ChromePdfRenderer
HtmlToPdfDocument Method parameters
GlobalSettings RenderingOptions
ObjectSettings.HtmlText RenderHtmlAsPdf(html)
ObjectSettings.PageUrl RenderUrlAsPdf(url)
GlobalSettings.PaperSize RenderingOptions.PaperSize
GlobalSettings.Orientation RenderingOptions.PaperOrientation
MarginSettings MarginTop, MarginBottom, etc.
[page] placeholder {page} placeholder
[toPage] placeholder {total-pages} placeholder
RemotingToolset Not needed
Win64EmbeddedDeployment Not needed
TempFolderDeployment Not needed

Common Migration Issues and Solutions

Issue 1: Complex Initialization Code

Problem: TuesPechkin requires complex converter setup with deployment toolsets.

Solution: IronPDF is simple:

// Before (TuesPechkin)
var converter = new StandardConverter(
    new RemotingToolset<PdfToolset>(
        new Win64EmbeddedDeployment(
            new TempFolderDeployment())));

// After (IronPDF)
var renderer = new ChromePdfRenderer();
// That's it!
// Before (TuesPechkin)
var converter = new StandardConverter(
    new RemotingToolset<PdfToolset>(
        new Win64EmbeddedDeployment(
            new TempFolderDeployment())));

// After (IronPDF)
var renderer = new ChromePdfRenderer();
// That's it!
$vbLabelText   $csharpLabel

Issue 2: Thread Safety Crashes

Problem: TuesPechkin's ThreadSafeConverter still crashes under high load with AccessViolationException.

Solution: IronPDF has native thread safety—no special configuration required:

// IronPDF is inherently thread-safe
var renderer = new ChromePdfRenderer();
// Use from any thread without crashes
// IronPDF is inherently thread-safe
var renderer = new ChromePdfRenderer();
// Use from any thread without crashes
$vbLabelText   $csharpLabel

Issue 3: Page Number Placeholder Syntax

Problem: TuesPechkin uses [page] and [toPage] placeholders.

Solution: Update to IronPDF's placeholder syntax:

// Before (TuesPechkin)
"Page [page] of [toPage]"

// After (IronPDF)
"Page {page} of {total-pages}"
// Before (TuesPechkin)
"Page [page] of [toPage]"

// After (IronPDF)
"Page {page} of {total-pages}"
$vbLabelText   $csharpLabel

Issue 4: CSS Layout Broken

Problem: Flexbox and Grid layouts don't work in TuesPechkin because wkhtmltopdf uses Qt WebKit 4.8.

Solution: Use proper modern CSS with IronPDF:

// Remove table-based workarounds, use modern CSS
var html = @"
    <div style='display: flex; justify-content: space-between;'>
        <div>Left</div>
        <div>Right</div>
    </div>";

var pdf = renderer.RenderHtmlAsPdf(html);
// Works correctly with Chromium!
// Remove table-based workarounds, use modern CSS
var html = @"
    <div style='display: flex; justify-content: space-between;'>
        <div>Left</div>
        <div>Right</div>
    </div>";

var pdf = renderer.RenderHtmlAsPdf(html);
// Works correctly with Chromium!
$vbLabelText   $csharpLabel

Issue 5: Native Binary Management

Problem: TuesPechkin requires platform-specific wkhtmltopdf binaries and path configuration.

Solution: IronPDF handles all dependencies through NuGet—no native binaries to manage:

# Just install the package
dotnet add package IronPdf
# No wkhtmltopdf binaries needed
# Just install the package
dotnet add package IronPdf
# No wkhtmltopdf binaries needed
SHELL

TuesPechkin Migration Checklist

Pre-Migration Tasks

Audit your codebase to identify all TuesPechkin usage:

grep -r "using TuesPechkin" --include="*.cs" .
grep -r "ThreadSafeConverter\|RemotingToolset" --include="*.cs" .
grep -r "using TuesPechkin" --include="*.cs" .
grep -r "ThreadSafeConverter\|RemotingToolset" --include="*.cs" .
SHELL

Document current GlobalSettings configurations (paper size, orientation, margins). Document ObjectSettings configurations (HTML content, URLs). Identify header/footer implementations for conversion. Locate all wkhtmltopdf binaries for removal.

Code Update Tasks

  1. Remove TuesPechkin NuGet packages
  2. Remove native wkhtmltopdf binaries
  3. Install IronPdf NuGet package
  4. Update using statements from TuesPechkin to IronPdf
  5. Add license key initialization at startup
  6. Replace converters with ChromePdfRenderer
  7. Convert GlobalSettings to RenderingOptions
  8. Convert ObjectSettings to method parameters
  9. Update margin configuration to individual properties
  10. Update header/footer syntax to HTML-based HtmlHeaderFooter
  11. Fix page placeholder syntax ([page]{page})
  12. Remove all deployment/toolset code

Post-Migration Testing

After migration, verify these aspects:

  • Run all unit tests
  • Test thread-safe scenarios (IronPDF handles multi-threading without crashes)
  • Compare PDF output quality (Chromium renders more accurately)
  • Verify CSS rendering (Flexbox and Grid now work)
  • Test JavaScript execution (ES6+ now supported)
  • Test header/footer rendering
  • Performance test batch operations
  • Security scan to verify no wkhtmltopdf binaries remain

Key Benefits of Migrating to IronPDF

Moving from TuesPechkin to IronPDF provides several critical advantages:

Security: CVE-2022-35583 and other wkhtmltopdf vulnerabilities are eliminated. IronPDF's Chromium engine receives regular security updates.

Native Thread Safety: No more complex ThreadSafeConverter configurations. No more AccessViolationException crashes under load. IronPDF handles concurrency automatically.

Modern Rendering Engine: Full CSS3, Flexbox, Grid, and ES6+ JavaScript support. Your PDFs render exactly as content appears in modern browsers.

Simplified Deployment: No platform-specific binaries to manage. No RemotingToolset, Win64EmbeddedDeployment, or TempFolderDeployment ceremony. Just install the NuGet package.

Active Development: As .NET 10 and C# 14 adoption increases through 2026, IronPDF's regular updates ensure compatibility with current and future .NET versions.

Extended Capabilities: TuesPechkin only converts HTML to PDF. IronPDF adds PDF manipulation, digital signatures, PDF/A compliance, form filling, watermarks, and merge/split operations.

커티스 차우
기술 문서 작성자

커티스 차우는 칼턴 대학교에서 컴퓨터 과학 학사 학위를 취득했으며, Node.js, TypeScript, JavaScript, React를 전문으로 하는 프론트엔드 개발자입니다. 직관적이고 미적으로 뛰어난 사용자 인터페이스를 만드는 데 열정을 가진 그는 최신 프레임워크를 활용하고, 잘 구성되고 시각적으로 매력적인 매뉴얼을 제작하는 것을 즐깁니다.

커티스는 개발 분야 외에도 사물 인터넷(IoT)에 깊은 관심을 가지고 있으며, 하드웨어와 소프트웨어를 통합하는 혁신적인 방법을 연구합니다. 여가 시간에는 게임을 즐기거나 디스코드 봇을 만들면서 기술에 대한 애정과 창의성을 결합합니다.