Skip to footer content
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

AttributeValue
CVE IDCVE-2022-35583
SeverityCRITICAL (9.8/10)
Attack VectorNetwork
StatusWILL NEVER BE PATCHED
AffectedALL 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
' ❌ TuesPechkin - "ThreadSafeConverter" still crashes
Dim converter = New TuesPechkin.ThreadSafeConverter(
    New TuesPechkin.RemotingToolset(Of 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:

FeatureTuesPechkinIronPDF
LicenseFree (MIT License)Commercial
Thread SafetyRequires Manual ManagementNative Support
ConcurrencyLimited, may crash under loadRobust, handles high concurrency
DevelopmentInactive, last updated 2015Active, continuous improvements
Ease of UseComplex setupUser-friendly with guides
DocumentationBasicExtensive 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;
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

Step 4: Initialize License

Add license initialization at application startup:

IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
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);
    }
}
IRON VB CONVERTER ERROR developers@ironsoftware.com
$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");
    }
}
IRON VB CONVERTER ERROR developers@ironsoftware.com
$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);
    }
}
IRON VB CONVERTER ERROR developers@ironsoftware.com
$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");
    }
}
IRON VB CONVERTER ERROR developers@ironsoftware.com
$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);
    }
}
IRON VB CONVERTER ERROR developers@ironsoftware.com
$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");
    }
}
IRON VB CONVERTER ERROR developers@ironsoftware.com
$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:

TuesPechkinIronPDF
StandardConverterChromePdfRenderer
ThreadSafeConverterChromePdfRenderer
HtmlToPdfDocumentMethod parameters
GlobalSettingsRenderingOptions
ObjectSettings.HtmlTextRenderHtmlAsPdf(html)
ObjectSettings.PageUrlRenderUrlAsPdf(url)
GlobalSettings.PaperSizeRenderingOptions.PaperSize
GlobalSettings.OrientationRenderingOptions.PaperOrientation
MarginSettingsMarginTop, MarginBottom, etc.
[page] placeholder{page} placeholder
[toPage] placeholder{total-pages} placeholder
RemotingToolsetNot needed
Win64EmbeddedDeploymentNot needed
TempFolderDeploymentNot 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!
IRON VB CONVERTER ERROR developers@ironsoftware.com
$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
' IronPDF is inherently thread-safe
Dim renderer As 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}"
IRON VB CONVERTER ERROR developers@ironsoftware.com
$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!
IRON VB CONVERTER ERROR developers@ironsoftware.com
$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.

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...

Read More