MIGRATION GUIDES How to Migrate from TallComponents to IronPDF in C# Curtis Chau 發表日期:2026年2月1日 下載 IronPDF NuGet 下載 DLL 下載 Windows 安裝程式 開始免費試用 法學碩士副本 法學碩士副本 將頁面複製為 Markdown 格式,用於 LLMs 在 ChatGPT 中打開 請向 ChatGPT 諮詢此頁面 在雙子座打開 請向 Gemini 詢問此頁面 在 Grok 中打開 向 Grok 詢問此頁面 打開困惑 向 Perplexity 詢問有關此頁面的信息 分享 在 Facebook 上分享 分享到 X(Twitter) 在 LinkedIn 上分享 複製連結 電子郵件文章 Apryse 收購 高組件 後,.NET PDF 領域發生了重大變化。 由於 高組件 不再提供新許可證,現有用戶也被重定向到 iText SDK,使用 TallPDF 和 PDFKit 的開發人員面臨著一個不可避免的決定:現在遷移,否則就有可能在 2026 年及以後繼續運行不受支援的軟體,並且存在已知的渲染錯誤。 本指南提供了從 高組件 到 IronPDF 的完整遷移路徑,包括逐步說明、API 映射和實際程式碼範例,以幫助專業的 .NET 開發人員有效地進行過渡。 為什麼 高組件 遷移現在是強制性的 TallComponents 曾經是 C# PDF 生成領域備受尊敬的品牌。 該程式庫提供了基於 XML 的文檔工作流程和程序化的 PDF 操作。 然而,Apryse 的收購終止了新的許可證銷售,從根本上改變了開發團隊的考慮。 關鍵高組件限制 遷移的決定不僅僅是供應商支援的問題——TallComponents 背負著巨大的技術債: 產品停產:自 Apryse 被收購以來,不再提供新的授權。 高組件 官方網站明確表示,新的授權銷售已經停止,並建議潛在用戶改用 iText SDK。 不支援 HTML 轉 PDF:與現代 PDF 庫不同,TallComponents 不支援直接將 HTML 轉換為 PDF。 支援平台上的開發者已經證實了這個限制,並指出 Pechkin 等第三方解決方案可以作為替代方案。 已記錄的渲染錯誤:變更日誌揭示了大量的渲染問題,包括空白頁面渲染、圖形缺失、JPEG 影像處理不可靠以及字體顯示不正確。 這些漏洞在停產前從未解決。 不提供支援或更新:如果沒有積極的維護,任何安全漏洞或與 .NET 10 和 C# 14 的兼容性問題都將無法解決。 IronPDF:現代化的 高組件 替代方案 IronPDF解決了TallComponents在現代開發工作流程中存在的核心限制: 特徵 高組件 IronPDF 目前銷售狀態 已停止銷售 積極開發和銷售 HTML 轉 PDF 支持 不 是的(HTML5/CSS3,基於 Chromium 核心) 渲染保真度 已知錯誤和問題 久經考驗的可靠性 安裝 複雜、手動 使用 NuGet 很簡單 客戶支援 過渡到 iText SDK 積極支持和社區 未來可用性 生命終點 長期生存能力 對比非常鮮明:TallComponents 提供了一種基於 XML 的方法,這是 .NET 開發的另一個時代的做法,而 IronPDF 則提供了基於 Chromium 的 HTML 渲染,這與當今開發人員構建應用程式的方式相一致。 快速入門:TallComponents 到 IronPDF 的遷移 步驟 1:替換 NuGet 套件 從專案中移除所有 高組件 套件: # Remove 高組件 packages dotnet remove package TallComponents.PDF.Kit dotnet remove package TallComponents.PDF.Layout dotnet remove package TallComponents.PDF.Layout.Drawing # Remove 高組件 packages dotnet remove package TallComponents.PDF.Kit dotnet remove package TallComponents.PDF.Layout dotnet remove package TallComponents.PDF.Layout.Drawing SHELL 安裝 IronPDF: # Install IronPDF dotnet add package IronPdf # Install IronPDF dotnet add package IronPdf SHELL 針對特定框架,IronPDF 提供專用的擴充包: Blazor 伺服器: PM > Install-Package IronPdf.Extensions.Blazor PM > Install-Package IronPdf.Extensions.Blazor SHELL 毛伊島: PM > Install-Package IronPdf.Extensions.Maui PM > Install-Package IronPdf.Extensions.Maui SHELL MVC框架: PM > Install-Package IronPdf.Extensions.Mvc.Framework PM > Install-Package IronPdf.Extensions.Mvc.Framework SHELL 步驟 2:更新命名空間 將 高組件 命名空間替換為 IronPdf 命名空間: // Before (TallComponents) using TallComponents.PDF.Kit; using TallComponents.PDF.Layout; using TallComponents.PDF.Layout.Drawing; using TallComponents.PDF.Layout.Paragraphs; // After (IronPDF) using IronPdf; // Before (TallComponents) using TallComponents.PDF.Kit; using TallComponents.PDF.Layout; using TallComponents.PDF.Layout.Drawing; using TallComponents.PDF.Layout.Paragraphs; // After (IronPDF) using IronPdf; $vbLabelText $csharpLabel 步驟 3:初始化您的許可證 在應用程式啟動時新增許可證初始化: IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY"; IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY"; $vbLabelText $csharpLabel 高組件 到 IronPDF API 映射參考 了解 高組件 的概念如何映射到 IronPDF 可以加速遷移過程: 高組件 IronPDF 筆記 Document ChromePdfRenderer 建立用於生成 PDF 的渲染器 Section 自動的 源自 HTML 結構的章節 TextParagraph HTML 文字元素 使用<p>,<h1> ,<div> , ETC。 ImageParagraph <img>標籤 標準 HTML 圖片 TableParagraph HTML<table> 標準 HTML 表格 Font CSS font-family 完全支援 Web 字體 document.Write() pdf.SaveAs() 儲存到文件 document.Write(stream) pdf.BinaryData或pdf.Stream 流輸出 Page.Canvas HTML/CSS渲染 無需手動操作畫布 XmlDocument.Generate() RenderHtmlAsPdf() HTML取代了XML PdfKit.Merger.Merge() PdfDocument.Merge() 合併多個PDF文件 Document.Security pdf.SecuritySettings PDF 安全性配置 PageLayout RenderingOptions 頁面設定和邊距 程式碼遷移範例 將 HTML 轉換為 PDF TallComponents 缺乏原生 HTML 轉 PDF 支援。 這種變通方法是從文字建立片段,但實際上並不會渲染 HTML: 高組件方法: // NuGet: Install-Package TallComponents.PDF.Kit using TallComponents.PDF.Kit; using System.IO; class Program { static void Main() { // Create a new document using (Document document = new Document()) { string html = "<html><body><h1>Hello World</h1><p>This is a PDF from HTML.</p></body></html>"; // Create HTML fragment Fragment fragment = Fragment.FromText(html); // Add to document Section section = document.Sections.Add(); section.Fragments.Add(fragment); // Save to file using (FileStream fs = new FileStream("output.pdf", FileMode.Create)) { document.Write(fs); } } } } // NuGet: Install-Package TallComponents.PDF.Kit using TallComponents.PDF.Kit; using System.IO; class Program { static void Main() { // Create a new document using (Document document = new Document()) { string html = "<html><body><h1>Hello World</h1><p>This is a PDF from HTML.</p></body></html>"; // Create HTML fragment Fragment fragment = Fragment.FromText(html); // Add to document Section section = document.Sections.Add(); section.Fragments.Add(fragment); // Save to file using (FileStream fs = new FileStream("output.pdf", FileMode.Create)) { document.Write(fs); } } } } $vbLabelText $csharpLabel IronPDF 方法: // NuGet: Install-Package IronPdf using IronPdf; class Program { static void Main() { // Create a PDF from HTML string 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 from HTML string 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"); } } $vbLabelText $csharpLabel IronPDF 的ChromePdfRenderer使用真正的 Chromium 引擎,提供完整的 HTML5 和 CSS3 支援。 這意味著您的 PDF 文件將以與在現代瀏覽器中完全相同的方式呈現。 了解更多信息,請參閱HTML 轉 PDF 教程。 合併多個PDF文件 PDF 合併功能體現了 高組件 和 IronPDF 在資訊冗長程度的差異。 高組件方法: // NuGet: Install-Package TallComponents.PDF.Kit using TallComponents.PDF.Kit; using System.IO; class Program { static void Main() { // Create output document using (Document outputDoc = new Document()) { // Load first PDF using (FileStream fs1 = new FileStream("document1.pdf", FileMode.Open)) using (Document doc1 = new Document(fs1)) { foreach (Page page in doc1.Pages) { outputDoc.Pages.Add(page.Clone()); } } // Load second PDF using (FileStream fs2 = new FileStream("document2.pdf", FileMode.Open)) using (Document doc2 = new Document(fs2)) { foreach (Page page in doc2.Pages) { outputDoc.Pages.Add(page.Clone()); } } // Save merged document using (FileStream output = new FileStream("merged.pdf", FileMode.Create)) { outputDoc.Write(output); } } } } // NuGet: Install-Package TallComponents.PDF.Kit using TallComponents.PDF.Kit; using System.IO; class Program { static void Main() { // Create output document using (Document outputDoc = new Document()) { // Load first PDF using (FileStream fs1 = new FileStream("document1.pdf", FileMode.Open)) using (Document doc1 = new Document(fs1)) { foreach (Page page in doc1.Pages) { outputDoc.Pages.Add(page.Clone()); } } // Load second PDF using (FileStream fs2 = new FileStream("document2.pdf", FileMode.Open)) using (Document doc2 = new Document(fs2)) { foreach (Page page in doc2.Pages) { outputDoc.Pages.Add(page.Clone()); } } // Save merged document using (FileStream output = new FileStream("merged.pdf", FileMode.Create)) { outputDoc.Write(output); } } } } $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"); } } $vbLabelText $csharpLabel TallComponents 版本需要手動迭代頁面和克隆。 IronPDF 將此操作簡化為一次PdfDocument.Merge()呼叫。 有關進階合併場景,請參閱PDF 合併文件。 添加浮水印 PDF浮水印功能揭示了開發者體驗的另一個顯著差異。 高組件方法: // NuGet: Install-Package TallComponents.PDF.Kit using TallComponents.PDF.Kit; using TallComponents.PDF.Layout; using System.IO; using System.Drawing; class Program { static void Main() { // Load existing PDF using (FileStream fs = new FileStream("input.pdf", FileMode.Open)) using (Document document = new Document(fs)) { // Iterate through pages foreach (Page page in document.Pages) { // Create watermark text TextShape watermark = new TextShape(); watermark.Text = "CONFIDENTIAL"; watermark.Font = new Font("Arial", 60); watermark.PenColor = Color.FromArgb(128, 255, 0, 0); watermark.X = 200; watermark.Y = 400; watermark.Rotate = 45; // Add to page page.Overlay.Shapes.Add(watermark); } // Save document using (FileStream output = new FileStream("watermarked.pdf", FileMode.Create)) { document.Write(output); } } } } // NuGet: Install-Package TallComponents.PDF.Kit using TallComponents.PDF.Kit; using TallComponents.PDF.Layout; using System.IO; using System.Drawing; class Program { static void Main() { // Load existing PDF using (FileStream fs = new FileStream("input.pdf", FileMode.Open)) using (Document document = new Document(fs)) { // Iterate through pages foreach (Page page in document.Pages) { // Create watermark text TextShape watermark = new TextShape(); watermark.Text = "CONFIDENTIAL"; watermark.Font = new Font("Arial", 60); watermark.PenColor = Color.FromArgb(128, 255, 0, 0); watermark.X = 200; watermark.Y = 400; watermark.Rotate = 45; // Add to page page.Overlay.Shapes.Add(watermark); } // Save document using (FileStream output = new FileStream("watermarked.pdf", FileMode.Create)) { document.Write(output); } } } } $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"); } } $vbLabelText $csharpLabel IronPDF 的TextStamper類別提供直覺的對齊選項和自動頁面迭代功能。 印章和水印指南涵蓋了其他自訂選項。 數位簽名 文件簽名對於企業應用至關重要。 高組件方法: using TallComponents.PDF.Kit; using TallComponents.PDF.Kit.Signing; Document document = new Document("unsigned.pdf"); // Load certificate X509Certificate2 cert = new X509Certificate2("certificate.pfx", "password"); // Create signature SignatureHandler handler = new SignatureHandler(cert); document.Sign(handler); document.Write("signed.pdf"); using TallComponents.PDF.Kit; using TallComponents.PDF.Kit.Signing; Document document = new Document("unsigned.pdf"); // Load certificate X509Certificate2 cert = new X509Certificate2("certificate.pfx", "password"); // Create signature SignatureHandler handler = new SignatureHandler(cert); document.Sign(handler); document.Write("signed.pdf"); $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"); $vbLabelText $csharpLabel IronPDF 的簽章 API 包含聯絡資訊、位置和簽名原因等附加元資料屬性-這對稽核追蹤非常重要。 請查閱數位簽章文件以了解完整的實作細節。 功能比較:TallComponents 與 IronPDF 特徵 高組件 IronPDF 地位 ❌ 已停產 ✅ 活躍 支援 ❌ 無 ✅ 已完成 更新 ❌ 無 ✅ 常規 內容創作 HTML 轉 PDF 不 全鉻 PDF檔案的URL 不 是的 CSS 支援 不 完整的 CSS3 JavaScript 不 完整版 ES2024 XML模板 是的 不需要 PDF 操作 合併PDF 是的 是的 拆分PDF 是的 是的 水印 手動的 內建 頁首/頁尾 基於 XML HTML/CSS 安全 密碼保護 是的 是的 數位簽名 是的 是的 加密 是的 是的 PDF/A 有限的 是的 已知問題 空白頁 ⚠️ 已記錄的漏洞 沒有任何 缺少圖形 ⚠️ 已記錄的漏洞 沒有任何 字體問題 ⚠️ 已記錄的漏洞 沒有任何 發展 學習曲線 高(XML) 低(HTML) 文件 過時的 廣泛的 社群 沒有任何 積極的 高組件 遷移檢查清單 遷移前任務 審核您的程式碼庫,找出所有 高組件 的使用情況: grep -r "using TallComponents" --include="*.cs" . grep -r "Document\|Section\|TextParagraph" --include="*.cs" . grep -r "using TallComponents" --include="*.cs" . grep -r "Document\|Section\|TextParagraph" --include="*.cs" . SHELL 記錄現有的 XML 範本和佈局-這些將轉換為 HTML。 確定目前使用的安全性設置,並記錄密碼配置和數位簽章實現方式。 程式碼更新任務 透過 NuGet 刪除 高組件 套件 安裝 IronPdf 套件 將 XML 版面配置轉換為 HTML 模板 用 HTML 元素取代節/段落模型 更新表格程式碼,使其使用標準 HTML 表格 使用HtmlHeaderFooter將頁首/頁尾轉換為 HTML 更新安全設定以使用pdf.SecuritySettings 新增啟動時許可證初始化功能 頁首和頁尾遷移 TallComponents 使用基於 XML 的標頭。 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 }; $vbLabelText $csharpLabel 了解更多關於IronPDF中的頁首和頁尾的資訊。 測試階段 比較 高組件 和 IronPDF 版本的視覺輸出效果 確認空白頁問題已解決 測試所有文件模板 驗證 PDF 合併功能 測試數位簽名 確認安全設定已正確套用 推薦遷移時間表 鑑於 高組件 已停止開發且不再提供支持,遷移工作應盡快進行: 第一週:審核程式碼庫並識別所有 高組件 的使用情況 第二週:將文件範本從 XML 轉換為 HTML 第三週:更新安全性、合併和簽署程式碼 第 4 週:測試和生產部署 延遲意味著運行不受支援的軟體,並且存在已知的渲染錯誤——任何專業的開發團隊都不應該在 2026 年之前承擔這種風險。 遷移的主要優勢 從 高組件 遷移到 IronPDF 可立即帶來以下優勢: 現代 Chromium 渲染引擎:完全支援 CSS 和 JavaScript,確保 PDF 能夠如預期地渲染,消除 高組件 中記錄的空白頁和缺少圖形的錯誤。 積極的維護和安全更新: IronPDF 會定期收到更新,以確保與目前和未來的 .NET 版本(包括 .NET 10)相容。 更好的 .NET 整合:原生 async/await 支援和現代 API 模式與當代 C# 開發實踐一致。 完善的文件:豐富的教學課程和API 參考資料支援快速實現。 Curtis Chau 立即與工程團隊聊天 技術撰稿人 Curtis Chau 擁有電腦科學學士學位(卡爾頓大學),專長於前端開發,精通 Node.js、TypeScript、JavaScript 和 React。Curtis 對製作直覺且美觀的使用者介面充滿熱情,他喜歡使用現代化的架構,並製作結構良好且視覺上吸引人的手冊。除了開發之外,Curtis 對物聯網 (IoT) 也有濃厚的興趣,他喜歡探索整合硬體與軟體的創新方式。在空閒時間,他喜歡玩遊戲和建立 Discord bots,將他對技術的熱愛與創意結合。 相關文章 發表日期 2026年2月1日 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. 閱讀更多 發表日期 2026年2月1日 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. 閱讀更多 發表日期 2026年2月1日 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 Telerik Document Processing to IronPDF in C#How to Migrate from PDFmyURL to Iro...
發表日期 2026年2月1日 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. 閱讀更多
發表日期 2026年2月1日 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. 閱讀更多
發表日期 2026年2月1日 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. 閱讀更多