MIGRATION GUIDES How to Migrate from GdPicture.NET SDK to IronPDF in C# Curtis Chau 發表日期:2026年1月25日 下載 IronPDF NuGet 下載 DLL 下載 Windows 安裝程式 開始免費試用 法學碩士副本 法學碩士副本 將頁面複製為 Markdown 格式,用於 LLMs 在 ChatGPT 中打開 請向 ChatGPT 諮詢此頁面 在雙子座打開 請向 Gemini 詢問此頁面 在 Grok 中打開 向 Grok 詢問此頁面 打開困惑 向 Perplexity 詢問有關此頁面的信息 分享 在 Facebook 上分享 分享到 X(Twitter) 在 LinkedIn 上分享 複製連結 電子郵件文章 從 GdPicture.NET SDK 遷移到 IronPDF 為 .NET 開發人員提供了一種專注、簡化的 PDF 生成方法。 本指南提供了一個全面的、分步的遷移路徑,用專為現代 .NET 開發設計的現代化的、PDF 專用 API 替換了複雜的文檔圖像 SDK 模式。 為什麼要從 GdPicture.NET SDK 遷移到 IronPDF GdPicture.NET SDK挑戰 GdPicture.NET SDK(現已更名為 Nutrient)是一個功能全面的文檔影像處理 SDK,但其在以 PDF 為中心的開發方面面臨諸多挑戰: 1.對於僅處理 PDF 的專案來說有點過頭了: GdPicture.NET SDK 是一個完整的文件影像處理套件,包括 OCR、條碼識別、掃描和影像處理。 如果您只需要 PDF 功能,那麼您就是在為永遠不會使用的功能付費。 2.複雜的授權:多個產品等級(GdPicture.NET 14、GdPicture.API、Ultimate、Professional),SKU 組合令人困惑,並且有年度訂閱要求。 3.企業定價:僅 PDF 外掛程式的授權費用起價為 2,999 美元,而終極版的價格則高達 10,000 美元以上。 按開發者付費模式會為不斷成長的團隊帶來巨大的額外開銷。 4.學習曲線陡峭:此 API 是圍繞文件圖像概念設計的,而不是現代 .NET 模式。 與當代 C# 約定相比, LicenseManager.RegisterKEY() 、 GdPictureStatus枚舉檢查和 1 索引頁面等方法感覺已經過時了。 5.狀態碼模式:每個操作都會傳回一個GdPictureStatus枚舉,必須檢查-發生錯誤時不會拋出異常,這使得錯誤處理變得冗長而重複。 6.手動資源管理:需要明確Dispose()或Release() 。 該 SDK 並未完全遵循標準的 .NET 資源釋放模式。 7.版本鎖定:命名空間GdPicture14包含版本號,因此主要版本升級需要更改整個程式碼庫中的命名空間。 8.品牌重塑帶來的混亂:最近更名為"Nutrient"導致 gdpicture.com 和 nutrient.io 之間的文檔出現碎片化,使支持和學習變得複雜。 GdPicture.NET SDK 與 IronPDF 的比較 方面 GdPicture.NET SDK IronPDF 重點 文件影像處理套件(對PDF來說功能過剩) PDF專用函式庫 定價 企業級:2,999 美元至 10,000 美元以上 具競爭力,可隨業務規模擴展 API 風格 狀態碼,手動管理 異常、IDisposable、現代 .NET 學習曲線 陡峭(影像SDK概念) 簡單(熟悉HTML/CSS) HTML渲染 基本型內燃機 最新版 Chromium 內核,支援 CSS3/JS 頁面索引 從 1 開始索引 從 0 開始索引(標準 .NET) 螺紋安全 需要手動同步 螺紋安全設計 命名空間 版本特定( GdPicture14 ) 穩定( IronPdf ) 對於計劃在 2025 年和 2026 年採用 .NET 10 和 C# 14 的團隊而言,IronPDF 提供了一個面向未來的基礎,與現代 .NET 模式和約定保持一致。 遷移複雜度評估 各功能預計工作量 特徵 遷移複雜性 筆記 HTML 轉 PDF 低的 直接方法映射 PDF檔案的URL 低的 直接方法映射 合併PDF 低的 類似的 API 模式 拆分PDF 低的 類似的 API 模式 水印 低的 不同的方法(基於HTML) 文字擷取 低的 屬性與方法 密碼保護 中等的 不同的參數結構 表單字段 中等的 API差異 數位簽名 中高 不同的憑證處理方式 OCR 高的 IronOCR是單獨的產品。 條碼識別 不適用 IronPDF 不支援此功能 遷移決策矩陣 你的情況 推薦 僅限 PDF 操作 遷移-大幅簡化流程並節省成本 大量使用 OCR 將 IronOCR 視為配套產品 條碼/掃描需求 這些功能請保留 GdPicture.NET SDK,PDF 處理請使用 IronPDF。 全文檔影像 評估您是否真正使用了所有功能 開始之前 先決條件 .NET 版本: IronPDF 支援 .NET Framework 4.6.2+ 和 .NET Core 2.0+ / .NET 5/6/7/8/9+ 2.許可證密鑰:從ironpdf.com取得您的 IronPDF 許可證密鑰。 3.備份:建立一個用於遷移工作的分支 識別所有 GdPicture.NET SDK 使用情況 # Find all GdPicture.NET SDK references in your codebase grep -r "GdPicture14\|GdPicturePDF\|GdPictureDocumentConverter\|GdPictureStatus\|LicenseManager\.RegisterKEY" --include="*.cs" . # Find all GdPicture package references grep -r "GdPicture" --include="*.csproj" . # Find all GdPicture.NET SDK references in your codebase grep -r "GdPicture14\|GdPicturePDF\|GdPictureDocumentConverter\|GdPictureStatus\|LicenseManager\.RegisterKEY" --include="*.cs" . # Find all GdPicture package references grep -r "GdPicture" --include="*.csproj" . SHELL NuGet 套件變更 # Remove GdPicture.NET SDK packages dotnet remove package GdPicture.NET.14 dotnet remove package GdPicture.NET.14.API dotnet remove package GdPicture dotnet remove package GdPicture.API # Install IronPDF dotnet add package IronPdf # Remove GdPicture.NET SDK packages dotnet remove package GdPicture.NET.14 dotnet remove package GdPicture.NET.14.API dotnet remove package GdPicture dotnet remove package GdPicture.API # Install IronPDF dotnet add package IronPdf SHELL 快速入門遷移 步驟 1:更新許可證配置 (GdPicture.NET SDK 之前): // Must be called before any GdPicture.NET SDK operations LicenseManager.RegisterKEY("YOUR-GDPICTURE-LICENSE-KEY"); // Must be called before any GdPicture.NET SDK operations LicenseManager.RegisterKEY("YOUR-GDPICTURE-LICENSE-KEY"); $vbLabelText $csharpLabel (IronPDF 之後): // Set once at application startup IronPdf.License.LicenseKey = "YOUR-IRONPDF-LICENSE-KEY"; // Or in appsettings.json: // { "IronPdf.License.LicenseKey": "YOUR-LICENSE-KEY" } // Set once at application startup IronPdf.License.LicenseKey = "YOUR-IRONPDF-LICENSE-KEY"; // Or in appsettings.json: // { "IronPdf.License.LicenseKey": "YOUR-LICENSE-KEY" } $vbLabelText $csharpLabel 步驟 2:更新命名空間導入 // Before (GdPicture.NET SDK) using GdPicture14; // After (IronPDF) using IronPdf; using IronPdf.Editing; // Before (GdPicture.NET SDK) using GdPicture14; // After (IronPDF) using IronPdf; using IronPdf.Editing; $vbLabelText $csharpLabel 步驟 3:基本轉換模式 GdPicture.NET SDK 遷移中最顯著的變化是取消了冗長的狀態檢查模式: (GdPicture.NET SDK 之前): using GdPicture14; LicenseManager.RegisterKEY("LICENSE-KEY"); using (GdPictureDocumentConverter converter = new GdPictureDocumentConverter()) { GdPictureStatus status = converter.LoadFromHTMLString("<h1>Hello World</h1>"); if (status == GdPictureStatus.OK) { status = converter.SaveAsPDF("output.pdf"); if (status != GdPictureStatus.OK) { Console.WriteLine($"Error: {status}"); } } else { Console.WriteLine($"Load error: {status}"); } } using GdPicture14; LicenseManager.RegisterKEY("LICENSE-KEY"); using (GdPictureDocumentConverter converter = new GdPictureDocumentConverter()) { GdPictureStatus status = converter.LoadFromHTMLString("<h1>Hello World</h1>"); if (status == GdPictureStatus.OK) { status = converter.SaveAsPDF("output.pdf"); if (status != GdPictureStatus.OK) { Console.WriteLine($"Error: {status}"); } } else { Console.WriteLine($"Load error: {status}"); } } $vbLabelText $csharpLabel (IronPDF 之後): using IronPdf; IronPdf.License.LicenseKey = "LICENSE-KEY"; var renderer = new ChromePdfRenderer(); var pdf = renderer.RenderHtmlAsPdf("<h1>Hello World</h1>"); pdf.SaveAs("output.pdf"); using IronPdf; IronPdf.License.LicenseKey = "LICENSE-KEY"; var renderer = new ChromePdfRenderer(); var pdf = renderer.RenderHtmlAsPdf("<h1>Hello World</h1>"); pdf.SaveAs("output.pdf"); $vbLabelText $csharpLabel 主要區別: 不進行狀態檢查-錯誤除外 渲染器無需明確釋放資源 現代流暢 API 基於 Chium 的渲染,以提供更好的 HTML/CSS 支援 完整 API 參考 命名空間映射 GdPicture.NET SDK IronPDF GdPicture14 IronPdf GdPicture14.PDF IronPdf GdPicture14.Imaging 不適用(無需填寫) 核心類別映射 GdPicture.NET SDK IronPDF 描述 GdPicturePDF PdfDocument 主 PDF 文件類 GdPictureDocumentConverter ChromePdfRenderer HTML/URL 轉 PDF LicenseManager IronPdf.License 許可證管理 GdPictureStatus 例外情況 錯誤處理 文檔載入方法 GdPicture.NET SDK IronPDF 筆記 pdf.LoadFromFile(path, loadInMemory) PdfDocument.FromFile(path) 從檔案載入 pdf.LoadFromFile(path, password, loadInMemory) PdfDocument.FromFile(path, password) 密碼保護 converter.LoadFromHTMLString(html) renderer.RenderHtmlAsPdf(html) HTML字串 converter.LoadFromURL(url) renderer.RenderUrlAsPdf(url) URL 頁面操作 GdPicture.NET SDK IronPDF 筆記 pdf.GetPageCount() pdf.PageCount 取得頁數 pdf.SelectPage(pageNo) pdf.Pages[index] 選擇頁面(索引為 1 的頁面與索引為 0 的頁面) pdf.GetPageWidth() pdf.Pages[i].Width 頁面寬度 pdf.GetPageHeight() pdf.Pages[i].Height 頁面高度 合併和拆分操作 GdPicture.NET SDK IronPDF 筆記 pdf1.MergePages(pdf2) PdfDocument.Merge(pdf1, pdf2) 合併PDF pdf.ExtractPages(start, end) pdf.CopyPages(indices) 提取頁面 水印操作 GdPicture.NET SDK IronPDF 筆記 pdf.DrawText(...)循環 pdf.ApplyWatermark(html) 文字浮水印 pdf.SetTextColor(color) CSS樣式 設定文字顏色 pdf.SetTextSize(size) CSS樣式 設定文字大小 程式碼遷移範例 範例 1:HTML 轉 PDF (GdPicture.NET SDK 之前): // NuGet: Install-Package GdPicture.NET using GdPicture14; using System; class Program { static void Main() { using (GdPictureDocumentConverter converter = new GdPictureDocumentConverter()) { string htmlContent = "<html><body><h1>Hello World</h1></body></html>"; GdPictureStatus status = converter.LoadFromHTMLString(htmlContent); if (status == GdPictureStatus.OK) { converter.SaveAsPDF("output.pdf"); } } } } // NuGet: Install-Package GdPicture.NET using GdPicture14; using System; class Program { static void Main() { using (GdPictureDocumentConverter converter = new GdPictureDocumentConverter()) { string htmlContent = "<html><body><h1>Hello World</h1></body></html>"; GdPictureStatus status = converter.LoadFromHTMLString(htmlContent); if (status == GdPictureStatus.OK) { converter.SaveAsPDF("output.pdf"); } } } } $vbLabelText $csharpLabel (IronPDF 之後): // NuGet: Install-Package IronPdf using IronPdf; using System; class Program { static void Main() { var renderer = new ChromePdfRenderer(); string htmlContent = "<html><body><h1>Hello World</h1></body></html>"; var pdf = renderer.RenderHtmlAsPdf(htmlContent); pdf.SaveAs("output.pdf"); } } // NuGet: Install-Package IronPdf using IronPdf; using System; class Program { static void Main() { var renderer = new ChromePdfRenderer(); string htmlContent = "<html><body><h1>Hello World</h1></body></html>"; var pdf = renderer.RenderHtmlAsPdf(htmlContent); pdf.SaveAs("output.pdf"); } } $vbLabelText $csharpLabel IronPDF 的ChromePdfRenderer使用現代 Chromium 引擎進行精確的 HTML/CSS 渲染,無需進行狀態碼檢查。 如需更多 HTML 渲染選項,請參閱HTML 轉 PDF 文件。 範例 2:合併多個 PDF 文件 (GdPicture.NET SDK 之前): // NuGet: Install-Package GdPicture.NET using GdPicture14; using System; class Program { static void Main() { using (GdPicturePDF pdf1 = new GdPicturePDF()) using (GdPicturePDF pdf2 = new GdPicturePDF()) { pdf1.LoadFromFile("document1.pdf", false); pdf2.LoadFromFile("document2.pdf", false); pdf1.MergePages(pdf2); pdf1.SaveToFile("merged.pdf"); } } } // NuGet: Install-Package GdPicture.NET using GdPicture14; using System; class Program { static void Main() { using (GdPicturePDF pdf1 = new GdPicturePDF()) using (GdPicturePDF pdf2 = new GdPicturePDF()) { pdf1.LoadFromFile("document1.pdf", false); pdf2.LoadFromFile("document2.pdf", false); pdf1.MergePages(pdf2); pdf1.SaveToFile("merged.pdf"); } } } $vbLabelText $csharpLabel (IronPDF 之後): // NuGet: Install-Package IronPdf using IronPdf; using System.Collections.Generic; class Program { static void Main() { var pdf1 = PdfDocument.FromFile("document1.pdf"); var pdf2 = PdfDocument.FromFile("document2.pdf"); var merged = PdfDocument.Merge(new List<PdfDocument> { pdf1, pdf2 }); merged.SaveAs("merged.pdf"); } } // NuGet: Install-Package IronPdf using IronPdf; using System.Collections.Generic; class Program { static void Main() { var pdf1 = PdfDocument.FromFile("document1.pdf"); var pdf2 = PdfDocument.FromFile("document2.pdf"); var merged = PdfDocument.Merge(new List<PdfDocument> { pdf1, pdf2 }); merged.SaveAs("merged.pdf"); } } $vbLabelText $csharpLabel IronPDF 的靜態Merge方法接受文件列表,可以輕鬆地在一次操作中合併多個 PDF 文件。 了解更多關於合併和拆分PDF的資訊。 範例 3:為所有頁面新增浮水印 (GdPicture.NET SDK 之前): // NuGet: Install-Package GdPicture.NET using GdPicture14; using System; using System.Drawing; class Program { static void Main() { using (GdPicturePDF pdf = new GdPicturePDF()) { pdf.LoadFromFile("input.pdf", false); for (int i = 1; i <= pdf.GetPageCount(); i++) { pdf.SelectPage(i); pdf.SetTextColor(Color.Red); pdf.SetTextSize(48); pdf.DrawText("CONFIDENTIAL", 200, 400); } pdf.SaveToFile("watermarked.pdf"); } } } // NuGet: Install-Package GdPicture.NET using GdPicture14; using System; using System.Drawing; class Program { static void Main() { using (GdPicturePDF pdf = new GdPicturePDF()) { pdf.LoadFromFile("input.pdf", false); for (int i = 1; i <= pdf.GetPageCount(); i++) { pdf.SelectPage(i); pdf.SetTextColor(Color.Red); pdf.SetTextSize(48); pdf.DrawText("CONFIDENTIAL", 200, 400); } pdf.SaveToFile("watermarked.pdf"); } } } $vbLabelText $csharpLabel (IronPDF 之後): // NuGet: Install-Package IronPdf using IronPdf; using IronPdf.Editing; class Program { static void Main() { var pdf = PdfDocument.FromFile("input.pdf"); pdf.ApplyWatermark("<h1 style='color:red;'>CONFIDENTIAL</h1>", 50, VerticalAlignment.Middle, HorizontalAlignment.Center); pdf.SaveAs("watermarked.pdf"); } } // NuGet: Install-Package IronPdf using IronPdf; using IronPdf.Editing; class Program { static void Main() { var pdf = PdfDocument.FromFile("input.pdf"); pdf.ApplyWatermark("<h1 style='color:red;'>CONFIDENTIAL</h1>", 50, VerticalAlignment.Middle, HorizontalAlignment.Center); pdf.SaveAs("watermarked.pdf"); } } $vbLabelText $csharpLabel GdPicture.NET SDK 從基於座標的文字繪製遷移到基於 HTML 的浮水印,大大簡化了程式碼。 IronPDF 的ApplyWatermark方法使用 HTML/CSS 樣式,無需手動頁面迭代和座標計算。 有關更多選項,請參閱完整的水印文件。 範例 4:密碼保護和安全 (GdPicture.NET SDK 之前): using GdPicture14; class Program { static void Main() { LicenseManager.RegisterKEY("LICENSE-KEY"); using (GdPicturePDF pdf = new GdPicturePDF()) { GdPictureStatus status = pdf.LoadFromFile("document.pdf", false); if (status != GdPictureStatus.OK) return; // Save with encryption - many boolean parameters status = pdf.SaveToFile( "protected.pdf", PdfEncryption.PdfEncryption256BitAES, "user123", // User password "owner456", // Owner password true, // Can print false, // Cannot copy false, // Cannot modify false, // Cannot add notes true, // Can fill forms false, // Cannot extract false, // Cannot assemble true // Can print high quality ); } } } using GdPicture14; class Program { static void Main() { LicenseManager.RegisterKEY("LICENSE-KEY"); using (GdPicturePDF pdf = new GdPicturePDF()) { GdPictureStatus status = pdf.LoadFromFile("document.pdf", false); if (status != GdPictureStatus.OK) return; // Save with encryption - many boolean parameters status = pdf.SaveToFile( "protected.pdf", PdfEncryption.PdfEncryption256BitAES, "user123", // User password "owner456", // Owner password true, // Can print false, // Cannot copy false, // Cannot modify false, // Cannot add notes true, // Can fill forms false, // Cannot extract false, // Cannot assemble true // Can print high quality ); } } } $vbLabelText $csharpLabel (IronPDF 之後): using IronPdf; class Program { static void Main() { var pdf = PdfDocument.FromFile("document.pdf"); // Configure security settings with clear property names pdf.SecuritySettings.OwnerPassword = "owner456"; pdf.SecuritySettings.UserPassword = "user123"; // Set permissions pdf.SecuritySettings.AllowUserPrinting = PdfPrintSecurity.FullPrintRights; pdf.SecuritySettings.AllowUserCopyPasteContent = false; pdf.SecuritySettings.AllowUserEdits = PdfEditSecurity.NoEdit; pdf.SecuritySettings.AllowUserAnnotations = false; pdf.SecuritySettings.AllowUserFormData = true; pdf.SaveAs("protected.pdf"); } } using IronPdf; class Program { static void Main() { var pdf = PdfDocument.FromFile("document.pdf"); // Configure security settings with clear property names pdf.SecuritySettings.OwnerPassword = "owner456"; pdf.SecuritySettings.UserPassword = "user123"; // Set permissions pdf.SecuritySettings.AllowUserPrinting = PdfPrintSecurity.FullPrintRights; pdf.SecuritySettings.AllowUserCopyPasteContent = false; pdf.SecuritySettings.AllowUserEdits = PdfEditSecurity.NoEdit; pdf.SecuritySettings.AllowUserAnnotations = false; pdf.SecuritySettings.AllowUserFormData = true; pdf.SaveAs("protected.pdf"); } } $vbLabelText $csharpLabel IronPDF 的SecuritySettings屬性提供命名、自文檔化的屬性,而不是位置布林參數。 關鍵遷移說明 頁面索引轉換 GdPicture.NET SDK 遷移中最重要的變化之一是頁面索引方式的差異: // GdPicture.NET SDK: 從 1 開始索引 pages for (int i = 1; i <= pdf.GetPageCount(); i++) { pdf.SelectPage(i); // process page } // IronPDF: 0-indexed pages (standard .NET) for (int i = 0; i < pdf.PageCount; i++) { var page = pdf.Pages[i]; // process page } // GdPicture.NET SDK: 從 1 開始索引 pages for (int i = 1; i <= pdf.GetPageCount(); i++) { pdf.SelectPage(i); // process page } // IronPDF: 0-indexed pages (standard .NET) for (int i = 0; i < pdf.PageCount; i++) { var page = pdf.Pages[i]; // process page } $vbLabelText $csharpLabel 狀態碼到異常 用標準的 try-catch 語句取代詳細的狀態檢查: // GdPicture.NET SDK GdPictureStatus status = converter.LoadFromHTMLString(html); if (status != GdPictureStatus.OK) { Console.WriteLine($"Error: {status}"); return; } // IronPDF try { var pdf = renderer.RenderHtmlAsPdf(html); pdf.SaveAs("output.pdf"); } catch (Exception ex) { Console.WriteLine($"Error: {ex.Message}"); } // GdPicture.NET SDK GdPictureStatus status = converter.LoadFromHTMLString(html); if (status != GdPictureStatus.OK) { Console.WriteLine($"Error: {status}"); return; } // IronPDF try { var pdf = renderer.RenderHtmlAsPdf(html); pdf.SaveAs("output.pdf"); } catch (Exception ex) { Console.WriteLine($"Error: {ex.Message}"); } $vbLabelText $csharpLabel 單位換算 GdPicture.NET SDK 使用英吋作為邊距單位; IronPDF 使用毫米: // GdPicture.NET SDK: 0.5 inches margin converter.HtmlSetMargins(0.5f, 0.5f, 0.5f, 0.5f); // IronPDF: 0.5 inches = 12.7 mm renderer.RenderingOptions.MarginTop = 12.7; renderer.RenderingOptions.MarginBottom = 12.7; renderer.RenderingOptions.MarginLeft = 12.7; renderer.RenderingOptions.MarginRight = 12.7; // GdPicture.NET SDK: 0.5 inches margin converter.HtmlSetMargins(0.5f, 0.5f, 0.5f, 0.5f); // IronPDF: 0.5 inches = 12.7 mm renderer.RenderingOptions.MarginTop = 12.7; renderer.RenderingOptions.MarginBottom = 12.7; renderer.RenderingOptions.MarginLeft = 12.7; renderer.RenderingOptions.MarginRight = 12.7; $vbLabelText $csharpLabel 換算公式: millimeters = inches × 25.4 螺紋安全 GdPicture.NET SDK 需要手動同步才能實現並發操作。 IronPDF 的ChromePdfRenderer從設計上就保證了線程安全,從而簡化了多線程 PDF 生成。 性能考量 重用 ChromePdfRenderer 為了獲得最佳效能,請重複使用渲染器實例: // GOOD - Reuse renderer (thread-safe) public class PdfService { private static readonly ChromePdfRenderer _renderer = new ChromePdfRenderer(); public byte[] Generate(string html) => _renderer.RenderHtmlAsPdf(html).BinaryData; } // BAD - Creates new instance each time public byte[] GenerateBad(string html) { var renderer = new ChromePdfRenderer(); // Wasteful return renderer.RenderHtmlAsPdf(html).BinaryData; } // GOOD - Reuse renderer (thread-safe) public class PdfService { private static readonly ChromePdfRenderer _renderer = new ChromePdfRenderer(); public byte[] Generate(string html) => _renderer.RenderHtmlAsPdf(html).BinaryData; } // BAD - Creates new instance each time public byte[] GenerateBad(string html) { var renderer = new ChromePdfRenderer(); // Wasteful return renderer.RenderHtmlAsPdf(html).BinaryData; } $vbLabelText $csharpLabel 妥善處置資源 // Use using statements for automatic cleanup using (var pdf = PdfDocument.FromFile("large.pdf")) { string text = pdf.ExtractAllText(); } // pdf is disposed automatically // Use using statements for automatic cleanup using (var pdf = PdfDocument.FromFile("large.pdf")) { string text = pdf.ExtractAllText(); } // pdf is disposed automatically $vbLabelText $csharpLabel 遷移清單 遷移前 清點程式碼庫中所有 GdPicture.NET SDK 的使用情況 確定實際使用的功能(PDF、OCR、條碼) 決定是否需要 OCR/條碼功能(考慮使用 IronOCR/IronBarcode) 查看您目前的許可協議,並與 IronPDF 的定價進行比較。 取得 IronPDF 許可證密鑰 在版本控制系統中建立遷移分支 程式碼遷移 移除 GdPicture.NET SDK NuGet 套件: dotnet remove package GdPicture.NET 安裝 IronPdf NuGet 套件: dotnet add package IronPdf 更新命名空間導入( GdPicture14 → IronPdf ) 將LicenseManager.RegisterKEY()替換為IronPdf.License.LicenseKey 將狀態碼檢查轉換為 try-catch 區塊 更新頁面索引(索引為 1 → 索引為 0) 將GdPicturePDF替換為PdfDocument 將GdPictureDocumentConverter替換為ChromePdfRenderer 將基於座標的文字轉換為 HTML 戳記 更新單位換算(英吋→毫米) 測試 對所有 PDF 生成路徑進行單元測試 驗證 HTML 渲染品質是否達到或超過預期 測試所有安全性/加密場景 驗證表單填寫功能 測試合併/拆分操作 驗證水印外觀 效能基準關鍵路徑 移民後 刪除 GdPicture.NET SDK 授權檔案/金鑰 更新文檔 訓練團隊掌握 IronPDF 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 GemBox PDF to IronPDF in C#How to Migrate from FastReport to I...
發表日期 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. 閱讀更多