USING IRONPDF How to Efficiently Compare Two PDF Files Using C# with IronPDF Curtis Chau 更新:2026年1月21日 下載 IronPDF NuGet 下載 DLL 下載 Windows 安裝程式 開始免費試用 法學碩士副本 法學碩士副本 將頁面複製為 Markdown 格式,用於 LLMs 在 ChatGPT 中打開 請向 ChatGPT 諮詢此頁面 在雙子座打開 請向 Gemini 詢問此頁面 在 Grok 中打開 向 Grok 詢問此頁面 打開困惑 向 Perplexity 詢問有關此頁面的信息 分享 在 Facebook 上分享 分享到 X(Twitter) 在 LinkedIn 上分享 複製連結 電子郵件文章 IronPDF 讓 C# 開發人員能夠透過擷取文字內容並逐頁分析差異,以程式設計方式比較 PDF 文件。 本教學課程示範了基本比較、多重文件分析和產生比較報告的實用程式碼範例。 為什麼需要以程式設計方式比較 PDF 文件? 在現代 .NET Core 應用程式中,以程式設計方式比較 PDF 文件至關重要,從追蹤文件修訂到確保法律工作流程的合規性,都需要使用此功能。 無論您是在驗證合約變更、監控版本,還是實施品質保證流程,自動化 PDF 比較都能節省時間並減少錯誤。 IronPDF提供了一種使用 C# 比較兩個 PDF 文件的簡化方法,它將有效的文本提取與靈活的比較選項相結合。 該庫的Chrome 渲染引擎可確保從複雜的 PDF 中提取準確的文本,而其完整的API 參考則提供了直觀的文檔分析方法。 本教學將透過實際範例,向您展示如何使用 IronPDF 直覺的 API 有效地比較兩個 PDF 文件。 IronPDF C# 庫主頁橫幅展示了主要功能,包括 HTML 轉 PDF、PDF 編輯功能、部署選項和免費試用資訊。 何時應該使用自動 PDF 比較? 在法律、金融或醫療保健等文件密集型行業中,處理版本控制時,自動 PDF 比較變得至關重要。 每天處理數百份文件或對精度要求極高時,人工比對就變得不切實際了。 IronPDF 的文件管理功能可讓您建立可靠的比較系統,並與現有工作流程無縫整合。 常見場景包括比較發票、驗證監管文件或追蹤技術規範變更。 PDF比較常見的應用場景有哪些? PDF比較在各行業都有應用。 法律專業人員會追蹤合約變更並確保其合規性。 品質保證團隊使用IronPDF 的測試功能,將產生的報告與預期輸出進行比較。 金融機構會核實報表並偵測未經授權的變更。 文件團隊負責確保使用者手冊各版本之間的一致性。 跨平台支援使得這些解決方案能夠部署在 Windows、Linux 和雲端環境中。 為什麼人工比較不足以解決問題? 手動比較 PDF 文件容易出現人為錯誤,尤其是在處理篇幅較長的文件或細微的格式變更時。 它既耗時又不適用於批次處理。 使用 IronPDF 進行自動比較可提供一致的結果、詳細的變更追蹤和同時處理多個文件的功能。 該程式庫的效能最佳化功能確保即使處理大型檔案也能快速處理,使其適用於企業應用程式。 如何在我的 .NET 專案中安裝和設定 IronPDF? 首先,透過 NuGet 套件管理器在您的 .NET 專案中安裝 IronPDF。 NuGet 安裝指南提供了各種開發環境的詳細安裝步驟: Install-Package IronPdf Install-Package IronPdf SHELL 套件管理器控制台顯示 IronPDF 套件的安裝進度,該套件正在從 NuGet 下載多個相依性。 或使用 .NET CLI 新增參考: dotnet add package IronPdf dotnet add package IronPdf SHELL 對於Linux 部署或Windows 環境,請參閱特定平台的文件。 Docker整合指南有助於容器化部署。 安裝完成後,配置您的授權(開發環境可選): IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY"; IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY"; IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY" $vbLabelText $csharpLabel 有關詳細的許可證配置選項,請參閱許可證密鑰設定指南。 IronPDF 功能概述,主要分為四大類:建立 PDF、轉換 PDF、編輯 PDF 以及簽名和保護 PDF,每類下方都有詳細的功能清單。 系統需求是什麼? IronPDF 支援.NET Framework 4.6.2+ 、.NET Core 3.1+ 和 .NET 5+。 對於macOS 用戶來說,Intel 處理器和 Apple Silicon 處理器都能無縫協作。 此函式庫所需的依賴項極少,並可自動處理Chrome 渲染引擎的安裝。 記憶體需求因 PDF 複雜程度而異,但典型的應用程式在標準配置下都能高效運作。 如何針對不同平台配置 IronPDF? 平台專屬配置可確保在各種環境下達到最佳效能。 對於Azure 部署,建議使用特定的應用程式服務層。 AWS Lambda 使用者應遵循基於容器的部署模式。 該程式庫會自動偵測並配置您的目標平台,但也可以透過渲染選項 API進行手動最佳化。 何時需要許可證密鑰? 即使沒有許可證金鑰,也可以進行開發和測試,但產生的 PDF 上會出現浮水印。 生產環境部署需要有效的許可證,可透過多種許可選項取得。 免費試用版提供所有功能供評估。 依照許可證密鑰故障排除指南中的詳細說明,透過程式碼、設定檔或環境變數配置許可證密鑰。 如何進行基本的PDF比較? PDF比較的基礎是提取和比較文字內容。 IronPDF的文字擷取功能可提供精確的內容檢索。 以下是用於比較兩個PDF檔案的改進程式碼: using IronPdf; using System; using System.Collections.Generic; using System.Linq; class PdfComparer { public static void CompareSimple(string pdf1Path, string pdf2Path) { // Load two PDF documents with error handling var pdf1 = PdfDocument.FromFile(pdf1Path); var pdf2 = PdfDocument.FromFile(pdf2Path); // Extract text from both PDFs using IronPDF's extraction engine string text1 = pdf1.ExtractAllText(); string text2 = pdf2.ExtractAllText(); // Compare the two documents if (text1 == text2) { Console.WriteLine("PDF files are identical"); } else { Console.WriteLine("PDFs have differences"); // Find differences and calculate similarity double similarity = CalculateSimilarity(text1, text2); Console.WriteLine($"Comparison result: {similarity:P} similar"); // Optional: Show character-level differences var differences = GetDetailedDifferences(text1, text2); Console.WriteLine($"Total character differences: {differences}"); } } private static double CalculateSimilarity(string text1, string text2) { int maxLength = Math.Max(text1.Length, text2.Length); if (maxLength == 0) return 1.0; int differences = 0; int minLength = Math.Min(text1.Length, text2.Length); // Character-by-character comparison for (int i = 0; i < minLength; i++) { if (text1[i] != text2[i]) differences++; } // Account for length differences differences += Math.Abs(text1.Length - text2.Length); return 1.0 - (double)differences / maxLength; } private static int GetDetailedDifferences(string text1, string text2) { // Implementation for detailed difference tracking return Math.Abs(text1.Length - text2.Length); } } using IronPdf; using System; using System.Collections.Generic; using System.Linq; class PdfComparer { public static void CompareSimple(string pdf1Path, string pdf2Path) { // Load two PDF documents with error handling var pdf1 = PdfDocument.FromFile(pdf1Path); var pdf2 = PdfDocument.FromFile(pdf2Path); // Extract text from both PDFs using IronPDF's extraction engine string text1 = pdf1.ExtractAllText(); string text2 = pdf2.ExtractAllText(); // Compare the two documents if (text1 == text2) { Console.WriteLine("PDF files are identical"); } else { Console.WriteLine("PDFs have differences"); // Find differences and calculate similarity double similarity = CalculateSimilarity(text1, text2); Console.WriteLine($"Comparison result: {similarity:P} similar"); // Optional: Show character-level differences var differences = GetDetailedDifferences(text1, text2); Console.WriteLine($"Total character differences: {differences}"); } } private static double CalculateSimilarity(string text1, string text2) { int maxLength = Math.Max(text1.Length, text2.Length); if (maxLength == 0) return 1.0; int differences = 0; int minLength = Math.Min(text1.Length, text2.Length); // Character-by-character comparison for (int i = 0; i < minLength; i++) { if (text1[i] != text2[i]) differences++; } // Account for length differences differences += Math.Abs(text1.Length - text2.Length); return 1.0 - (double)differences / maxLength; } private static int GetDetailedDifferences(string text1, string text2) { // Implementation for detailed difference tracking return Math.Abs(text1.Length - text2.Length); } } Imports IronPdf Imports System Imports System.Collections.Generic Imports System.Linq Class PdfComparer Public Shared Sub CompareSimple(pdf1Path As String, pdf2Path As String) ' Load two PDF documents with error handling Dim pdf1 = PdfDocument.FromFile(pdf1Path) Dim pdf2 = PdfDocument.FromFile(pdf2Path) ' Extract text from both PDFs using IronPDF's extraction engine Dim text1 As String = pdf1.ExtractAllText() Dim text2 As String = pdf2.ExtractAllText() ' Compare the two documents If text1 = text2 Then Console.WriteLine("PDF files are identical") Else Console.WriteLine("PDFs have differences") ' Find differences and calculate similarity Dim similarity As Double = CalculateSimilarity(text1, text2) Console.WriteLine($"Comparison result: {similarity:P} similar") ' Optional: Show character-level differences Dim differences = GetDetailedDifferences(text1, text2) Console.WriteLine($"Total character differences: {differences}") End If End Sub Private Shared Function CalculateSimilarity(text1 As String, text2 As String) As Double Dim maxLength As Integer = Math.Max(text1.Length, text2.Length) If maxLength = 0 Then Return 1.0 Dim differences As Integer = 0 Dim minLength As Integer = Math.Min(text1.Length, text2.Length) ' Character-by-character comparison For i As Integer = 0 To minLength - 1 If text1(i) <> text2(i) Then differences += 1 Next ' Account for length differences differences += Math.Abs(text1.Length - text2.Length) Return 1.0 - CDbl(differences) / maxLength End Function Private Shared Function GetDetailedDifferences(text1 As String, text2 As String) As Integer ' Implementation for detailed difference tracking Return Math.Abs(text1.Length - text2.Length) End Function End Class $vbLabelText $csharpLabel 這段程式碼載入兩個 PDF 文件,使用 IronPDF 的文字擷取方法提取它們的完整文字內容,並執行基本比較。 此方法提供了一個相似度百分比,有助於量化文件差異。 對於進階文字操作,請考慮使用尋找和取代功能。 輸入的PDF檔案是什麼樣的? ! PDF 檢視器顯示編號為 INV-2025-001、日期為 2025-10-21、客戶為 John Doe、總金額為 1250.00 美元的發票文件。 這是一份客戶調查表 PDF 文件,包含姓名、電子郵件、滿意度下拉式選單(顯示"優秀")和評論等字段,在 PDF 檢視器中以 100% 縮放比例顯示。 對比結果顯示什麼? Visual Studio 偵錯控制台顯示 PDF 比較輸出,分析文件之間的相似度結果為 2.60% 。 控制台輸出顯示比較結果,即文件之間的相似度百分比。 此指標可協助您快速評估文件差異並決定後續操作。 自訂日誌記錄功能可以保存這些結果以用於稽核追蹤。 相似度百分比是如何計算的? 相似度計算採用基於字元的比較方法,同時考慮內容差異和長度變化。 這種方法提供了一個介於 0%(完全不同)和 100%(完全相同)之間的標準化分數。 對於複雜的比較需求,可以使用 IronPDF 的DOM 存取功能實現自訂演算法,以比較表格或影像等特定元素。 純文字比較的限制是什麼? 僅文字比較無法捕捉格式、圖像或佈局差異。 為了進行包括視覺元素在內的完整比較,請考慮使用影像擷取和影像比較庫。 IronPDF 的柵格化功能可以將頁面轉換為影像,以便在視覺保真度至關重要時進行逐像素比較。 如何逐頁比較PDF文件? 若要進行詳細分析,請逐頁比較 PDF 文檔,以確定具體變更發生的位置。 這種方法對於頁面佈局一致的文檔尤其有效: public static void CompareByPage(string pdf1Path, string pdf2Path) { // Using Comparer class pattern for the first PDF document var pdf1 = PdfDocument.FromFile(pdf1Path); var pdf2 = PdfDocument.FromFile(pdf2Path); int maxPages = Math.Max(pdf1.PageCount, pdf2.PageCount); var pageResults = new List<PageComparisonResult>(); for (int i = 0; i < maxPages; i++) { string page1Text = i < pdf1.PageCount ? pdf1.ExtractTextFromPage(i) : ""; string page2Text = i < pdf2.PageCount ? pdf2.ExtractTextFromPage(i) : ""; if (page1Text != page2Text) { Console.WriteLine($"Difference found on page {i + 1}"); // Calculate page-specific similarity double pageSimilarity = CalculateSimilarity(page1Text, page2Text); Console.WriteLine($" Page {i + 1} similarity: {pageSimilarity:P}"); // Store results for reporting pageResults.Add(new PageComparisonResult { PageNumber = i + 1, Similarity = pageSimilarity, HasDifferences = true }); } } // Generate summary report GeneratePageReport(pageResults); } public class PageComparisonResult { public int PageNumber { get; set; } public double Similarity { get; set; } public bool HasDifferences { get; set; } } public static void CompareByPage(string pdf1Path, string pdf2Path) { // Using Comparer class pattern for the first PDF document var pdf1 = PdfDocument.FromFile(pdf1Path); var pdf2 = PdfDocument.FromFile(pdf2Path); int maxPages = Math.Max(pdf1.PageCount, pdf2.PageCount); var pageResults = new List<PageComparisonResult>(); for (int i = 0; i < maxPages; i++) { string page1Text = i < pdf1.PageCount ? pdf1.ExtractTextFromPage(i) : ""; string page2Text = i < pdf2.PageCount ? pdf2.ExtractTextFromPage(i) : ""; if (page1Text != page2Text) { Console.WriteLine($"Difference found on page {i + 1}"); // Calculate page-specific similarity double pageSimilarity = CalculateSimilarity(page1Text, page2Text); Console.WriteLine($" Page {i + 1} similarity: {pageSimilarity:P}"); // Store results for reporting pageResults.Add(new PageComparisonResult { PageNumber = i + 1, Similarity = pageSimilarity, HasDifferences = true }); } } // Generate summary report GeneratePageReport(pageResults); } public class PageComparisonResult { public int PageNumber { get; set; } public double Similarity { get; set; } public bool HasDifferences { get; set; } } Option Strict On Public Shared Sub CompareByPage(pdf1Path As String, pdf2Path As String) ' Using Comparer class pattern for the first PDF document Dim pdf1 = PdfDocument.FromFile(pdf1Path) Dim pdf2 = PdfDocument.FromFile(pdf2Path) Dim maxPages As Integer = Math.Max(pdf1.PageCount, pdf2.PageCount) Dim pageResults As New List(Of PageComparisonResult)() For i As Integer = 0 To maxPages - 1 Dim page1Text As String = If(i < pdf1.PageCount, pdf1.ExtractTextFromPage(i), "") Dim page2Text As String = If(i < pdf2.PageCount, pdf2.ExtractTextFromPage(i), "") If page1Text <> page2Text Then Console.WriteLine($"Difference found on page {i + 1}") ' Calculate page-specific similarity Dim pageSimilarity As Double = CalculateSimilarity(page1Text, page2Text) Console.WriteLine($" Page {i + 1} similarity: {pageSimilarity:P}") ' Store results for reporting pageResults.Add(New PageComparisonResult With { .PageNumber = i + 1, .Similarity = pageSimilarity, .HasDifferences = True }) End If Next ' Generate summary report GeneratePageReport(pageResults) End Sub Public Class PageComparisonResult Public Property PageNumber As Integer Public Property Similarity As Double Public Property HasDifferences As Boolean End Class $vbLabelText $csharpLabel 此方法遍歷每一頁,使用頁面擷取方法逐一比較內容。 此流程能夠優雅地處理頁數不同的 PDF 文件,非常適合比較頁面可能已新增或刪除的文件。 何時應該使用逐頁比較? 逐頁比較非常適合報告、發票或表格等結構化文檔,因為這些文件中的變更通常發生在特定頁面上。 對於需要精確定位修改位置的多頁文檔,此功能非常有用。 這種方法有助於產生詳細的對比報告,突出顯示頁面特定的變更。 如何處理頁數不同的PDF檔? 當 PDF 檔案的頁數不同時,您的比較邏輯必須能夠優雅地處理缺少的頁面。 IronPDF 的頁面管理功能可以靈活處理頁面差異。 請考慮將缺失頁面視為刪除或新增,並使用合併功能適當地合併結果。 我應該了解哪些性能方面的注意事項? 逐頁比較大型 PDF 檔案會佔用大量記憶體。 實現非同步處理,以提高處理多個文件時的效能。 考慮使用並行處理進行批量比較。 效能優化指南提供了進行高效大規模比較的技巧。 如何同時比較多個PDF文件? 為了改善您的多PDF比較系統,請擴充比較功能,使其具備批次處理能力: public class MultiPdfComparer { public static void CompareMultiple(params string[] pdfPaths) { if (pdfPaths.Length < 2) { Console.WriteLine("At least 2 PDFs required for comparison"); return; } // Load first PDF document as reference var referencePdf = PdfDocument.FromFile(pdfPaths[0]); string referenceText = referencePdf.ExtractAllText(); var results = new List<ComparisonResult>(); // Compare with other PDF files for (int i = 1; i < pdfPaths.Length; i++) { try { var currentPdf = PdfDocument.FromFile(pdfPaths[i]); string currentText = currentPdf.ExtractAllText(); double similarity = CalculateSimilarity(referenceText, currentText); results.Add(new ComparisonResult { FileName = Path.GetFileName(pdfPaths[i]), Similarity = similarity, IsIdentical = referenceText == currentText }); if (referenceText != currentText) { Console.WriteLine($"PDF {i} differs from reference - Similarity: {similarity:P}"); } else { Console.WriteLine($"PDF {i} is identical to reference"); } } catch (Exception ex) { Console.WriteLine($"Error processing {pdfPaths[i]}: {ex.Message}"); } } // Generate batch comparison report GenerateBatchReport(results); } private static void GenerateBatchReport(List<ComparisonResult> results) { // Implementation for batch report generation // Can use IronPDF's HTML to PDF feature for formatted reports } } public class ComparisonResult { public string FileName { get; set; } public double Similarity { get; set; } public bool IsIdentical { get; set; } } public class MultiPdfComparer { public static void CompareMultiple(params string[] pdfPaths) { if (pdfPaths.Length < 2) { Console.WriteLine("At least 2 PDFs required for comparison"); return; } // Load first PDF document as reference var referencePdf = PdfDocument.FromFile(pdfPaths[0]); string referenceText = referencePdf.ExtractAllText(); var results = new List<ComparisonResult>(); // Compare with other PDF files for (int i = 1; i < pdfPaths.Length; i++) { try { var currentPdf = PdfDocument.FromFile(pdfPaths[i]); string currentText = currentPdf.ExtractAllText(); double similarity = CalculateSimilarity(referenceText, currentText); results.Add(new ComparisonResult { FileName = Path.GetFileName(pdfPaths[i]), Similarity = similarity, IsIdentical = referenceText == currentText }); if (referenceText != currentText) { Console.WriteLine($"PDF {i} differs from reference - Similarity: {similarity:P}"); } else { Console.WriteLine($"PDF {i} is identical to reference"); } } catch (Exception ex) { Console.WriteLine($"Error processing {pdfPaths[i]}: {ex.Message}"); } } // Generate batch comparison report GenerateBatchReport(results); } private static void GenerateBatchReport(List<ComparisonResult> results) { // Implementation for batch report generation // Can use IronPDF's HTML to PDF feature for formatted reports } } public class ComparisonResult { public string FileName { get; set; } public double Similarity { get; set; } public bool IsIdentical { get; set; } } Imports System Imports System.Collections.Generic Imports System.IO Public Class MultiPdfComparer Public Shared Sub CompareMultiple(ParamArray pdfPaths As String()) If pdfPaths.Length < 2 Then Console.WriteLine("At least 2 PDFs required for comparison") Return End If ' Load first PDF document as reference Dim referencePdf = PdfDocument.FromFile(pdfPaths(0)) Dim referenceText As String = referencePdf.ExtractAllText() Dim results As New List(Of ComparisonResult)() ' Compare with other PDF files For i As Integer = 1 To pdfPaths.Length - 1 Try Dim currentPdf = PdfDocument.FromFile(pdfPaths(i)) Dim currentText As String = currentPdf.ExtractAllText() Dim similarity As Double = CalculateSimilarity(referenceText, currentText) results.Add(New ComparisonResult With { .FileName = Path.GetFileName(pdfPaths(i)), .Similarity = similarity, .IsIdentical = (referenceText = currentText) }) If referenceText <> currentText Then Console.WriteLine($"PDF {i} differs from reference - Similarity: {similarity:P}") Else Console.WriteLine($"PDF {i} is identical to reference") End If Catch ex As Exception Console.WriteLine($"Error processing {pdfPaths(i)}: {ex.Message}") End Try Next ' Generate batch comparison report GenerateBatchReport(results) End Sub Private Shared Sub GenerateBatchReport(results As List(Of ComparisonResult)) ' Implementation for batch report generation ' Can use IronPDF's HTML to PDF feature for formatted reports End Sub End Class Public Class ComparisonResult Public Property FileName As String Public Property Similarity As Double Public Property IsIdentical As Boolean End Class $vbLabelText $csharpLabel 這種方法可以將多個 PDF 文件與參考文件進行比較,非常適合批量處理需求。 此實作包括錯誤處理和結果收集,以便使用IronPDF 的報告功能進行完整報告。 多文檔比較能提供哪些結果? 比較 PDF 檔案後,Visual Studio 偵錯控制台輸出顯示"PDF 1 與參考檔案不同"訊息 多文檔比較功能可以全面展示多個文件與參考文獻之間的關係。 結果包括相似度百分比、相同文件識別和詳細差異追蹤。 使用IronPDF 的匯出功能將此資料匯出為各種格式,以便進行進一步分析或存檔。 如何選擇參考文件? 選擇參考文件取決於您的使用場景。 版本控制方面,請使用最新核准的版本。 為保證質量,請以預期輸出為參考。 考慮實作邏輯,根據 PDF 中嵌入的元資料(例如建立日期或版本號)自動選擇參考文獻。 批量處理的最佳實踐是什麼? 批量處理受益於非同步操作和合理的資源管理。 對大批量文件實施進度跟踪,在適當情況下使用並行處理,並在同時處理大量大型 PDF 文件時考慮內存優化技術。 如何比較受密碼保護的PDF檔案? IronPDF 透過簡單的步驟輕鬆處理加密 PDF 文件。 該庫支援多種加密標準,並提供安全的密碼處理功能。 載入受保護檔案時需要輸入密碼: public static void CompareSecuredPdfs(string pdf1Path, string pdf2Path, string password1, string password2) { try { // Load and compare two PDFs with passwords // IronPDF handles various encryption types automatically var pdf1 = PdfDocument.FromFile(pdf1Path, password1); var pdf2 = PdfDocument.FromFile(pdf2Path, password2); // Verify successful loading Console.WriteLine($"PDF 1 loaded: {pdf1.PageCount} pages"); Console.WriteLine($"PDF 2 loaded: {pdf2.PageCount} pages"); string text1 = pdf1.ExtractAllText(); string text2 = pdf2.ExtractAllText(); // Compare two PDF files and save results bool identical = text1.Equals(text2); double similarity = CalculateSimilarity(text1, text2); var comparisonResult = identical ? "identical" : "different"; Console.WriteLine($"Secured PDFs are {comparisonResult}"); Console.WriteLine($"Similarity: {similarity:P}"); // Optional: Save comparison results to a new secured PDF if (!identical) { SaveSecuredComparisonReport(similarity, "comparison-report.pdf", "report-password"); } } catch (Exception ex) { Console.WriteLine($"Error handling secured PDFs: {ex.Message}"); // Handle incorrect passwords or other security issues } } private static void SaveSecuredComparisonReport(double similarity, string outputPath, string password) { // Create and secure the comparison report var renderer = new ChromePdfRenderer(); var reportPdf = renderer.RenderHtmlAsPdf($"<h1>Comparison Result</h1><p>Similarity: {similarity:P}</p>"); // Apply security settings reportPdf.SecuritySettings.OwnerPassword = password; reportPdf.SecuritySettings.UserPassword = password; reportPdf.SecuritySettings.AllowUserPrinting = true; reportPdf.SecuritySettings.AllowUserCopyPasteContent = false; reportPdf.SaveAs(outputPath); } public static void CompareSecuredPdfs(string pdf1Path, string pdf2Path, string password1, string password2) { try { // Load and compare two PDFs with passwords // IronPDF handles various encryption types automatically var pdf1 = PdfDocument.FromFile(pdf1Path, password1); var pdf2 = PdfDocument.FromFile(pdf2Path, password2); // Verify successful loading Console.WriteLine($"PDF 1 loaded: {pdf1.PageCount} pages"); Console.WriteLine($"PDF 2 loaded: {pdf2.PageCount} pages"); string text1 = pdf1.ExtractAllText(); string text2 = pdf2.ExtractAllText(); // Compare two PDF files and save results bool identical = text1.Equals(text2); double similarity = CalculateSimilarity(text1, text2); var comparisonResult = identical ? "identical" : "different"; Console.WriteLine($"Secured PDFs are {comparisonResult}"); Console.WriteLine($"Similarity: {similarity:P}"); // Optional: Save comparison results to a new secured PDF if (!identical) { SaveSecuredComparisonReport(similarity, "comparison-report.pdf", "report-password"); } } catch (Exception ex) { Console.WriteLine($"Error handling secured PDFs: {ex.Message}"); // Handle incorrect passwords or other security issues } } private static void SaveSecuredComparisonReport(double similarity, string outputPath, string password) { // Create and secure the comparison report var renderer = new ChromePdfRenderer(); var reportPdf = renderer.RenderHtmlAsPdf($"<h1>Comparison Result</h1><p>Similarity: {similarity:P}</p>"); // Apply security settings reportPdf.SecuritySettings.OwnerPassword = password; reportPdf.SecuritySettings.UserPassword = password; reportPdf.SecuritySettings.AllowUserPrinting = true; reportPdf.SecuritySettings.AllowUserCopyPasteContent = false; reportPdf.SaveAs(outputPath); } Imports System Public Module PdfComparer Public Sub CompareSecuredPdfs(pdf1Path As String, pdf2Path As String, password1 As String, password2 As String) Try ' Load and compare two PDFs with passwords ' IronPDF handles various encryption types automatically Dim pdf1 = PdfDocument.FromFile(pdf1Path, password1) Dim pdf2 = PdfDocument.FromFile(pdf2Path, password2) ' Verify successful loading Console.WriteLine($"PDF 1 loaded: {pdf1.PageCount} pages") Console.WriteLine($"PDF 2 loaded: {pdf2.PageCount} pages") Dim text1 As String = pdf1.ExtractAllText() Dim text2 As String = pdf2.ExtractAllText() ' Compare two PDF files and save results Dim identical As Boolean = text1.Equals(text2) Dim similarity As Double = CalculateSimilarity(text1, text2) Dim comparisonResult As String = If(identical, "identical", "different") Console.WriteLine($"Secured PDFs are {comparisonResult}") Console.WriteLine($"Similarity: {similarity:P}") ' Optional: Save comparison results to a new secured PDF If Not identical Then SaveSecuredComparisonReport(similarity, "comparison-report.pdf", "report-password") End If Catch ex As Exception Console.WriteLine($"Error handling secured PDFs: {ex.Message}") ' Handle incorrect passwords or other security issues End Try End Sub Private Sub SaveSecuredComparisonReport(similarity As Double, outputPath As String, password As String) ' Create and secure the comparison report Dim renderer = New ChromePdfRenderer() Dim reportPdf = renderer.RenderHtmlAsPdf($"<h1>Comparison Result</h1><p>Similarity: {similarity:P}</p>") ' Apply security settings reportPdf.SecuritySettings.OwnerPassword = password reportPdf.SecuritySettings.UserPassword = password reportPdf.SecuritySettings.AllowUserPrinting = True reportPdf.SecuritySettings.AllowUserCopyPasteContent = False reportPdf.SaveAs(outputPath) End Sub End Module $vbLabelText $csharpLabel 透過將密碼傳遞給FromFile方法,您可以比較加密的 PDF,非常適合敏感文件工作流程。 IronPDF 的安全功能可確保對受保護內容進行正確處理。 我應該遵循哪些安全注意事項? 處理受密碼保護的 PDF 檔案時,切勿將密碼硬編碼到原始程式碼中。 使用安全儲存方式,例如環境變數或金鑰庫。 實施適當的日誌記錄規範,排除敏感資訊。 考慮使用數位簽章進行額外的安全驗證。 如何處理不同的加密類型? IronPDF 可自動偵測和處理各種 PDF 加密標準,包括 40 位元 RC4、128 位元 RC4 和 128 位元 AES。 該圖書館的加密功能同時支援使用者密碼和所有者密碼。 對於進階加密需求,請參閱PDF/UA 合規性指南,以了解符合無障礙標準的安全性。 如果密碼錯誤會發生什麼事? 密碼錯誤會拋出特定的異常,這些異常應該被捕獲並妥善處理。 實現帶有嘗試次數限制的重試邏輯,以防止暴力破解攻擊。 使用 IronPDF 的錯誤處理模式,在保持安全性的同時提供有意義的回饋。 如何產生PDF對比報告? 使用 IronPDF 的HTML 轉 PDF功能產生詳細的比較結果並儲存以供檢視: public static void CreateComparisonReport(string pdf1Path, string pdf2Path) { var pdf1 = PdfDocument.FromFile(pdf1Path); var pdf2 = PdfDocument.FromFile(pdf2Path); // Extract and compare with detailed tracking var differences = new List<PageDifference>(); int totalPages = Math.Max(pdf1.PageCount, pdf2.PageCount); for (int i = 0; i < totalPages; i++) { // Extract page text with null checking string page1Text = i < pdf1.PageCount ? pdf1.ExtractTextFromPage(i) ?? string.Empty : string.Empty; string page2Text = i < pdf2.PageCount ? pdf2.ExtractTextFromPage(i) ?? string.Empty : string.Empty; // If identical, no entry needed if (page1Text == page2Text) continue; // Compute detailed similarity metrics double similarity = CalculateSimilarity(page1Text, page2Text); differences.Add(new PageDifference { PageNumber = i + 1, Similarity = similarity, Text1Length = page1Text.Length, Text2Length = page2Text.Length, CharacterDifferences = GetCharacterDifferences(page1Text, page2Text) }); } // Create styled HTML report var renderer = new ChromePdfRenderer(); renderer.RenderingOptions.MarginTop = 25; renderer.RenderingOptions.MarginBottom = 25; renderer.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Print; var sb = new System.Text.StringBuilder(); sb.Append(@" <html> <head> <style> body { font-family: Arial, sans-serif; margin: 20px; } h1 { color: #333; border-bottom: 2px solid #4CAF50; } .summary { background-color: #f0f0f0; padding: 15px; border-radius: 5px; } .difference { margin: 10px 0; padding: 10px; border-left: 3px solid #ff9800; } table { border-collapse: collapse; width: 100%; } th, td { border: 1px solid #ddd; padding: 8px; text-align: left; } th { background-color: #4CAF50; color: white; } </style> </head> <body> "); sb.Append("<h1>PDF Comparison Report</h1>"); sb.Append($"<div class='summary'>"); sb.Append($"<h2>Summary</h2>"); sb.Append($"<p><strong>Files Compared:</strong> {Path.GetFileName(pdf1Path)} vs {Path.GetFileName(pdf2Path)}</p>"); sb.Append($"<p><strong>Total Differences:</strong> {differences.Count} pages</p>"); sb.Append($"<p><strong>Report Generated:</strong> {DateTime.Now:yyyy-MM-dd HH:mm:ss}</p>"); sb.Append("</div>"); if (differences.Count > 0) { sb.Append("<h2>Detailed Differences</h2>"); sb.Append("<table>"); sb.Append("<tr><th>Page</th><th>Similarity</th><th>File 1 Length</th><th>File 2 Length</th><th>Character Differences</th></tr>"); foreach (var diff in differences) { sb.Append($"<tr>"); sb.Append($"<td>{diff.PageNumber}</td>"); sb.Append($"<td>{diff.Similarity:P}</td>"); sb.Append($"<td>{diff.Text1Length}</td>"); sb.Append($"<td>{diff.Text2Length}</td>"); sb.Append($"<td>{diff.CharacterDifferences}</td>"); sb.Append($"</tr>"); } sb.Append("</table>"); } else { sb.Append("<p class='summary' style='background-color: #c8e6c9;'>✓ No differences detected - files are identical.</p>"); } sb.Append("</body></html>"); var reportPdf = renderer.RenderHtmlAsPdf(sb.ToString()); // Add metadata to the report reportPdf.MetaData.Author = "PDF Comparison Tool"; reportPdf.MetaData.Title = "PDF Comparison Report"; reportPdf.MetaData.CreationDate = DateTime.Now; reportPdf.SaveAs("comparison-report.pdf"); } public class PageDifference { public int PageNumber { get; set; } public double Similarity { get; set; } public int Text1Length { get; set; } public int Text2Length { get; set; } public int CharacterDifferences { get; set; } } private static int GetCharacterDifferences(string text1, string text2) { // Implementation for counting character-level differences // Could use more sophisticated algorithms like Levenshtein distance return Math.Abs(text1.Length - text2.Length); } public static void CreateComparisonReport(string pdf1Path, string pdf2Path) { var pdf1 = PdfDocument.FromFile(pdf1Path); var pdf2 = PdfDocument.FromFile(pdf2Path); // Extract and compare with detailed tracking var differences = new List<PageDifference>(); int totalPages = Math.Max(pdf1.PageCount, pdf2.PageCount); for (int i = 0; i < totalPages; i++) { // Extract page text with null checking string page1Text = i < pdf1.PageCount ? pdf1.ExtractTextFromPage(i) ?? string.Empty : string.Empty; string page2Text = i < pdf2.PageCount ? pdf2.ExtractTextFromPage(i) ?? string.Empty : string.Empty; // If identical, no entry needed if (page1Text == page2Text) continue; // Compute detailed similarity metrics double similarity = CalculateSimilarity(page1Text, page2Text); differences.Add(new PageDifference { PageNumber = i + 1, Similarity = similarity, Text1Length = page1Text.Length, Text2Length = page2Text.Length, CharacterDifferences = GetCharacterDifferences(page1Text, page2Text) }); } // Create styled HTML report var renderer = new ChromePdfRenderer(); renderer.RenderingOptions.MarginTop = 25; renderer.RenderingOptions.MarginBottom = 25; renderer.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Print; var sb = new System.Text.StringBuilder(); sb.Append(@" <html> <head> <style> body { font-family: Arial, sans-serif; margin: 20px; } h1 { color: #333; border-bottom: 2px solid #4CAF50; } .summary { background-color: #f0f0f0; padding: 15px; border-radius: 5px; } .difference { margin: 10px 0; padding: 10px; border-left: 3px solid #ff9800; } table { border-collapse: collapse; width: 100%; } th, td { border: 1px solid #ddd; padding: 8px; text-align: left; } th { background-color: #4CAF50; color: white; } </style> </head> <body> "); sb.Append("<h1>PDF Comparison Report</h1>"); sb.Append($"<div class='summary'>"); sb.Append($"<h2>Summary</h2>"); sb.Append($"<p><strong>Files Compared:</strong> {Path.GetFileName(pdf1Path)} vs {Path.GetFileName(pdf2Path)}</p>"); sb.Append($"<p><strong>Total Differences:</strong> {differences.Count} pages</p>"); sb.Append($"<p><strong>Report Generated:</strong> {DateTime.Now:yyyy-MM-dd HH:mm:ss}</p>"); sb.Append("</div>"); if (differences.Count > 0) { sb.Append("<h2>Detailed Differences</h2>"); sb.Append("<table>"); sb.Append("<tr><th>Page</th><th>Similarity</th><th>File 1 Length</th><th>File 2 Length</th><th>Character Differences</th></tr>"); foreach (var diff in differences) { sb.Append($"<tr>"); sb.Append($"<td>{diff.PageNumber}</td>"); sb.Append($"<td>{diff.Similarity:P}</td>"); sb.Append($"<td>{diff.Text1Length}</td>"); sb.Append($"<td>{diff.Text2Length}</td>"); sb.Append($"<td>{diff.CharacterDifferences}</td>"); sb.Append($"</tr>"); } sb.Append("</table>"); } else { sb.Append("<p class='summary' style='background-color: #c8e6c9;'>✓ No differences detected - files are identical.</p>"); } sb.Append("</body></html>"); var reportPdf = renderer.RenderHtmlAsPdf(sb.ToString()); // Add metadata to the report reportPdf.MetaData.Author = "PDF Comparison Tool"; reportPdf.MetaData.Title = "PDF Comparison Report"; reportPdf.MetaData.CreationDate = DateTime.Now; reportPdf.SaveAs("comparison-report.pdf"); } public class PageDifference { public int PageNumber { get; set; } public double Similarity { get; set; } public int Text1Length { get; set; } public int Text2Length { get; set; } public int CharacterDifferences { get; set; } } private static int GetCharacterDifferences(string text1, string text2) { // Implementation for counting character-level differences // Could use more sophisticated algorithms like Levenshtein distance return Math.Abs(text1.Length - text2.Length); } Imports System Imports System.IO Imports System.Text Imports IronPdf Public Module PdfComparison Public Sub CreateComparisonReport(pdf1Path As String, pdf2Path As String) Dim pdf1 = PdfDocument.FromFile(pdf1Path) Dim pdf2 = PdfDocument.FromFile(pdf2Path) ' Extract and compare with detailed tracking Dim differences As New List(Of PageDifference)() Dim totalPages As Integer = Math.Max(pdf1.PageCount, pdf2.PageCount) For i As Integer = 0 To totalPages - 1 ' Extract page text with null checking Dim page1Text As String = If(i < pdf1.PageCount, pdf1.ExtractTextFromPage(i), String.Empty) Dim page2Text As String = If(i < pdf2.PageCount, pdf2.ExtractTextFromPage(i), String.Empty) ' If identical, no entry needed If page1Text = page2Text Then Continue For ' Compute detailed similarity metrics Dim similarity As Double = CalculateSimilarity(page1Text, page2Text) differences.Add(New PageDifference With { .PageNumber = i + 1, .Similarity = similarity, .Text1Length = page1Text.Length, .Text2Length = page2Text.Length, .CharacterDifferences = GetCharacterDifferences(page1Text, page2Text) }) Next ' Create styled HTML report Dim renderer As New ChromePdfRenderer() renderer.RenderingOptions.MarginTop = 25 renderer.RenderingOptions.MarginBottom = 25 renderer.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Print Dim sb As New StringBuilder() sb.Append(" <html> <head> <style> body { font-family: Arial, sans-serif; margin: 20px; } h1 { color: #333; border-bottom: 2px solid #4CAF50; } .summary { background-color: #f0f0f0; padding: 15px; border-radius: 5px; } .difference { margin: 10px 0; padding: 10px; border-left: 3px solid #ff9800; } table { border-collapse: collapse; width: 100%; } th, td { border: 1px solid #ddd; padding: 8px; text-align: left; } th { background-color: #4CAF50; color: white; } </style> </head> <body> ") sb.Append("<h1>PDF Comparison Report</h1>") sb.Append("<div class='summary'>") sb.Append("<h2>Summary</h2>") sb.Append($"<p><strong>Files Compared:</strong> {Path.GetFileName(pdf1Path)} vs {Path.GetFileName(pdf2Path)}</p>") sb.Append($"<p><strong>Total Differences:</strong> {differences.Count} pages</p>") sb.Append($"<p><strong>Report Generated:</strong> {DateTime.Now:yyyy-MM-dd HH:mm:ss}</p>") sb.Append("</div>") If differences.Count > 0 Then sb.Append("<h2>Detailed Differences</h2>") sb.Append("<table>") sb.Append("<tr><th>Page</th><th>Similarity</th><th>File 1 Length</th><th>File 2 Length</th><th>Character Differences</th></tr>") For Each diff In differences sb.Append("<tr>") sb.Append($"<td>{diff.PageNumber}</td>") sb.Append($"<td>{diff.Similarity:P}</td>") sb.Append($"<td>{diff.Text1Length}</td>") sb.Append($"<td>{diff.Text2Length}</td>") sb.Append($"<td>{diff.CharacterDifferences}</td>") sb.Append("</tr>") Next sb.Append("</table>") Else sb.Append("<p class='summary' style='background-color: #c8e6c9;'>✓ No differences detected - files are identical.</p>") End If sb.Append("</body></html>") Dim reportPdf = renderer.RenderHtmlAsPdf(sb.ToString()) ' Add metadata to the report reportPdf.MetaData.Author = "PDF Comparison Tool" reportPdf.MetaData.Title = "PDF Comparison Report" reportPdf.MetaData.CreationDate = DateTime.Now reportPdf.SaveAs("comparison-report.pdf") End Sub Private Function GetCharacterDifferences(text1 As String, text2 As String) As Integer ' Implementation for counting character-level differences ' Could use more sophisticated algorithms like Levenshtein distance Return Math.Abs(text1.Length - text2.Length) End Function End Module Public Class PageDifference Public Property PageNumber As Integer Public Property Similarity As Double Public Property Text1Length As Integer Public Property Text2Length As Integer Public Property CharacterDifferences As Integer End Class $vbLabelText $csharpLabel 此完整的報告解決方案利用 IronPDF 的HTML 渲染功能,建立具有樣式和詳細指標的專業比較報告。 對比報告是什麼樣的? PDF對比報告顯示,第一頁列出了兩個相似度為2.60%的文件之間的一個差異,並以結構化格式呈現詳細指標。 產生的報告清晰概述了差異,並逐頁進行了詳細分析。 報告可以包含圖表,以直觀地表示相似度得分。 如何自訂報表格式? IronPDF 的CSS 支援可實現報告的完全自訂。 使用自訂字體、顏色和佈局,以符合企業品牌形象。 新增帶有頁碼和時間戳記的頁首和頁尾。 實現響應式設計,使報表能夠在不同裝置上查看。 我還可以新增哪些其他指標? 利用字數差異、格式變更或結構修改等進階指標來改善報告。 使用 IronPDF 的DOM 存取權限來分析特定元素。 新增已更改頁面的縮圖,以便進行視覺參考。 新增書籤,方便瀏覽冗長的報告。 為什麼我應該選擇 IronPDF 進行 PDF 比對? IronPDF憑藉其簡單易用的API和完整的功能集,在PDF比較方面表現出色。 此程式庫支援.NET Core 、 .NET Framework ,並可在Windows 、 Linux和macOS上運作。 主要優勢包括: 簡潔易用的 API,只需少量程式碼即可比較 PDF 文件 支援不同的 PDF 版本,包括PDF/A 內建版本控制和文件歷史記錄功能 易於開發比較工具,並提供完整範例 *專業文件和專屬支持 ! 跨平台支援圖展示了 IronPDF 與多個 .NET 版本、作業系統、雲端平台和開發環境的兼容性 IronPDF 與其他庫有何不同? IronPDF 的獨特之處在於其基於 Chrome 的渲染引擎,可確保精確的文字擷取和像素級完美的PDF 生成。 與其他程式庫不同,它提供了與現代 JavaScript 框架的無縫整合、完整的安全功能和廣泛的跨平台支援。 該程式庫的效能最佳化使其適用於企業級應用程式。 許可證制度是如何運作的? IronPDF 提供靈活的許可選項,從個人開發者到企業部署均可適用。 許可證包含免費更新、專屬支援和部署權限。 試用許可證提供全部功能供評估使用。 團隊規模較大時可享有批量折扣和網站許可。 有哪些支援選項? IronPDF 提供全面的支持,包括詳細的文件、程式碼範例和影片教學。 工程技術支援有助於解決複雜問題。 社區論壇和知識庫提供更多開發者資源。 下一步是什麼? IronPDF 將複雜的 PDF 比較任務轉換為可管理的操作。 無論是建立文件管理系統還是使用 C# 比較兩個 PDF 文件,IronPDF 都能提供您進行專業 PDF 處理所需的所有工具,從基本的文本提取到高級文件分析。 IronPDF 功能概述,展示了像素級完美渲染、5 分鐘快速設定以及與支援技術的跨平台相容性。 想了解更多? 下載 IronPDF 的免費試用版,即可體驗專業級的 PDF 比較功能。 對於生產環境部署,請了解我們的許可選項並參考我們的完整文件以獲取更多詳細資訊。 首先請參考我們的快速入門指南,幾分鐘內即可完成您的第一個 PDF 比較。 IronPDF 許可頁面顯示四個定價等級(Lite、Plus、Professional 和 Unlimited),每個等級對開發者、地點和項目數量都有不同的限制,此外還提供促銷優惠和 30 天退款保證。 如何開始免費試用? 入門很簡單—透過 NuGet下載 IronPDF或直接安裝即可。 快速入門教學將引導您完成初始設定。 30 天試用期無需信用卡,包含所有功能。 請按照適用於您的特定平台和開發環境的安裝指南進行操作。 有哪些資源可以幫助我了解更多? 探索涵蓋 PDF 建立、編輯和操作的完整教學系列。 API 參考文件提供了詳細的方法說明。 查看常見場景的程式碼範例。 加入開發者社區,獲取技巧和最佳實踐。 哪裡可以找到更多範例? 範例部分展示了現實世界的應用,包括表單處理、浮水印和批量處理。 GitHub 程式碼庫包含完整的範例專案。 故障排除指南透過有效的程式碼解決方案幫助解決常見問題。 常見問題解答 如何使用 C# 比較兩個 PDF 檔案? 您可以利用 IronPDF 強大的 PDF 比較功能,使用 C# 來比較兩個 PDF 檔案,此功能可讓您找出兩個 PDF 文件在文字、影像和排版上的差異。 使用 IronPDF 進行 PDF 比較有哪些好處? IronPDF 提供簡單有效的方式比較 PDF 檔案,確保偵測差異的精確度。它支援多種比較模式,並可與 C# 專案無縫整合。 IronPDF 可以處理大型 PDF 檔案進行比較嗎? 是的,IronPDF 的設計可有效處理大型 PDF 檔案,因此適合比較大量文件而不影響效能。 IronPDF 支援 PDF 的視覺比較嗎? IronPDF 可透過高亮顯示版面與圖像的差異,進行 PDF 的視覺比較,全面檢視文件之間的變更。 是否可以使用 IronPDF 自動進行 PDF 比對? 是的,您可以在 C# 應用程式中使用 IronPDF 自動執行 PDF 比較程序,這非常適合需要頻繁或批次比較的場景。 IronPDF 可以檢測 PDF 檔案中哪些類型的差異? IronPDF 可以檢測文字、圖形和排版上的差異,確保能夠徹底比對 PDF 檔案的全部內容。 IronPDF 如何確保 PDF 比較的準確性? IronPDF 使用先進的演算法仔細比對 PDF 內容,將忽略細微差異的風險降至最低,以確保準確性。 我可以將 IronPDF 與其他 .NET 應用程式整合以進行 PDF 比對嗎? 是的,IronPDF 的設計可以與 .NET 應用程式無縫整合,讓開發人員可以將 PDF 比較功能整合到現有的軟體解決方案中。 使用 IronPDF 之前需要有 PDF 比對的經驗嗎? 不需要任何經驗。IronPDF 提供用戶友好的工具和全面的說明文件,即使您是 PDF 操作的新手,也能引導您完成比較 PDF 的過程。 IronPDF 的 PDF 比較功能是否有示範或試用版? 是的,IronPDF 提供免費試用版,讓您可以在承諾購買之前探索並測試其 PDF 比較功能。 Curtis Chau 立即與工程團隊聊天 技術撰稿人 Curtis Chau 擁有電腦科學學士學位(卡爾頓大學),專長於前端開發,精通 Node.js、TypeScript、JavaScript 和 React。Curtis 對製作直覺且美觀的使用者介面充滿熱情,他喜歡使用現代化的架構,並製作結構良好且視覺上吸引人的手冊。除了開發之外,Curtis 對物聯網 (IoT) 也有濃厚的興趣,他喜歡探索整合硬體與軟體的創新方式。在空閒時間,他喜歡玩遊戲和建立 Discord bots,將他對技術的熱愛與創意結合。 相關文章 更新2026年1月22日 How to Create PDF Documents in .NET with IronPDF: Complete Guide Discover effective methods to create PDF files in C# for developers. Enhance your coding skills and streamline your projects. Read the article now! 閱讀更多 更新2026年1月21日 How to Merge PDF Files in VB.NET: Complete Tutorial Merge PDF VB NET with IronPDF. Learn to combine multiple PDF files into one document using simple VB.NET code. Step-by-step examples included. 閱讀更多 更新2026年1月21日 C# PDFWriter Tutorial: Create PDF Documents in .NET Learn to create PDFs efficiently using C# PDFWriter with this step-by-step guide for developers. Read the article to enhance your skills today! 閱讀更多 ASP Convert HTML to PDF: Complete Guide with IronPDFHow to Convert Webpage to PDF in AS...
更新2026年1月22日 How to Create PDF Documents in .NET with IronPDF: Complete Guide Discover effective methods to create PDF files in C# for developers. Enhance your coding skills and streamline your projects. Read the article now! 閱讀更多
更新2026年1月21日 How to Merge PDF Files in VB.NET: Complete Tutorial Merge PDF VB NET with IronPDF. Learn to combine multiple PDF files into one document using simple VB.NET code. Step-by-step examples included. 閱讀更多
更新2026年1月21日 C# PDFWriter Tutorial: Create PDF Documents in .NET Learn to create PDFs efficiently using C# PDFWriter with this step-by-step guide for developers. Read the article to enhance your skills today! 閱讀更多