跳至页脚内容
视频

如何在 Docker 中使用 IronPDF 引擎 | IronPDF

2025年5月27日,Apryse 收购 TallComponents。 TallPDF.NET 和 PDFKit.NET 的新许可证不再提供,Apryse 将新买家引导至 iText SDK(同样由 Apryse 拥有)。 现有客户继续获得支持,但引擎仅用于维护。 对于当前在TallComponents上运行的团队,规划迁移现在可避免以后被迫转换。

本指南为从TallComponents迁移到IronPDF提供了路径,包括适用于计划过渡的 .NET 开发者的分步说明、API 映射和代码示例。

为什么计划迁移 TallComponents

TallComponents(成立于 2001 年)推出了两个主要的 .NET PDF 产品:PDFKit.NET 用于加载和操作 PDFs,以及 TallPDF.NET 用于以布局为中心的文档生成。 随着 Apryse 收购,新许可证销售已经结束,这改变了依赖该库的团队的规划范围。

今天TallComponents的关键限制

关闭新许可证: Apryse 的TallComponents页面表示不再提供新许可证,并指引新买家使用 iText SDK。 现有许可证持有者将继续获得支持。

仅限XHTML的HTML管道: TallPDF.NET 提供一个 XhtmlParagraph 类,可以解析 XHTML 1.0 Strict / XHTML 1.1 + CSS 2.1。PDFKit.NET 本身没有HTML管道。现代的HTML5 + CSS3 + JavaScript内容不能可靠渲染 — 无内置无头浏览器引擎。

冻结平台目标: TallComponents.PDFKit5 目标为.NET Standard 2.0; 旧版的 TallComponents.PDFKit (4.x) 针对.NET Framework 2.0。尚未发布.NET 8/9 TFM。

仅维护路线图: 随着 Apryse 的开发精力集中在 Apryse SDK 和 iText 上,TallComponents 品牌的包只收到维护更新,没有新的功能路线图。

IronPDF:现代TallComponents的替代品

IronPDF 解决了当前 .NET 堆栈中影响TallComponents用户的核心缺口:

特征 TallComponents IronPDF
当前销售状态 关闭新许可证 (Apryse 于 2025-05-27 收购) 积极出售
HTML 转 PDF 支持 XHTML 1.0/1.1 +CSS 2.1via XhtmlParagraph (TallPDF.NET) 是(使用 Chromium 的 HTML5/CSS3)
HTML 中的 JavaScript 完整的 ES2024
安装 NuGet (TallComponents.PDFKit5, TallComponents.TallPDF5) NuGet (IronPdf)
客户支持 仅限现有客户; 新买家路由到 iText 积极支持和社区
未来投资 仅维护 长期路线图

TallComponents 使用一个 XML/以布局为主导的模型,植根于 .NET 文档生成的早期时代,而IronPDF提供了基于 Chromium 的HTML渲染,符合目前团队构建前端应用程序的方法。

快速入门:TallComponents 到IronPDF的迁移

步骤 1:替换 NuGet 软件包

移除您的项目中引用的TallComponents包。 在 nuget.org 上的实际包ID是 TallComponents.PDFKit5 (或 TallComponents.PDFKit 对于 4.x) 和 TallComponents.TallPDF5 / TallPDF6:

# RemoveTallComponentspackages (whichever your project uses)
dotnet remove package TallComponents.PDFKit5
dotnet remove package TallComponents.TallPDF5
dotnet remove package TallComponents.PDFRasterizer4
# RemoveTallComponentspackages (whichever your project uses)
dotnet remove package TallComponents.PDFKit5
dotnet remove package TallComponents.TallPDF5
dotnet remove package TallComponents.PDFRasterizer4
SHELL

安装 IronPDF:

dotnet add package IronPdf

对于专业框架,IronPDF 提供专用扩展包:

Blazor 服务器:

Install-Package IronPdf.Extensions.Blazor

MAUI:

Install-Package IronPdf.Extensions.Maui

MVC框架:

Install-Package IronPdf.Extensions.Mvc.Framework

步骤 2:更新命名空间

用IronPDF命名空间替换TallComponents命名空间:

// Before (TallComponents — real namespaces)
using TallComponents.PDF;                    // Document, Page (PDFKit.NET)
using TallComponents.PDF.Shapes;             // TextShape, ImageShape (PDFKit)
using TallComponents.PDF.Security;           // PasswordSecurity
using TallComponents.PDF.Layout;             // Document, Section (TallPDF.NET)
using TallComponents.PDF.Layout.Paragraphs;  // TextParagraph, XhtmlParagraph

// After (IronPDF)
using IronPdf;
// Before (TallComponents — real namespaces)
using TallComponents.PDF;                    // Document, Page (PDFKit.NET)
using TallComponents.PDF.Shapes;             // TextShape, ImageShape (PDFKit)
using TallComponents.PDF.Security;           // PasswordSecurity
using TallComponents.PDF.Layout;             // Document, Section (TallPDF.NET)
using TallComponents.PDF.Layout.Paragraphs;  // TextParagraph, XhtmlParagraph

// After (IronPDF)
using IronPdf;
Imports IronPdf

' Before (TallComponents — real namespaces)
' Imports TallComponents.PDF                    ' Document, Page (PDFKit.NET)
' Imports TallComponents.PDF.Shapes             ' TextShape, ImageShape (PDFKit)
' Imports TallComponents.PDF.Security           ' PasswordSecurity
' Imports TallComponents.PDF.Layout             ' Document, Section (TallPDF.NET)
' Imports TallComponents.PDF.Layout.Paragraphs  ' TextParagraph, XhtmlParagraph

' After (IronPDF)
Imports IronPdf
$vbLabelText   $csharpLabel

步骤 3:初始化许可证

在应用程序启动时添加许可证初始化:

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

TallComponents到IronPDFAPI 映射参考

了解TallComponents概念如何映射到IronPDF可以加速迁移过程:

TallComponents IronPDF 备注
Document (TallPDF.NET: 布局) ChromePdfRenderer 创建用于生成 PDF 的呈现器
Document (PDFKit.NET: 操作) PdfDocument 加载/编辑现有的 PDFs
Section 自动翻译 源自HTML结构的章节
TextParagraph HTML 文本元素 使用 <p>, <h1>, <div> 等。
ImageParagraph <img> 标签 标准HTML图像
TableParagraph HTML <table> 标准HTML表格
XhtmlParagraph (XHTML 1.x + CSS 2.1) RenderHtmlAsPdf() (HTML5/CSS3 via Chromium) 现代HTML可以工作
Font CSS font-family 支持的网络字体
document.Write(...) pdf.SaveAs() / pdf.BinaryData 文件或 byte[] 输出
page.Overlay.Add(shape) pdf.ApplyStamp(stamper) 水印 / 覆盖
outputDoc.Pages.Add(page.Clone()) PdfDocument.Merge(...) / pdf.AppendPdf(...) 合并多个 PDF
Document.Security = new PasswordSecurity { ... } pdf.SecuritySettings PDF 安全配置
PageLayout RenderingOptions 页面设置和页边距

代码迁移示例

将HTML转换为PDF

TallComponents 通过 TallPDF.NET 的 XhtmlParagraph 处理HTML,仅解析 XHTML 1.0/1.1 + CSS 2.1。 现代 HTML5、CSS3、弹性盒、网格和JavaScript驱动的内容不在该语法之列:

TallComponents 方法:

// NuGet: Install-Package TallComponents.TallPDF5
// (HTML/XHTML conversion lives in TallPDF.NET, not in PDFKit.NET.)
using TallComponents.PDF.Layout;
using TallComponents.PDF.Layout.Paragraphs;
using System.IO;

class Program
{
    static void Main()
    {
        Document document = new Document();
        Section section = document.Sections.Add();

        // XhtmlParagraph supports XHTML 1.0/1.1 +CSS 2.1only.
        XhtmlParagraph xhtml = new XhtmlParagraph();
        xhtml.Text = "<html><body><h1>Hello World</h1><p>This is a PDF from XHTML.</p></body></html>";
        section.Paragraphs.Add(xhtml);

        using (FileStream fs = new FileStream("output.pdf", FileMode.Create))
        {
            document.Write(fs);
        }
    }
}
// NuGet: Install-Package TallComponents.TallPDF5
// (HTML/XHTML conversion lives in TallPDF.NET, not in PDFKit.NET.)
using TallComponents.PDF.Layout;
using TallComponents.PDF.Layout.Paragraphs;
using System.IO;

class Program
{
    static void Main()
    {
        Document document = new Document();
        Section section = document.Sections.Add();

        // XhtmlParagraph supports XHTML 1.0/1.1 +CSS 2.1only.
        XhtmlParagraph xhtml = new XhtmlParagraph();
        xhtml.Text = "<html><body><h1>Hello World</h1><p>This is a PDF from XHTML.</p></body></html>";
        section.Paragraphs.Add(xhtml);

        using (FileStream fs = new FileStream("output.pdf", FileMode.Create))
        {
            document.Write(fs);
        }
    }
}
Imports TallComponents.PDF.Layout
Imports TallComponents.PDF.Layout.Paragraphs
Imports System.IO

Class Program
    Shared Sub Main()
        Dim document As New Document()
        Dim section As Section = document.Sections.Add()

        ' XhtmlParagraph supports XHTML 1.0/1.1 +CSS 2.1 only.
        Dim xhtml As New XhtmlParagraph()
        xhtml.Text = "<html><body><h1>Hello World</h1><p>This is a PDF from XHTML.</p></body></html>"
        section.Paragraphs.Add(xhtml)

        Using fs As New FileStream("output.pdf", FileMode.Create)
            document.Write(fs)
        End Using
    End Sub
End Class
$vbLabelText   $csharpLabel

IronPDF 方法:

// NuGet: Install-Package IronPdf
using IronPdf;

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

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

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

        var pdf = renderer.RenderHtmlAsPdf(html);
        pdf.SaveAs("output.pdf");
    }
}
Imports IronPdf

Class Program
    Shared Sub Main()
        ' Create a PDF from HTML string
        Dim renderer As New ChromePdfRenderer()
        Dim html As String = "<html><body><h1>Hello World</h1><p>This is a PDF from HTML.</p></body></html>"

        Dim pdf = renderer.RenderHtmlAsPdf(html)
        pdf.SaveAs("output.pdf")
    End Sub
End Class
$vbLabelText   $csharpLabel

IronPDF 的 ChromePdfRenderer 使用真正的 Chromium 引擎,提供完整的 HTML5 和 CSS3 支持。 这意味着您的 PDF 文件将完全呈现在现代浏览器中。 了解更多信息,请参阅 HTML 转 PDF 教程

合并多个 PDF 文件

PDF 合并演示了TallComponents和IronPDF之间的语言差异。

TallComponents 方法:

// NuGet: Install-Package TallComponents.PDFKit5
using TallComponents.PDF;
using System.IO;

class Program
{
    static void Main()
    {
        // Create target document
        Document outputDoc = new Document();

        // Load first PDF and clone each page into the target
        using (FileStream fs1 = new FileStream("document1.pdf", FileMode.Open, FileAccess.Read))
        {
            Document doc1 = new Document(fs1);
            foreach (Page page in doc1.Pages)
            {
                outputDoc.Pages.Add(page.Clone()); // clone is required across documents
            }
        }

        // Load second PDF and append the whole page collection
        using (FileStream fs2 = new FileStream("document2.pdf", FileMode.Open, FileAccess.Read))
        {
            Document doc2 = new Document(fs2);
            outputDoc.Pages.AddRange(doc2.Pages.CloneToArray());
        }

        // Save merged document
        using (FileStream output = new FileStream("merged.pdf", FileMode.Create))
        {
            outputDoc.Write(output);
        }
    }
}
// NuGet: Install-Package TallComponents.PDFKit5
using TallComponents.PDF;
using System.IO;

class Program
{
    static void Main()
    {
        // Create target document
        Document outputDoc = new Document();

        // Load first PDF and clone each page into the target
        using (FileStream fs1 = new FileStream("document1.pdf", FileMode.Open, FileAccess.Read))
        {
            Document doc1 = new Document(fs1);
            foreach (Page page in doc1.Pages)
            {
                outputDoc.Pages.Add(page.Clone()); // clone is required across documents
            }
        }

        // Load second PDF and append the whole page collection
        using (FileStream fs2 = new FileStream("document2.pdf", FileMode.Open, FileAccess.Read))
        {
            Document doc2 = new Document(fs2);
            outputDoc.Pages.AddRange(doc2.Pages.CloneToArray());
        }

        // Save merged document
        using (FileStream output = new FileStream("merged.pdf", FileMode.Create))
        {
            outputDoc.Write(output);
        }
    }
}
Imports TallComponents.PDF
Imports System.IO

Class Program
    Shared Sub Main()
        ' Create target document
        Dim outputDoc As New Document()

        ' Load first PDF and clone each page into the target
        Using fs1 As New FileStream("document1.pdf", FileMode.Open, FileAccess.Read)
            Dim doc1 As New Document(fs1)
            For Each page As Page In doc1.Pages
                outputDoc.Pages.Add(page.Clone()) ' clone is required across documents
            Next
        End Using

        ' Load second PDF and append the whole page collection
        Using fs2 As New FileStream("document2.pdf", FileMode.Open, FileAccess.Read)
            Dim doc2 As New Document(fs2)
            outputDoc.Pages.AddRange(doc2.Pages.CloneToArray())
        End Using

        ' Save merged document
        Using output As New FileStream("merged.pdf", FileMode.Create)
            outputDoc.Write(output)
        End Using
    End Sub
End Class
$vbLabelText   $csharpLabel

IronPDF 方法:

// NuGet: Install-Package IronPdf
using IronPdf;

class Program
{
    static void Main()
    {
        // Load PDFs
        var pdf1 = PdfDocument.FromFile("document1.pdf");
        var pdf2 = PdfDocument.FromFile("document2.pdf");

        // Merge PDFs
        var merged = PdfDocument.Merge(pdf1, pdf2);

        // Save merged document
        merged.SaveAs("merged.pdf");
    }
}
// NuGet: Install-Package IronPdf
using IronPdf;

class Program
{
    static void Main()
    {
        // Load PDFs
        var pdf1 = PdfDocument.FromFile("document1.pdf");
        var pdf2 = PdfDocument.FromFile("document2.pdf");

        // Merge PDFs
        var merged = PdfDocument.Merge(pdf1, pdf2);

        // Save merged document
        merged.SaveAs("merged.pdf");
    }
}
Imports IronPdf

Class Program
    Shared Sub Main()
        ' Load PDFs
        Dim pdf1 = PdfDocument.FromFile("document1.pdf")
        Dim pdf2 = PdfDocument.FromFile("document2.pdf")

        ' Merge PDFs
        Dim merged = PdfDocument.Merge(pdf1, pdf2)

        ' Save merged document
        merged.SaveAs("merged.pdf")
    End Sub
End Class
$vbLabelText   $csharpLabel

TallComponents 版本需要手动进行页面迭代和克隆。IronPDF将其简化为单个 PdfDocument.Merge() 调用。 有关高级合并方案,请参阅 IronPDF合并文档

添加水印

PDF 水印揭示了开发人员体验的另一个显著差异。

TallComponents 方法:

// NuGet: Install-Package TallComponents.PDFKit5
using TallComponents.PDF;
using TallComponents.PDF.Shapes;
using System.IO;
using System.Drawing;

class Program
{
    static void Main()
    {
        // Load existing PDF
        using (FileStream fs = new FileStream("input.pdf", FileMode.Open, FileAccess.Read))
        {
            Document document = new Document(fs);

            foreach (Page page in document.Pages)
            {
                TextShape watermark = new TextShape();
                watermark.Text = "CONFIDENTIAL";
                watermark.Font = new Font("Arial", 60);
                watermark.Pen = new Pen(Color.FromArgb(128, 255, 0, 0));
                watermark.X = 200;
                watermark.Y = 400;
                // Rotation is applied via a transform on PDFKit.NET
                // (TextShape has no Rotate property in the PDFKit API).
                watermark.Transform = new RotateTransform(45);

                page.Overlay.Add(watermark);
            }

            using (FileStream output = new FileStream("watermarked.pdf", FileMode.Create))
            {
                document.Write(output);
            }
        }
    }
}
// NuGet: Install-Package TallComponents.PDFKit5
using TallComponents.PDF;
using TallComponents.PDF.Shapes;
using System.IO;
using System.Drawing;

class Program
{
    static void Main()
    {
        // Load existing PDF
        using (FileStream fs = new FileStream("input.pdf", FileMode.Open, FileAccess.Read))
        {
            Document document = new Document(fs);

            foreach (Page page in document.Pages)
            {
                TextShape watermark = new TextShape();
                watermark.Text = "CONFIDENTIAL";
                watermark.Font = new Font("Arial", 60);
                watermark.Pen = new Pen(Color.FromArgb(128, 255, 0, 0));
                watermark.X = 200;
                watermark.Y = 400;
                // Rotation is applied via a transform on PDFKit.NET
                // (TextShape has no Rotate property in the PDFKit API).
                watermark.Transform = new RotateTransform(45);

                page.Overlay.Add(watermark);
            }

            using (FileStream output = new FileStream("watermarked.pdf", FileMode.Create))
            {
                document.Write(output);
            }
        }
    }
}
Imports TallComponents.PDF
Imports TallComponents.PDF.Shapes
Imports System.IO
Imports System.Drawing

Class Program
    Shared Sub Main()
        ' Load existing PDF
        Using fs As New FileStream("input.pdf", FileMode.Open, FileAccess.Read)
            Dim document As New Document(fs)

            For Each page As Page In document.Pages
                Dim watermark As New TextShape()
                watermark.Text = "CONFIDENTIAL"
                watermark.Font = New Font("Arial", 60)
                watermark.Pen = New Pen(Color.FromArgb(128, 255, 0, 0))
                watermark.X = 200
                watermark.Y = 400
                ' Rotation is applied via a transform on PDFKit.NET
                ' (TextShape has no Rotate property in the PDFKit API).
                watermark.Transform = New RotateTransform(45)

                page.Overlay.Add(watermark)
            Next

            Using output As New FileStream("watermarked.pdf", FileMode.Create)
                document.Write(output)
            End Using
        End Using
    End Sub
End Class
$vbLabelText   $csharpLabel

IronPDF 方法:

// NuGet: Install-Package IronPdf
using IronPdf;
using IronPdf.Editing;

class Program
{
    static void Main()
    {
        // Load existing PDF
        var pdf = PdfDocument.FromFile("input.pdf");

        // Create watermark
        var watermark = new TextStamper()
        {
            Text = "CONFIDENTIAL",
            FontSize = 60,
            Opacity = 50,
            Rotation = 45,
            VerticalAlignment = VerticalAlignment.Middle,
            HorizontalAlignment = HorizontalAlignment.Center
        };

        // Apply watermark to all pages
        pdf.ApplyStamp(watermark);

        // Save watermarked PDF
        pdf.SaveAs("watermarked.pdf");
    }
}
// NuGet: Install-Package IronPdf
using IronPdf;
using IronPdf.Editing;

class Program
{
    static void Main()
    {
        // Load existing PDF
        var pdf = PdfDocument.FromFile("input.pdf");

        // Create watermark
        var watermark = new TextStamper()
        {
            Text = "CONFIDENTIAL",
            FontSize = 60,
            Opacity = 50,
            Rotation = 45,
            VerticalAlignment = VerticalAlignment.Middle,
            HorizontalAlignment = HorizontalAlignment.Center
        };

        // Apply watermark to all pages
        pdf.ApplyStamp(watermark);

        // Save watermarked PDF
        pdf.SaveAs("watermarked.pdf");
    }
}
Imports IronPdf
Imports IronPdf.Editing

Class Program
    Shared Sub Main()
        ' Load existing PDF
        Dim pdf = PdfDocument.FromFile("input.pdf")

        ' Create watermark
        Dim watermark = New TextStamper() With {
            .Text = "CONFIDENTIAL",
            .FontSize = 60,
            .Opacity = 50,
            .Rotation = 45,
            .VerticalAlignment = VerticalAlignment.Middle,
            .HorizontalAlignment = HorizontalAlignment.Center
        }

        ' Apply watermark to all pages
        pdf.ApplyStamp(watermark)

        ' Save watermarked PDF
        pdf.SaveAs("watermarked.pdf")
    End Sub
End Class
$vbLabelText   $csharpLabel

IronPDF 的 TextStamper 类提供直观的对齐选项和自动页面迭代。 印章和水印指南涵盖了其他自定义选项。

数字签名

文档签名对企业应用至关重要。

TallComponents 方法:

using TallComponents.PDF;
using TallComponents.PDF.Signing;
using System.IO;
using System.Security.Cryptography.X509Certificates;

using (FileStream fs = new FileStream("unsigned.pdf", FileMode.Open, FileAccess.Read))
{
    Document document = new Document(fs);

    X509Certificate2 cert = new X509Certificate2("certificate.pfx", "password");
    SignatureField field = new SignatureField("Signature1");
    field.Sign(cert);
    document.Fields.Add(field);

    using (FileStream output = new FileStream("signed.pdf", FileMode.Create))
    {
        document.Write(output);
    }
}
using TallComponents.PDF;
using TallComponents.PDF.Signing;
using System.IO;
using System.Security.Cryptography.X509Certificates;

using (FileStream fs = new FileStream("unsigned.pdf", FileMode.Open, FileAccess.Read))
{
    Document document = new Document(fs);

    X509Certificate2 cert = new X509Certificate2("certificate.pfx", "password");
    SignatureField field = new SignatureField("Signature1");
    field.Sign(cert);
    document.Fields.Add(field);

    using (FileStream output = new FileStream("signed.pdf", FileMode.Create))
    {
        document.Write(output);
    }
}
Imports TallComponents.PDF
Imports TallComponents.PDF.Signing
Imports System.IO
Imports System.Security.Cryptography.X509Certificates

Using fs As New FileStream("unsigned.pdf", FileMode.Open, FileAccess.Read)
    Dim document As New Document(fs)

    Dim cert As New X509Certificate2("certificate.pfx", "password")
    Dim field As New SignatureField("Signature1")
    field.Sign(cert)
    document.Fields.Add(field)

    Using output As New FileStream("signed.pdf", FileMode.Create)
        document.Write(output)
    End Using
End Using
$vbLabelText   $csharpLabel

IronPDF 方法:

using IronPdf;
using IronPdf.Signing;

var pdf = PdfDocument.FromFile("unsigned.pdf");

// Sign with certificate
var signature = new PdfSignature("certificate.pfx", "password")
{
    SigningContact = "support@company.com",
    SigningLocation = "New York",
    SigningReason = "Document Approval"
};

pdf.Sign(signature);
pdf.SaveAs("signed.pdf");
using IronPdf;
using IronPdf.Signing;

var pdf = PdfDocument.FromFile("unsigned.pdf");

// Sign with certificate
var signature = new PdfSignature("certificate.pfx", "password")
{
    SigningContact = "support@company.com",
    SigningLocation = "New York",
    SigningReason = "Document Approval"
};

pdf.Sign(signature);
pdf.SaveAs("signed.pdf");
Imports IronPdf
Imports IronPdf.Signing

Dim pdf = PdfDocument.FromFile("unsigned.pdf")

' Sign with certificate
Dim signature = New PdfSignature("certificate.pfx", "password") With {
    .SigningContact = "support@company.com",
    .SigningLocation = "New York",
    .SigningReason = "Document Approval"
}

pdf.Sign(signature)
pdf.SaveAs("signed.pdf")
$vbLabelText   $csharpLabel

IronPDF 的签名 API 包括联系信息、位置和签名原因的附加元数据属性--这对于审计跟踪非常重要。 探索数字签名文档,了解完整的实施细节。

功能比较:TallComponents 与IronPDF的比较

特征 TallComponents IronPDF
状态 关闭新许可证 (Apryse 于 2025-05-27 收购) 活跃
支持 仅限现有客户 满的
更新 仅维护 定期功能发布
内容创建
HTML 至 PDF XHTML 1.0/1.1 +CSS 2.1(XhtmlParagraph) 通过 Chromium 提供完整的 HTML5/CSS3 支持
URL 至 PDF 是的,针对XHTML URL (XhtmlParagraph.Path)
CSS 支持 CSS 2.1 完整的 CSS3
JavaScript 完整的 ES2024
XML / 布局 DOM 模板 是的 (TallPDF.NET) 不需要 (HTML)
PDF操作
合并 PDF 是 (Pages.Add(page.Clone())) 是 (PdfDocument.Merge)
拆分 PDF
水印 page.Overlay.Add(TextShape) pdf.ApplyStamp(...)
页眉/页脚 布局 DOM HTML/CSS
安全性
密码保护 是 (PasswordSecurity)
数字签名 是 (SignatureField.Sign)
加密 RC4 / AES-128 / AES-256 AES-128 / AES-256
PDF/A PDF/A-1, PDF/A-2, PDF/A-3
平台
目标框架 PDFKit5:.NET Standard 2.0; PDFKit (4.x): .NET Framework 2.0 .NET Framework 4.6.2+, .NET 6/7/8/9
开发
学习曲线 XML / 布局 DOM HTML
文档 冻结于收购时; 新文档转向 Apryse / iText 已维护
社区 安静(没有新销售) 活跃

TallComponents迁移清单

迁移前任务

审核您的代码库,确定所有TallComponents的使用情况:

grep -r "using TallComponents" --include="*.cs" .
grep -rE "XhtmlParagraph|TextParagraph|PasswordSecurity|page\.Overlay" --include="*.cs" .
grep -r "using TallComponents" --include="*.cs" .
grep -rE "XhtmlParagraph|TextParagraph|PasswordSecurity|page\.Overlay" --include="*.cs" .
SHELL

记录现有的 XML/布局模板——这些将被转换为 HTML。 确定当前使用的安全设置,注意密码配置和数字签名实施。

代码更新任务

1.通过 NuGet 删除TallComponents软件包

  1. 安装IronPDF包
  2. 将 XHTML / 布局 DOM 模板转为 HTML5 4.用HTML元素替换章节/段落模型 5.更新表格代码以使用标准HTML表格
  3. 将页眉/页脚转换为HTML,使用 HtmlHeaderFooter
  4. 更新安全设置以使用 pdf.SecuritySettings 8.在启动时添加许可证初始化

页眉和页脚迁移

TallPDF.NET 使用布局 DOM (Section.Header / Section.Footer) 进行页眉。IronPDF提供基于HTML的标题和动态占位符:

renderer.RenderingOptions.HtmlHeader = new HtmlHeaderFooter()
{
    HtmlFragment = "<div style='text-align:center;'>Header Text</div>",
    MaxHeight = 25
};
renderer.RenderingOptions.HtmlFooter = new HtmlHeaderFooter()
{
    HtmlFragment = "<div style='text-align:center;'>Footer Text</div>",
    MaxHeight = 25
};
renderer.RenderingOptions.HtmlHeader = new HtmlHeaderFooter()
{
    HtmlFragment = "<div style='text-align:center;'>Header Text</div>",
    MaxHeight = 25
};
renderer.RenderingOptions.HtmlFooter = new HtmlHeaderFooter()
{
    HtmlFragment = "<div style='text-align:center;'>Footer Text</div>",
    MaxHeight = 25
};
Imports System

renderer.RenderingOptions.HtmlHeader = New HtmlHeaderFooter() With {
    .HtmlFragment = "<div style='text-align:center;'>Header Text</div>",
    .MaxHeight = 25
}
renderer.RenderingOptions.HtmlFooter = New HtmlHeaderFooter() With {
    .HtmlFragment = "<div style='text-align:center;'>Footer Text</div>",
    .MaxHeight = 25
}
$vbLabelText   $csharpLabel

了解有关 IronPDF 中页眉和页脚的更多信息。

测试阶段

1.比较TallComponents和IronPDF版本的可视化输出结果

  1. 测试所有文档模板
  2. 验证 PDF 合并功能
  3. 测试数字签名
  4. 确认应用正确的安全设置

建议迁移时间表

由于TallComponents关闭新许可证且仅提供维护支持,请按您自己的节奏规划迁移,但不要拖延:

第一周:审核代码库并识别所有TallComponents的使用情况
第 2 周: 将 XHTML / 布局模板转换为 HTML5 第三周:更新安全性、合并和签名代码
第 4 周:测试和生产部署

一个堆栈在TallComponents上停留的时间越长,它就越偏离当前的 .NET 目标和当前的 HTML。

请注意Apryse, PDFKit, Tall Components 和 iText为各自所有者的注册商标。 本网站与Apryse, PDFKit, PDFTron,TallComponents或 iText Group 无关联、未获得其认可或赞助。所有产品名称、标识和品牌均为其各自所有者的财产。 比较仅供参考,反映撰写时公开可用的信息。

Curtis Chau
技术作家

Curtis Chau 拥有卡尔顿大学的计算机科学学士学位,专注于前端开发,精通 Node.js、TypeScript、JavaScript 和 React。他热衷于打造直观且美观的用户界面,喜欢使用现代框架并创建结构良好、视觉吸引力强的手册。

除了开发之外,Curtis 对物联网 (IoT) 有浓厚的兴趣,探索将硬件和软件集成的新方法。在空闲时间,他喜欢玩游戏和构建 Discord 机器人,将他对技术的热爱与创造力相结合。

钢铁支援团队

我们每周 5 天,每天 24 小时在线。
聊天
电子邮件
打电话给我