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

How to Migrate from Scryber.Core to IronPDF in C#

Migrating from Scryber.Core to IronPDF transforms your PDF generation workflow from a custom XML/HTML parsing engine to a modern Chromium-powered renderer with full CSS3 and JavaScript support. This guide provides a complete, step-by-step migration path that eliminates LGPL licensing concerns, proprietary template syntax, and limited rendering capabilities.

Why Migrate from Scryber.Core to IronPDF

Understanding Scryber.Core

Scryber.Core is an open-source library that transforms HTML templates into PDFs using C#. This capability makes it an attractive tool for developers familiar with web development and HTML. Unlike other PDF solutions that require specific document coding skills, Scryber.Core leverages HTML's versatility and CSS styling capabilities to provide a more intuitive PDF generation approach.

Although Scryber.Core is a viable option for many developers, primarily due to its ideological alignment with open-source principles and the flexibility it offers, it is not without limitations.

Key Reasons to Migrate

  1. LGPL License Concerns: The LGPL license demands that any modifications to the library itself are open-sourced, which can be limiting for some commercial applications
  2. Custom Template Syntax: Proprietary binding syntax requires learning curve
  3. Limited CSS Support: Not a full browser-based renderer
  4. Smaller Community: Less documentation and community examples
  5. No JavaScript Execution: Static rendering only
  6. Complex Configuration: XML-heavy configuration approach
  7. Limited Commercial Support: Scryber.Core is primarily community-supported

Scryber.Core vs IronPDF Comparison

Aspect Scryber.Core IronPDF
License LGPL (restrictive) Commercial
Rendering Engine Custom Chromium
CSS Support Limited Full CSS3
JavaScript No Full ES2024
Template Binding Proprietary XML Standard (Razor, etc.)
Learning Curve Custom syntax Standard HTML/CSS
Async Support Limited Full
Documentation Basic Extensive
Community Support Smaller Large
Commercial Support Limited Professional support included

IronPDF offers enterprise-grade commercial support, extensive documentation, and a larger community compared to Scryber.Core. The library provides more flexible licensing options without LGPL restrictions, making it ideal for commercial applications.

For teams planning .NET 10 and C# 14 adoption through 2025 and 2026, IronPDF's modern Chromium engine provides full compatibility with contemporary web standards.


Before You Start

Prerequisites

  1. .NET Environment: .NET Framework 4.6.2+ or .NET Core 3.1+ / .NET 5/6/7/8/9+
  2. NuGet Access: Ability to install NuGet packages
  3. IronPDF License: Obtain your license key from ironpdf.com

NuGet Package Changes

# Remove Scryber.Core
dotnet remove package Scryber.Core

# Install IronPDF
dotnet add package IronPdf
# Remove Scryber.Core
dotnet remove package Scryber.Core

# Install IronPDF
dotnet add package IronPdf
SHELL

License Configuration

// Add at application startup
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
// Add at application startup
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
$vbLabelText   $csharpLabel

Complete API Reference

Namespace Changes

// Before: Scryber.Core
using Scryber.Components;
using Scryber.Components.Pdf;
using Scryber.PDF;
using Scryber.Styles;
using Scryber.Core;
using Scryber.Core.Html;
using Scryber.Drawing;

// After: IronPDF
using IronPdf;
using IronPdf.Rendering;
// Before: Scryber.Core
using Scryber.Components;
using Scryber.Components.Pdf;
using Scryber.PDF;
using Scryber.Styles;
using Scryber.Core;
using Scryber.Core.Html;
using Scryber.Drawing;

// After: IronPDF
using IronPdf;
using IronPdf.Rendering;
$vbLabelText   $csharpLabel

Core API Mappings

Scryber.Core IronPDF
Document.ParseDocument(html) renderer.RenderHtmlAsPdf(html)
Document.ParseTemplate(path) renderer.RenderHtmlFileAsPdf(path)
doc.SaveAsPDF(path) pdf.SaveAs(path)
doc.SaveAsPDF(stream) pdf.Stream or pdf.BinaryData
doc.Info.Title pdf.MetaData.Title
doc.Info.Author pdf.MetaData.Author
PDFPage pdf.Pages[i]
PDFLayoutDocument RenderingOptions
PDFStyle CSS in HTML
doc.RenderOptions.PaperSize RenderingOptions.PaperSize
Data binding ({{value}}) Razor/String interpolation

Code Migration Examples

Example 1: Basic HTML to PDF Conversion

Before (Scryber.Core):

// NuGet: Install-Package Scryber.Core
using Scryber.Core;
using Scryber.Core.Html;
using System.IO;

class Program
{
    static void Main()
    {
        string html = "<html><body><h1>Hello World</h1><p>This is a PDF document.</p></body></html>";

        using (var doc = Document.ParseDocument(html, ParseSourceType.DynamicContent))
        {
            doc.SaveAsPDF("output.pdf");
        }
    }
}
// NuGet: Install-Package Scryber.Core
using Scryber.Core;
using Scryber.Core.Html;
using System.IO;

class Program
{
    static void Main()
    {
        string html = "<html><body><h1>Hello World</h1><p>This is a PDF document.</p></body></html>";

        using (var doc = Document.ParseDocument(html, ParseSourceType.DynamicContent))
        {
            doc.SaveAsPDF("output.pdf");
        }
    }
}
$vbLabelText   $csharpLabel

After (IronPDF):

// NuGet: Install-Package IronPdf
using IronPdf;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();
        string html = "<html><body><h1>Hello World</h1><p>This is a PDF document.</p></body></html>";

        var pdf = renderer.RenderHtmlAsPdf(html);
        pdf.SaveAs("output.pdf");
    }
}
// NuGet: Install-Package IronPdf
using IronPdf;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();
        string html = "<html><body><h1>Hello World</h1><p>This is a PDF document.</p></body></html>";

        var pdf = renderer.RenderHtmlAsPdf(html);
        pdf.SaveAs("output.pdf");
    }
}
$vbLabelText   $csharpLabel

This example demonstrates the fundamental architectural difference. Scryber.Core uses Document.ParseDocument() with a ParseSourceType.DynamicContent parameter to parse HTML content, requiring a using block for proper disposal. The document is then saved with SaveAsPDF().

IronPDF uses a ChromePdfRenderer instance with RenderHtmlAsPdf() to render HTML directly. The PDF is saved with SaveAs(). No manual disposal is required—IronPDF handles cleanup automatically. See the HTML to PDF documentation for comprehensive examples.

Example 2: URL to PDF Conversion

Before (Scryber.Core):

// NuGet: Install-Package Scryber.Core
using Scryber.Core;
using Scryber.Core.Html;
using System.Net.Http;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        using var client = new HttpClient();
        string html = await client.GetStringAsync("https://www.example.com");

        using (var doc = Document.ParseDocument(html, ParseSourceType.DynamicContent))
        {
            doc.SaveAsPDF("webpage.pdf");
        }
    }
}
// NuGet: Install-Package Scryber.Core
using Scryber.Core;
using Scryber.Core.Html;
using System.Net.Http;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        using var client = new HttpClient();
        string html = await client.GetStringAsync("https://www.example.com");

        using (var doc = Document.ParseDocument(html, ParseSourceType.DynamicContent))
        {
            doc.SaveAsPDF("webpage.pdf");
        }
    }
}
$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

Scryber.Core cannot directly convert URLs to PDF. You must manually fetch the HTML content using HttpClient.GetStringAsync(), then parse the downloaded HTML with Document.ParseDocument(). This approach misses JavaScript execution, dynamic content, and proper CSS resolution because the custom parser doesn't execute scripts.

IronPDF's RenderUrlAsPdf() method handles the entire process in a single call, including full JavaScript execution and CSS rendering with its Chromium engine. Learn more in our tutorials.

Example 3: Custom Page Settings and Margins

Before (Scryber.Core):

// NuGet: Install-Package Scryber.Core
using Scryber.Core;
using Scryber.Core.Html;
using Scryber.Drawing;
using System.IO;

class Program
{
    static void Main()
    {
        string html = "<html><body><h1>Custom PDF</h1><p>With custom margins and settings.</p></body></html>";

        using (var doc = Document.ParseDocument(html, ParseSourceType.DynamicContent))
        {
            doc.RenderOptions.Compression = OutputCompressionType.FlateDecode;
            doc.RenderOptions.PaperSize = PaperSize.A4;
            doc.SaveAsPDF("custom.pdf");
        }
    }
}
// NuGet: Install-Package Scryber.Core
using Scryber.Core;
using Scryber.Core.Html;
using Scryber.Drawing;
using System.IO;

class Program
{
    static void Main()
    {
        string html = "<html><body><h1>Custom PDF</h1><p>With custom margins and settings.</p></body></html>";

        using (var doc = Document.ParseDocument(html, ParseSourceType.DynamicContent))
        {
            doc.RenderOptions.Compression = OutputCompressionType.FlateDecode;
            doc.RenderOptions.PaperSize = PaperSize.A4;
            doc.SaveAsPDF("custom.pdf");
        }
    }
}
$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 = 40;
        renderer.RenderingOptions.MarginBottom = 40;

        string html = "<html><body><h1>Custom PDF</h1><p>With custom margins and settings.</p></body></html>";
        var pdf = renderer.RenderHtmlAsPdf(html);
        pdf.SaveAs("custom.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 = 40;
        renderer.RenderingOptions.MarginBottom = 40;

        string html = "<html><body><h1>Custom PDF</h1><p>With custom margins and settings.</p></body></html>";
        var pdf = renderer.RenderHtmlAsPdf(html);
        pdf.SaveAs("custom.pdf");
    }
}
$vbLabelText   $csharpLabel

Scryber.Core uses doc.RenderOptions to configure output settings like Compression (set to OutputCompressionType.FlateDecode) and PaperSize (set to PaperSize.A4) after parsing the document.

IronPDF uses RenderingOptions on the renderer before rendering. Properties include PaperSize (set to PdfPaperSize.A4), MarginTop, and MarginBottom set in millimeters. The key difference is that IronPDF provides direct margin control through numeric properties, while Scryber.Core uses XML-based styling.


Template Migration Patterns

Migrating Proprietary Binding to Standard Templates

Scryber.Core uses proprietary XML-based binding syntax that must be converted to standard templating:

Scryber.Core Binding:

<pdf:Para text='{{model.Name}}' />
<pdf:Para text='Total: {{model.Total:C}}' />
<pdf:ForEach on='{{model.Items}}'>
    <pdf:Para text='{{.Name}}: {{.Price}}' />
</pdf:ForEach>
<pdf:Para text='{{model.Name}}' />
<pdf:Para text='Total: {{model.Total:C}}' />
<pdf:ForEach on='{{model.Items}}'>
    <pdf:Para text='{{.Name}}: {{.Price}}' />
</pdf:ForEach>
XML

IronPDF with C# String Interpolation:

var items = model.Items.Select(i => $"<li>{i.Name}: {i.Price:C}</li>");

var html = $@"
<p>{model.Name}</p>
<p>Total: {model.Total:C}</p>
<ul>
    {string.Join("", items)}
</ul>";

var renderer = new ChromePdfRenderer();
var pdf = renderer.RenderHtmlAsPdf(html);
var items = model.Items.Select(i => $"<li>{i.Name}: {i.Price:C}</li>");

var html = $@"
<p>{model.Name}</p>
<p>Total: {model.Total:C}</p>
<ul>
    {string.Join("", items)}
</ul>";

var renderer = new ChromePdfRenderer();
var pdf = renderer.RenderHtmlAsPdf(html);
$vbLabelText   $csharpLabel

The key advantage: IronPDF uses standard C# and HTML, so you can use any templating engine (Razor, Handlebars, etc.) rather than learning proprietary syntax.


Headers and Footers Migration

Scryber.Core (XML-based header/footer):

<?xml version='1.0' encoding='utf-8' ?>
<pdf:Document xmlns:pdf='http://www.scryber.co.uk/schemas/core/release/v1/Scryber.Components.xsd'>
    <Pages>
        <pdf:Section>
            <Header>
                <pdf:Para text='Company Report' />
            </Header>
            <Footer>
                <pdf:Para text='Page {{pagenum}} of {{pagetotal}}' />
            </Footer>
            <Content>
                <pdf:H1 text='Content Here' />
            </Content>
        </pdf:Section>
    </Pages>
</pdf:Document>
<?xml version='1.0' encoding='utf-8' ?>
<pdf:Document xmlns:pdf='http://www.scryber.co.uk/schemas/core/release/v1/Scryber.Components.xsd'>
    <Pages>
        <pdf:Section>
            <Header>
                <pdf:Para text='Company Report' />
            </Header>
            <Footer>
                <pdf:Para text='Page {{pagenum}} of {{pagetotal}}' />
            </Footer>
            <Content>
                <pdf:H1 text='Content Here' />
            </Content>
        </pdf:Section>
    </Pages>
</pdf:Document>
XML

IronPDF (HTML headers/footers):

using IronPdf;

var renderer = new ChromePdfRenderer();

// HTML header with full CSS support
renderer.RenderingOptions.HtmlHeader = new HtmlHeaderFooter
{
    HtmlFragment = @"
        <div style='width: 100%; text-align: center; font-size: 12pt; border-bottom: 1px solid #ccc;'>
            Company Report
        </div>",
    MaxHeight = 30
};

// HTML footer with page numbers
renderer.RenderingOptions.HtmlFooter = new HtmlHeaderFooter
{
    HtmlFragment = @"
        <div style='width: 100%; text-align: center; font-size: 10pt;'>
            Page {page} of {total-pages}
        </div>",
    MaxHeight = 25
};

var pdf = renderer.RenderHtmlAsPdf("<h1>Content Here</h1>");
pdf.SaveAs("report.pdf");
using IronPdf;

var renderer = new ChromePdfRenderer();

// HTML header with full CSS support
renderer.RenderingOptions.HtmlHeader = new HtmlHeaderFooter
{
    HtmlFragment = @"
        <div style='width: 100%; text-align: center; font-size: 12pt; border-bottom: 1px solid #ccc;'>
            Company Report
        </div>",
    MaxHeight = 30
};

// HTML footer with page numbers
renderer.RenderingOptions.HtmlFooter = new HtmlHeaderFooter
{
    HtmlFragment = @"
        <div style='width: 100%; text-align: center; font-size: 10pt;'>
            Page {page} of {total-pages}
        </div>",
    MaxHeight = 25
};

var pdf = renderer.RenderHtmlAsPdf("<h1>Content Here</h1>");
pdf.SaveAs("report.pdf");
$vbLabelText   $csharpLabel

Scryber.Core requires XML-based header/footer definition with proprietary placeholders like {{pagenum}} and {{pagetotal}}. IronPDF uses full HTML/CSS for headers and footers with {page} and {total-pages} placeholders.


New Capabilities After Migration

After migrating to IronPDF, you gain capabilities that Scryber.Core cannot provide:

PDF Merging

var pdf1 = PdfDocument.FromFile("chapter1.pdf");
var pdf2 = PdfDocument.FromFile("chapter2.pdf");
var pdf3 = PdfDocument.FromFile("chapter3.pdf");

var merged = PdfDocument.Merge(pdf1, pdf2, pdf3);
merged.SaveAs("complete_book.pdf");
var pdf1 = PdfDocument.FromFile("chapter1.pdf");
var pdf2 = PdfDocument.FromFile("chapter2.pdf");
var pdf3 = PdfDocument.FromFile("chapter3.pdf");

var merged = PdfDocument.Merge(pdf1, pdf2, pdf3);
merged.SaveAs("complete_book.pdf");
$vbLabelText   $csharpLabel

Security and Metadata

var renderer = new ChromePdfRenderer();
var pdf = renderer.RenderHtmlAsPdf("<h1>Confidential</h1>");

// Metadata
pdf.MetaData.Title = "My Document";
pdf.MetaData.Author = "John Doe";
pdf.MetaData.Subject = "Annual Report";
pdf.MetaData.Keywords = "report, annual, confidential";

// Security
pdf.SecuritySettings.OwnerPassword = "owner123";
pdf.SecuritySettings.UserPassword = "user456";
pdf.SecuritySettings.AllowUserCopyPasteContent = false;
pdf.SecuritySettings.AllowUserPrinting = PdfPrintSecurity.FullPrintRights;

pdf.SaveAs("protected.pdf");
var renderer = new ChromePdfRenderer();
var pdf = renderer.RenderHtmlAsPdf("<h1>Confidential</h1>");

// Metadata
pdf.MetaData.Title = "My Document";
pdf.MetaData.Author = "John Doe";
pdf.MetaData.Subject = "Annual Report";
pdf.MetaData.Keywords = "report, annual, confidential";

// Security
pdf.SecuritySettings.OwnerPassword = "owner123";
pdf.SecuritySettings.UserPassword = "user456";
pdf.SecuritySettings.AllowUserCopyPasteContent = false;
pdf.SecuritySettings.AllowUserPrinting = PdfPrintSecurity.FullPrintRights;

pdf.SaveAs("protected.pdf");
$vbLabelText   $csharpLabel

Feature Comparison Summary

Feature Scryber.Core IronPDF
HTML to PDF Basic Full Chromium
URL to PDF Manual fetch Native support
CSS Grid Limited Supported
Flexbox Limited Supported
JavaScript No Full ES2024
Data Binding Proprietary XML Use Razor/Handlebars
Headers/Footers XML-based HTML/CSS
Merge PDFs Limited Built-in
Split PDFs No Yes
Watermarks Basic Full HTML
Digital Signatures No Yes
PDF/A No Yes
Password Protection Basic Full
Async Support Limited Full
Cross-Platform Yes Yes

Migration Checklist

Pre-Migration

  • Audit all Scryber templates for XML/binding patterns
  • Document data binding patterns used ({{model.Property}})
  • Identify custom styles that need CSS conversion
  • Obtain IronPDF license key from ironpdf.com

Code Updates

  • Remove Scryber.Core NuGet package
  • Install IronPdf NuGet package
  • Update namespace imports (using Scryber.Core;using IronPdf;)
  • Replace Document.ParseDocument(html, ParseSourceType.DynamicContent) with renderer.RenderHtmlAsPdf(html)
  • Replace doc.SaveAsPDF() with pdf.SaveAs()
  • Convert XML templates to HTML
  • Replace proprietary binding with standard templating (Razor/string interpolation)
  • Update page settings: doc.RenderOptions.PaperSizerenderer.RenderingOptions.PaperSize
  • Convert headers/footers to HTML format with {page} and {total-pages} placeholders
  • Add license initialization at application startup

Testing

  • Test all document templates
  • Verify styling matches (leverage full CSS support)
  • Test data binding with new templating
  • Verify page breaks
  • Test headers/footers with page number placeholders
  • Performance comparison

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

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

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