產品比較

SpirePDF C# HTML轉PDF教學與庫比較

介紹

您是否正在尋找一個 PDF 程式庫來執行所有與 PDF 相關的任務,而不需要安裝 Adobe Acrobat,但又不知道在當前眾多的 PDF 程式庫中該選擇哪一個? 今天,我們將深入研究在.NET環境中兩個著名的PDF庫,IronPDF 和 Spire.PDF。

在這份比較指南中,我們將查看這些庫所提供的功能、它們如何幫助您、這些庫的可用文件以及使用這些庫的授權價格。

IronPDF和Spire.PDF的簡要概述

IronPDF 是一個多功能的 .NET PDF 庫,旨在處理各種與 PDF 有關的任務,包括轉換 PDF 文件、編輯 PDF、創建 PDF、閱讀 PDF 文件等。 它以易於整合到現有的 .NET 應用程序、高性能以及對 HTML5、CSS3 和 JavaScript 等現代網路標準的支援而聞名。 IronPDF 的 API 具有直覺性,如果您希望為您的項目添加強大的 PDF 功能,這是個很好的選擇。

Spire.PDF for .NET 是另一個強大的 .NET PDF 庫,提供全方位的功能,用於 PDF 建立和操作。 它支持各種 PDF 功能,如文字和圖像提取、PDF 表單填寫以及數位簽名。 Spire.PDF 被設計為易於使用,並可無縫整合到 .NET 應用程式中,這使其成為您的 PDF 專案的另一個潛在選擇。

如需有關 IronPDF 更詳細的資訊,請造訪 IronPDF.com

跨平台相容性

IronPDF

IronPDF 因其廣泛的跨平台相容性而脫穎而出。 它支持 .NET 框架內的多種環境,確保在不同平台上流暢運行。 以下是IronPDF平台相容性的摘要:

  • .NET 版本:

    • 完全以 C#、VB.NET 和 F# 撰寫並提供支援

    • .NET Core (8, 7, 6, 5, 和 3.1+)

    • .NET Standard (2.0+)
  • .NET Framework (4.6.2+)
  • 應用環境:IronPDF 可在多種應用環境中運行,如 Windows、Linux、Mac、Docker、Azure 和 AWS。
  • IDE:可與 Microsoft Visual Studio 和 JetBrains Rider & ReSharper 等 IDE 一起使用
  • 作業系統和處理器:支援多種不同的作業系統和處理器,包括 Windows、Mac、Linux、x64、x86、ARM

    有關 IronPDF 相容性的更多詳細資訊,請瀏覽 IronPDF 功能頁面

Spire.PDF

Spire.PDF 在 .NET 環境中具有完整的支援,但儘管它可以在 Windows 作業系統中運行,它缺乏像 IronPDF 那樣對 Linux 和 macOS 的原生支援。

  • .NET 支援:

    • .NET Framework 2.0+

    • .NET Core 2.0+
  • 使用 C# 編寫,並支援 VB.NET
  • 應用環境: Spire.PDF 可在各種應用環境中運作,如 Windows 和 ASP.NET 應用程式,它也支援 Windows Forms。

功能比較:IronPDF 與 Spire.PDF 的 PDF 功能

IronPDF 和 Spire.PDF 都提供了一系列針對不同 PDF 功能的特點。 以下是每個函式庫所提供的主要功能比較:

IronPDF 功能

  • PDF 轉換:IronPDF 可以將 HTML 轉換為 PDF,並且由於其對現代網頁標準的全面支持,您可以放心 IronPDF 將始終如一地從您的 HTML 內容中返回像素完美的 PDF。 IronPDF 也可以將其他格式如 DOCX、圖片、RTF 等轉換為 PDF 文件。
  • PDF 生成:使用 IronPDF,您可以從 URL、ASPX 文件或 HTML 字符串生成 PDF。
  • 安全特性:使用 IronPDF,您可以始終確保任何敏感的 PDF 文件是安全的,這要歸功於它的安全特性。 使用 IronPDF 加密您的 PDF 檔案,設定密碼,並為您的 PDF 檔案設定許可權。
  • PDF 編輯功能:使用 IronPDF,您可以處理現有的 PDF 文件、編輯它們,並輕鬆閱讀 PDF 文件。 IronPDF 提供編輯功能,例如添加頁首和頁尾、將文字和圖片蓋印到 PDF 頁面上、在 PDF 中添加自訂浮水印、處理 PDF 表單,以及拆分或合併 PDF 文件。
  • 集成:與ASP.NET和MVC應用程式無縫整合。
  • PDF 版本支持:可以支持 PDF 版本 1.2-1.7

    要查看 IronPDF 功能的完整列表,請訪問 IronPDF 功能

Spire.PDF 功能

  • PDF 創建:從頭開始或從現有文件創建 PDF。
  • 文本與圖像提取:使用 Spire.PDF 提取 PDF 頁面和內容。
  • PDF 表單處理:填寫和管理 PDF 表單。
  • PDF 轉換:將 PDF 轉換為其他格式,例如 HTML、RTF 和圖像。
  • 頁面操作:插入、刪除和重新排序 PDF 中的頁面。

IronPDF 與 Spire.PDF for .NET 之間的頂級特色比較與程式碼範例

為了說明 IronPDF 和 Spire.PDF for .NET 的功能,我們將通過代碼示例比較它們在幾個關鍵 PDF 功能上的實現,讓您了解這些功能如何幫助您的 PDF 專案。

將HTML轉換為PDF

IronPDF

using IronPdf;

// Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;

// Instantiate Renderer
var renderer = new ChromePdfRenderer();

// Create a PDF from an HTML string using C#
var pdf = renderer.RenderHtmlAsPdf("<h1>Hello World</h1>");
pdf.SaveAs("output.pdf");

// Advanced Example with HTML Assets
// Load external html assets: images, CSS and JavaScript.
// An optional BasePath 'C:\site\assets\' is set as the file location to load assets from
var myAdvancedPdf = renderer.RenderHtmlAsPdf("<img src='icons/iron.png'>", @"C:\site\assets\");
myAdvancedPdf.SaveAs("html-with-assets.pdf");
using IronPdf;

// Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = true;

// Instantiate Renderer
var renderer = new ChromePdfRenderer();

// Create a PDF from an HTML string using C#
var pdf = renderer.RenderHtmlAsPdf("<h1>Hello World</h1>");
pdf.SaveAs("output.pdf");

// Advanced Example with HTML Assets
// Load external html assets: images, CSS and JavaScript.
// An optional BasePath 'C:\site\assets\' is set as the file location to load assets from
var myAdvancedPdf = renderer.RenderHtmlAsPdf("<img src='icons/iron.png'>", @"C:\site\assets\");
myAdvancedPdf.SaveAs("html-with-assets.pdf");
Imports IronPdf

' Disable local disk access or cross-origin requests
Installation.EnableWebSecurity = True

' Instantiate Renderer
Dim renderer = New ChromePdfRenderer()

' Create a PDF from an HTML string using C#
Dim pdf = renderer.RenderHtmlAsPdf("<h1>Hello World</h1>")
pdf.SaveAs("output.pdf")

' Advanced Example with HTML Assets
' Load external html assets: images, CSS and JavaScript.
' An optional BasePath 'C:\site\assets\' is set as the file location to load assets from
Dim myAdvancedPdf = renderer.RenderHtmlAsPdf("<img src='icons/iron.png'>", "C:\site\assets\")
myAdvancedPdf.SaveAs("html-with-assets.pdf")
$vbLabelText   $csharpLabel

Spire.PDF 示例:

using Spire.Pdf;
using Spire.Pdf.HtmlConverter;
using System.IO;
using System.Threading;
using System.Drawing;

namespace ConvertHtmlStringToPdfWithoutPlugin
{
    class Program
    {
        static void Main(string[] args)
        {
            //Create a PdfDocument object
            PdfDocument doc = new PdfDocument();

            //Create a PdfPageSettings object
            PdfPageSettings setting = new PdfPageSettings();

            //Save page size and margins through the object
            setting.Size = new SizeF(1000, 1000);
            setting.Margins = new Spire.Pdf.Graphics.PdfMargins(20);

            //Create a PdfHtmlLayoutFormat object
            PdfHtmlLayoutFormat htmlLayoutFormat = new PdfHtmlLayoutFormat();

            //Set IsWaiting property to true
            htmlLayoutFormat.IsWaiting = true;

            //Read html string from a .html file
            string htmlString = File.ReadAllText(@"C:\Users\Administrator\Desktop\Document\Html\Sample.html");
            //Load HTML from html string using LoadFromHTML method
            Thread thread = new Thread(() =>
            { doc.LoadFromHTML(htmlString, true, setting, htmlLayoutFormat); });
            thread.SetApartmentState(ApartmentState.STA);
            thread.Start();
            thread.Join();

            //Save to a PDF file
            doc.SaveToFile("HtmlStringToPdf.pdf");
        }
    }
}
using Spire.Pdf;
using Spire.Pdf.HtmlConverter;
using System.IO;
using System.Threading;
using System.Drawing;

namespace ConvertHtmlStringToPdfWithoutPlugin
{
    class Program
    {
        static void Main(string[] args)
        {
            //Create a PdfDocument object
            PdfDocument doc = new PdfDocument();

            //Create a PdfPageSettings object
            PdfPageSettings setting = new PdfPageSettings();

            //Save page size and margins through the object
            setting.Size = new SizeF(1000, 1000);
            setting.Margins = new Spire.Pdf.Graphics.PdfMargins(20);

            //Create a PdfHtmlLayoutFormat object
            PdfHtmlLayoutFormat htmlLayoutFormat = new PdfHtmlLayoutFormat();

            //Set IsWaiting property to true
            htmlLayoutFormat.IsWaiting = true;

            //Read html string from a .html file
            string htmlString = File.ReadAllText(@"C:\Users\Administrator\Desktop\Document\Html\Sample.html");
            //Load HTML from html string using LoadFromHTML method
            Thread thread = new Thread(() =>
            { doc.LoadFromHTML(htmlString, true, setting, htmlLayoutFormat); });
            thread.SetApartmentState(ApartmentState.STA);
            thread.Start();
            thread.Join();

            //Save to a PDF file
            doc.SaveToFile("HtmlStringToPdf.pdf");
        }
    }
}
Imports Spire.Pdf
Imports Spire.Pdf.HtmlConverter
Imports System.IO
Imports System.Threading
Imports System.Drawing

Namespace ConvertHtmlStringToPdfWithoutPlugin
	Friend Class Program
		Shared Sub Main(ByVal args() As String)
			'Create a PdfDocument object
			Dim doc As New PdfDocument()

			'Create a PdfPageSettings object
			Dim setting As New PdfPageSettings()

			'Save page size and margins through the object
			setting.Size = New SizeF(1000, 1000)
			setting.Margins = New Spire.Pdf.Graphics.PdfMargins(20)

			'Create a PdfHtmlLayoutFormat object
			Dim htmlLayoutFormat As New PdfHtmlLayoutFormat()

			'Set IsWaiting property to true
			htmlLayoutFormat.IsWaiting = True

			'Read html string from a .html file
			Dim htmlString As String = File.ReadAllText("C:\Users\Administrator\Desktop\Document\Html\Sample.html")
			'Load HTML from html string using LoadFromHTML method
			Dim thread As New Thread(Sub()
				doc.LoadFromHTML(htmlString, True, setting, htmlLayoutFormat)
			End Sub)
			thread.SetApartmentState(ApartmentState.STA)
			thread.Start()
			thread.Join()

			'Save to a PDF file
			doc.SaveToFile("HtmlStringToPdf.pdf")
		End Sub
	End Class
End Namespace
$vbLabelText   $csharpLabel

IronPDF 使用 Chrome 的渲染引擎進行高保真 HTML 到 PDF 轉換,藉由支持現代網頁標準,確保網頁內容的精確呈現。 Spire.PDF 也提供強大的 HTML 轉 PDF 功能,但其渲染精度可能無法與 IronPDF 匹敵,且需要花費更長時間,並採取更手動的方法。

因此,如果您正在尋找一種簡單的方法來自動化您的 HTML 到 PDF 任務,同時保持 PDF 的高品質,那麼 IronPDF 將是適合您的工具。

加密 PDF 文件

IronPDF

using IronPdf;
using System;

// Open an Encrypted File, alternatively create a new PDF from Html
var pdf = PdfDocument.FromFile("encrypted.pdf", "password");

// Edit file metadata
pdf.MetaData.Author = "Satoshi Nakamoto";
pdf.MetaData.Keywords = "SEO, Friendly";
pdf.MetaData.ModifiedDate = DateTime.Now;

// Edit file security settings
pdf.SecuritySettings.RemovePasswordsAndEncryption();
pdf.SecuritySettings.MakePdfDocumentReadOnly("secret-key");
pdf.SecuritySettings.AllowUserAnnotations = false;
pdf.SecuritySettings.AllowUserCopyPasteContent = false;
pdf.SecuritySettings.AllowUserFormData = false;
pdf.SecuritySettings.AllowUserPrinting = IronPdf.Security.PdfPrintSecurity.FullPrintRights;

// Change or set the document encryption password
pdf.Password = "my-password";
pdf.SaveAs("secured.pdf");
using IronPdf;
using System;

// Open an Encrypted File, alternatively create a new PDF from Html
var pdf = PdfDocument.FromFile("encrypted.pdf", "password");

// Edit file metadata
pdf.MetaData.Author = "Satoshi Nakamoto";
pdf.MetaData.Keywords = "SEO, Friendly";
pdf.MetaData.ModifiedDate = DateTime.Now;

// Edit file security settings
pdf.SecuritySettings.RemovePasswordsAndEncryption();
pdf.SecuritySettings.MakePdfDocumentReadOnly("secret-key");
pdf.SecuritySettings.AllowUserAnnotations = false;
pdf.SecuritySettings.AllowUserCopyPasteContent = false;
pdf.SecuritySettings.AllowUserFormData = false;
pdf.SecuritySettings.AllowUserPrinting = IronPdf.Security.PdfPrintSecurity.FullPrintRights;

// Change or set the document encryption password
pdf.Password = "my-password";
pdf.SaveAs("secured.pdf");
Imports IronPdf
Imports System

' Open an Encrypted File, alternatively create a new PDF from Html
Private pdf = PdfDocument.FromFile("encrypted.pdf", "password")

' Edit file metadata
pdf.MetaData.Author = "Satoshi Nakamoto"
pdf.MetaData.Keywords = "SEO, Friendly"
pdf.MetaData.ModifiedDate = DateTime.Now

' Edit file security settings
pdf.SecuritySettings.RemovePasswordsAndEncryption()
pdf.SecuritySettings.MakePdfDocumentReadOnly("secret-key")
pdf.SecuritySettings.AllowUserAnnotations = False
pdf.SecuritySettings.AllowUserCopyPasteContent = False
pdf.SecuritySettings.AllowUserFormData = False
pdf.SecuritySettings.AllowUserPrinting = IronPdf.Security.PdfPrintSecurity.FullPrintRights

' Change or set the document encryption password
pdf.Password = "my-password"
pdf.SaveAs("secured.pdf")
$vbLabelText   $csharpLabel

Spire.PDF:

using Spire.Pdf;
using Spire.Pdf.Security;

//Create a PdfDocument object
PdfDocument pdf = new PdfDocument();

//Load a sample PDF file
pdf.LoadFromFile(@"E:\Files\sample.pdf");

//Encrypt the PDF file with password
pdf.Security.Encrypt("open", "permission", PdfPermissionsFlags.Print 
 PdfPermissionsFlags.CopyContent, PdfEncryptionKeySize.Key128Bit);

//Save the result file
pdf.SaveToFile("Encrypt.pdf", FileFormat.PDF);
using Spire.Pdf;
using Spire.Pdf.Security;

//Create a PdfDocument object
PdfDocument pdf = new PdfDocument();

//Load a sample PDF file
pdf.LoadFromFile(@"E:\Files\sample.pdf");

//Encrypt the PDF file with password
pdf.Security.Encrypt("open", "permission", PdfPermissionsFlags.Print 
 PdfPermissionsFlags.CopyContent, PdfEncryptionKeySize.Key128Bit);

//Save the result file
pdf.SaveToFile("Encrypt.pdf", FileFormat.PDF);
Imports Spire.Pdf
Imports Spire.Pdf.Security

'Create a PdfDocument object
Private pdf As New PdfDocument()

'Load a sample PDF file
pdf.LoadFromFile("E:\Files\sample.pdf")

'Encrypt the PDF file with password
pdf.Security.Encrypt("open", "permission", PdfPermissionsFlags.Print PdfPermissionsFlags.CopyContent, PdfEncryptionKeySize.Key128Bit)

'Save the result file
pdf.SaveToFile("Encrypt.pdf", FileFormat.PDF)
$vbLabelText   $csharpLabel

這兩個函式庫都提供了易於使用的方法來加密 PDF,並設定加密 PDF 文件的可讀性。 IronPDF 提供了一種簡單的方法,同時仍能讓您完全控制 PDF 的安全設置。 Spire.PDF 的過程稍微簡短一些,但仍包含設定權限的其他選項。

編輯 PDF 內容

IronPDF

using IronPdf;

PdfDocument pdf = PdfDocument.FromFile("novel.pdf");

// Redact 'are' phrase from all pages
pdf.RedactTextOnAllPages("are");

pdf.SaveAs("redacted.pdf");
using IronPdf;

PdfDocument pdf = PdfDocument.FromFile("novel.pdf");

// Redact 'are' phrase from all pages
pdf.RedactTextOnAllPages("are");

pdf.SaveAs("redacted.pdf");
Imports IronPdf

Private pdf As PdfDocument = PdfDocument.FromFile("novel.pdf")

' Redact 'are' phrase from all pages
pdf.RedactTextOnAllPages("are")

pdf.SaveAs("redacted.pdf")
$vbLabelText   $csharpLabel

Spire.PDF:

Spire.PDF 沒有內建的專用修訂工具。 但是,您仍然可以使用它來隱藏內容,方法是將矩形繪製在您希望隱藏的內容上(如下所示),或者提取並刪除您想要隱藏的文字。

using Spire.Pdf;
using Spire.Pdf.Graphics;

// Specify the input PDF file path
        string inputPdfFilePath = "path/to/your/input.pdf";

        // Specify the output redacted PDF file path
        string outputPdfFilePath = "path/to/your/redacted_output.pdf";

        // Create a new PdfDocument object
        PdfDocument pdfDocument = new PdfDocument();

        // Load the existing PDF document
        pdfDocument.LoadFromFile(inputPdfFilePath);

        // Redact content on each page
        foreach (PdfPageBase page in pdfDocument.Pages)
        {
            // Define the area to redact (e.g., coordinates and size of the rectangle)
            RectangleF redactArea = new RectangleF(100, 100, 200, 50); // Example coordinates and size

            // Apply redaction
            page.Canvas.DrawRectangle(new PdfSolidBrush(Color.Black), redactArea);
        }      
        // Save the redacted PDF document
        pdfDocument.SaveToFile(outputPdfFilePath);
using Spire.Pdf;
using Spire.Pdf.Graphics;

// Specify the input PDF file path
        string inputPdfFilePath = "path/to/your/input.pdf";

        // Specify the output redacted PDF file path
        string outputPdfFilePath = "path/to/your/redacted_output.pdf";

        // Create a new PdfDocument object
        PdfDocument pdfDocument = new PdfDocument();

        // Load the existing PDF document
        pdfDocument.LoadFromFile(inputPdfFilePath);

        // Redact content on each page
        foreach (PdfPageBase page in pdfDocument.Pages)
        {
            // Define the area to redact (e.g., coordinates and size of the rectangle)
            RectangleF redactArea = new RectangleF(100, 100, 200, 50); // Example coordinates and size

            // Apply redaction
            page.Canvas.DrawRectangle(new PdfSolidBrush(Color.Black), redactArea);
        }      
        // Save the redacted PDF document
        pdfDocument.SaveToFile(outputPdfFilePath);
Imports Spire.Pdf
Imports Spire.Pdf.Graphics

' Specify the input PDF file path
		Private inputPdfFilePath As String = "path/to/your/input.pdf"

		' Specify the output redacted PDF file path
		Private outputPdfFilePath As String = "path/to/your/redacted_output.pdf"

		' Create a new PdfDocument object
		Private pdfDocument As New PdfDocument()

		' Load the existing PDF document
		pdfDocument.LoadFromFile(inputPdfFilePath)

		' Redact content on each page
		For Each page As PdfPageBase In pdfDocument.Pages
			' Define the area to redact (e.g., coordinates and size of the rectangle)
			Dim redactArea As New RectangleF(100, 100, 200, 50) ' Example coordinates and size

			' Apply redaction
			page.Canvas.DrawRectangle(New PdfSolidBrush(Color.Black), redactArea)
		Next page
		' Save the redacted PDF document
		pdfDocument.SaveToFile(outputPdfFilePath)
$vbLabelText   $csharpLabel

IronPDF 以其強大且簡單的修訂工具簡化了修訂過程。 Spire.PDF 需要手動處理修訂,因為它缺乏內建的修訂工具,這樣會比較低效。

簽署PDF

IronPDF

using IronPdf;
using IronPdf.Signing;
using System.Security.Cryptography.X509Certificates;

ChromePdfRenderer renderer = new ChromePdfRenderer();
PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>foo</h1>");

// Create X509Certificate2 object with X509KeyStorageFlags set to Exportable
X509Certificate2 cert = new X509Certificate2("IronSoftware.pfx", "123456", X509KeyStorageFlags.Exportable);

// Create PDF digital signature with the PdfSignature object
var sig = new PdfSignature(cert);

// Sign PDF document
pdf.Sign(sig);
pdf.SaveAs("signed.pdf");
using IronPdf;
using IronPdf.Signing;
using System.Security.Cryptography.X509Certificates;

ChromePdfRenderer renderer = new ChromePdfRenderer();
PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>foo</h1>");

// Create X509Certificate2 object with X509KeyStorageFlags set to Exportable
X509Certificate2 cert = new X509Certificate2("IronSoftware.pfx", "123456", X509KeyStorageFlags.Exportable);

// Create PDF digital signature with the PdfSignature object
var sig = new PdfSignature(cert);

// Sign PDF document
pdf.Sign(sig);
pdf.SaveAs("signed.pdf");
Imports IronPdf
Imports IronPdf.Signing
Imports System.Security.Cryptography.X509Certificates

Private renderer As New ChromePdfRenderer()
Private pdf As PdfDocument = renderer.RenderHtmlAsPdf("<h1>foo</h1>")

' Create X509Certificate2 object with X509KeyStorageFlags set to Exportable
Private cert As New X509Certificate2("IronSoftware.pfx", "123456", X509KeyStorageFlags.Exportable)

' Create PDF digital signature with the PdfSignature object
Private sig = New PdfSignature(cert)

' Sign PDF document
pdf.Sign(sig)
pdf.SaveAs("signed.pdf")
$vbLabelText   $csharpLabel

Spire.PDF 示例:

using system;
using System.Drawing;
using Spire.Pdf;
using Spire.Pdf.Security;
using Spire.Pdf.Graphics;

//Create a PdfDocument object
PdfDocument doc = new PdfDocument();

//Load a sample PDF file
doc.LoadFromFile("C:\\Users\\Administrator\\Desktop\\sample.pdf");

//Load the certificate
PdfCertificate cert = new PdfCertificate("C:\\Users\\Administrator\\Desktop\\MyCertificate.pfx", "e-iceblue");

//Create a PdfSignature object and specify its position and size
PdfSignature signature = new PdfSignature(doc, doc.Pages[doc.Pages.Count - 1], cert, "MySignature");
24
RectangleF rectangleF = new RectangleF(doc.Pages[0].ActualSize.Width - 260 - 54 , 200, 260, 110);
signature.Bounds = rectangleF;
signature.Certificated = true;

//Set the graphics mode to ImageAndSignDetail
signature.GraphicsMode = GraphicMode.SignImageAndSignDetail;

//Set the signature content
signature.NameLabel = "Signer:";
signature.Name = "Gary";
signature.ContactInfoLabel = "Phone:";
signature.ContactInfo = "0123456";
signature.DateLabel = "Date:";
signature.Date = DateTime.Now;
signature.LocationInfoLabel = "Location:";
signature.LocationInfo = "USA";
signature.ReasonLabel = "Reason:";
signature.Reason = "I am the author";
signature.DistinguishedNameLabel = "DN:";
signature.DistinguishedName = signature.Certificate.IssuerName.Name;

//Set the signature image source
signature.SignImageSource = PdfImage.FromFile("C:\\Users\\Administrator\\Desktop\\handwrittingSignature.png");

//Set the signature font
signature.SignDetailsFont = new PdfTrueTypeFont(new Font("Arial Unicode MS", 12f, FontStyle.Regular));

//Set the document permission to forbid changes but allow form fill
signature.DocumentPermissions = PdfCertificationFlags.ForbidChanges 
 PdfCertificationFlags.AllowFormFill;

//Save to file
doc.SaveToFile("VisiableSignature.pdf");
doc.Close();
using system;
using System.Drawing;
using Spire.Pdf;
using Spire.Pdf.Security;
using Spire.Pdf.Graphics;

//Create a PdfDocument object
PdfDocument doc = new PdfDocument();

//Load a sample PDF file
doc.LoadFromFile("C:\\Users\\Administrator\\Desktop\\sample.pdf");

//Load the certificate
PdfCertificate cert = new PdfCertificate("C:\\Users\\Administrator\\Desktop\\MyCertificate.pfx", "e-iceblue");

//Create a PdfSignature object and specify its position and size
PdfSignature signature = new PdfSignature(doc, doc.Pages[doc.Pages.Count - 1], cert, "MySignature");
24
RectangleF rectangleF = new RectangleF(doc.Pages[0].ActualSize.Width - 260 - 54 , 200, 260, 110);
signature.Bounds = rectangleF;
signature.Certificated = true;

//Set the graphics mode to ImageAndSignDetail
signature.GraphicsMode = GraphicMode.SignImageAndSignDetail;

//Set the signature content
signature.NameLabel = "Signer:";
signature.Name = "Gary";
signature.ContactInfoLabel = "Phone:";
signature.ContactInfo = "0123456";
signature.DateLabel = "Date:";
signature.Date = DateTime.Now;
signature.LocationInfoLabel = "Location:";
signature.LocationInfo = "USA";
signature.ReasonLabel = "Reason:";
signature.Reason = "I am the author";
signature.DistinguishedNameLabel = "DN:";
signature.DistinguishedName = signature.Certificate.IssuerName.Name;

//Set the signature image source
signature.SignImageSource = PdfImage.FromFile("C:\\Users\\Administrator\\Desktop\\handwrittingSignature.png");

//Set the signature font
signature.SignDetailsFont = new PdfTrueTypeFont(new Font("Arial Unicode MS", 12f, FontStyle.Regular));

//Set the document permission to forbid changes but allow form fill
signature.DocumentPermissions = PdfCertificationFlags.ForbidChanges 
 PdfCertificationFlags.AllowFormFill;

//Save to file
doc.SaveToFile("VisiableSignature.pdf");
doc.Close();
Imports system
Imports System.Drawing
Imports Spire.Pdf
Imports Spire.Pdf.Security
Imports Spire.Pdf.Graphics

'Create a PdfDocument object
Private doc As New PdfDocument()

'Load a sample PDF file
doc.LoadFromFile("C:\Users\Administrator\Desktop\sample.pdf")

'Load the certificate
Dim cert As New PdfCertificate("C:\Users\Administrator\Desktop\MyCertificate.pfx", "e-iceblue")

'Create a PdfSignature object and specify its position and size
Dim signature As New PdfSignature(doc, doc.Pages(doc.Pages.Count - 1), cert, "MySignature")
24 RectangleF rectangleF = New RectangleF(doc.Pages(0).ActualSize.Width - 260 - 54, 200, 260, 110)
signature.Bounds = rectangleF
signature.Certificated = True

'Set the graphics mode to ImageAndSignDetail
signature.GraphicsMode = GraphicMode.SignImageAndSignDetail

'Set the signature content
signature.NameLabel = "Signer:"
signature.Name = "Gary"
signature.ContactInfoLabel = "Phone:"
signature.ContactInfo = "0123456"
signature.DateLabel = "Date:"
signature.Date = DateTime.Now
signature.LocationInfoLabel = "Location:"
signature.LocationInfo = "USA"
signature.ReasonLabel = "Reason:"
signature.Reason = "I am the author"
signature.DistinguishedNameLabel = "DN:"
signature.DistinguishedName = signature.Certificate.IssuerName.Name

'Set the signature image source
signature.SignImageSource = PdfImage.FromFile("C:\Users\Administrator\Desktop\handwrittingSignature.png")

'Set the signature font
signature.SignDetailsFont = New PdfTrueTypeFont(New Font("Arial Unicode MS", 12F, FontStyle.Regular))

'Set the document permission to forbid changes but allow form fill
signature.DocumentPermissions = PdfCertificationFlags.ForbidChanges PdfCertificationFlags.AllowFormFill

'Save to file
doc.SaveToFile("VisiableSignature.pdf")
doc.Close()
$vbLabelText   $csharpLabel

數位簽署 PDF 可在各種情境中提供幫助,從用於驗證 PDF 文件到僅僅對新項目簽署確認。 IronPDF 提供了一種簡單的方法來添加數位簽章,使用 IronPDF 您可以輕鬆自動化數位簽章的流程。 Spire.PDF 也支持 PDF 的數位簽名,但其過程可能較為手動,實施起來需要更多工作。

為 PDF 添加水印

IronPDF

using IronPdf;

// Stamps a Watermark onto a new or existing PDF
var renderer = new ChromePdfRenderer();

var pdf = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf");
pdf.ApplyWatermark("<h2 style='color:red'>SAMPLE</h2>", 30, IronPdf.Editing.VerticalAlignment.Middle, IronPdf.Editing.HorizontalAlignment.Center);
pdf.SaveAs(@"C:\Path\To\Watermarked.pdf");
using IronPdf;

// Stamps a Watermark onto a new or existing PDF
var renderer = new ChromePdfRenderer();

var pdf = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf");
pdf.ApplyWatermark("<h2 style='color:red'>SAMPLE</h2>", 30, IronPdf.Editing.VerticalAlignment.Middle, IronPdf.Editing.HorizontalAlignment.Center);
pdf.SaveAs(@"C:\Path\To\Watermarked.pdf");
Imports IronPdf

' Stamps a Watermark onto a new or existing PDF
Private renderer = New ChromePdfRenderer()

Private pdf = renderer.RenderUrlAsPdf("https://www.nuget.org/packages/IronPdf")
pdf.ApplyWatermark("<h2 style='color:red'>SAMPLE</h2>", 30, IronPdf.Editing.VerticalAlignment.Middle, IronPdf.Editing.HorizontalAlignment.Center)
pdf.SaveAs("C:\Path\To\Watermarked.pdf")
$vbLabelText   $csharpLabel

Spire.PDF 示例:

using Spire.Pdf;
using Spire.Pdf.Graphics;
using System.Drawing;

//Create a PdfDocument object
PdfDocument pdf = new PdfDocument();

//Load a sample PDF document
pdf.LoadFromFile(@"C:\Users\Administrator\Desktop\sample.pdf");

//Create a PdfTrueTypeFont object
PdfTrueTypeFont font = new PdfTrueTypeFont(new Font("Arial", 50f), true);

//Set the watermark text
string text = "CONFIDENTIAL";

//Measure the text size
SizeF textSize = font.MeasureString(text);

            //Calculate the values of two offset variables,
            //which will be used to calculate the translation amount of the coordinate system
float offset1 = (float)(textSize.Width * System.Math.Sqrt(2) / 4);
float offset2 = (float)(textSize.Height * System.Math.Sqrt(2) / 4);

        //Traverse all the pages in the document
    foreach (PdfPageBase page in pdf.Pages)
        {
    //Set the page transparency
    page.Canvas.SetTransparency(0.8f);

    //Translate the coordinate system by specified coordinates
    page.Canvas.TranslateTransform(page.Canvas.Size.Width / 2 - offset1 - offset2, page.Canvas.Size.Height / 2 + offset1 - offset2);

        //Rotate the coordinate system 45 degrees counterclockwise
        page.Canvas.RotateTransform(-45);

        //Draw watermark text on the page
        page.Canvas.DrawString(text, font, PdfBrushes.DarkGray, 0, 0);
            }

//Save the changes to another file
pdf.SaveToFile("TextWatermark.pdf");
using Spire.Pdf;
using Spire.Pdf.Graphics;
using System.Drawing;

//Create a PdfDocument object
PdfDocument pdf = new PdfDocument();

//Load a sample PDF document
pdf.LoadFromFile(@"C:\Users\Administrator\Desktop\sample.pdf");

//Create a PdfTrueTypeFont object
PdfTrueTypeFont font = new PdfTrueTypeFont(new Font("Arial", 50f), true);

//Set the watermark text
string text = "CONFIDENTIAL";

//Measure the text size
SizeF textSize = font.MeasureString(text);

            //Calculate the values of two offset variables,
            //which will be used to calculate the translation amount of the coordinate system
float offset1 = (float)(textSize.Width * System.Math.Sqrt(2) / 4);
float offset2 = (float)(textSize.Height * System.Math.Sqrt(2) / 4);

        //Traverse all the pages in the document
    foreach (PdfPageBase page in pdf.Pages)
        {
    //Set the page transparency
    page.Canvas.SetTransparency(0.8f);

    //Translate the coordinate system by specified coordinates
    page.Canvas.TranslateTransform(page.Canvas.Size.Width / 2 - offset1 - offset2, page.Canvas.Size.Height / 2 + offset1 - offset2);

        //Rotate the coordinate system 45 degrees counterclockwise
        page.Canvas.RotateTransform(-45);

        //Draw watermark text on the page
        page.Canvas.DrawString(text, font, PdfBrushes.DarkGray, 0, 0);
            }

//Save the changes to another file
pdf.SaveToFile("TextWatermark.pdf");
Imports System
Imports Spire.Pdf
Imports Spire.Pdf.Graphics
Imports System.Drawing

'Create a PdfDocument object
Private pdf As New PdfDocument()

'Load a sample PDF document
pdf.LoadFromFile("C:\Users\Administrator\Desktop\sample.pdf")

'Create a PdfTrueTypeFont object
Dim font As New PdfTrueTypeFont(New Font("Arial", 50F), True)

'Set the watermark text
Dim text As String = "CONFIDENTIAL"

'Measure the text size
Dim textSize As SizeF = font.MeasureString(text)

			'Calculate the values of two offset variables,
			'which will be used to calculate the translation amount of the coordinate system
Dim offset1 As Single = CSng(textSize.Width * Math.Sqrt(2) / 4)
Dim offset2 As Single = CSng(textSize.Height * Math.Sqrt(2) / 4)

		'Traverse all the pages in the document
	For Each page As PdfPageBase In pdf.Pages
	'Set the page transparency
	page.Canvas.SetTransparency(0.8F)

	'Translate the coordinate system by specified coordinates
	page.Canvas.TranslateTransform(page.Canvas.Size.Width \ 2 - offset1 - offset2, page.Canvas.Size.Height \ 2 + offset1 - offset2)

		'Rotate the coordinate system 45 degrees counterclockwise
		page.Canvas.RotateTransform(-45)

		'Draw watermark text on the page
		page.Canvas.DrawString(text, font, PdfBrushes.DarkGray, 0, 0)
	Next page

'Save the changes to another file
pdf.SaveToFile("TextWatermark.pdf")
$vbLabelText   $csharpLabel

IronPDF 提供了一種簡單的方法來添加文本浮水印,並讓您可以完全控制浮水印的位置和設計。 IronPDF使用HTML和CSS,這表示如果您有這些語言的經驗,過程會更簡單。 Spire.PDF 的方法相對較長,並且更具手動過程,但仍然提供強大的浮水印工具,讓您能夠完全控制設計和位置。

圖像 HTML 文本加蓋印戳

IronPDF

using IronPdf;
using IronPdf.Editing;

// Instantiate Renderer
ChromePdfRenderer renderer = new ChromePdfRenderer();
PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>Example HTML Document!</h1>");

// Create text stamper
TextStamper textStamper = new TextStamper()
{
    Text = "Text Stamper!",
    FontFamily = "Bungee Spice",
    UseGoogleFont = true,
    FontSize = 30,
    IsBold = true,
    IsItalic = true,
    VerticalAlignment = VerticalAlignment.Top,
};

// Stamp the text stamper
pdf.ApplyStamp(textStamper);
pdf.SaveAs("stampText.pdf");

// Create image stamper
ImageStamper imageStamper = new ImageStamper(new Uri("https://ironpdf.com/img/svgs/iron-pdf-logo.svg"))
{
    VerticalAlignment = VerticalAlignment.Top,
};

// Stamp the image stamper
pdf.ApplyStamp(imageStamper, 0);
pdf.SaveAs("stampImage.pdf");
using IronPdf;
using IronPdf.Editing;

// Instantiate Renderer
ChromePdfRenderer renderer = new ChromePdfRenderer();
PdfDocument pdf = renderer.RenderHtmlAsPdf("<h1>Example HTML Document!</h1>");

// Create text stamper
TextStamper textStamper = new TextStamper()
{
    Text = "Text Stamper!",
    FontFamily = "Bungee Spice",
    UseGoogleFont = true,
    FontSize = 30,
    IsBold = true,
    IsItalic = true,
    VerticalAlignment = VerticalAlignment.Top,
};

// Stamp the text stamper
pdf.ApplyStamp(textStamper);
pdf.SaveAs("stampText.pdf");

// Create image stamper
ImageStamper imageStamper = new ImageStamper(new Uri("https://ironpdf.com/img/svgs/iron-pdf-logo.svg"))
{
    VerticalAlignment = VerticalAlignment.Top,
};

// Stamp the image stamper
pdf.ApplyStamp(imageStamper, 0);
pdf.SaveAs("stampImage.pdf");
Imports IronPdf
Imports IronPdf.Editing

' Instantiate Renderer
Private renderer As New ChromePdfRenderer()
Private pdf As PdfDocument = renderer.RenderHtmlAsPdf("<h1>Example HTML Document!</h1>")

' Create text stamper
Private textStamper As New TextStamper() With {
	.Text = "Text Stamper!",
	.FontFamily = "Bungee Spice",
	.UseGoogleFont = True,
	.FontSize = 30,
	.IsBold = True,
	.IsItalic = True,
	.VerticalAlignment = VerticalAlignment.Top
}

' Stamp the text stamper
pdf.ApplyStamp(textStamper)
pdf.SaveAs("stampText.pdf")

' Create image stamper
Dim imageStamper As New ImageStamper(New Uri("https://ironpdf.com/img/svgs/iron-pdf-logo.svg")) With {.VerticalAlignment = VerticalAlignment.Top}

' Stamp the image stamper
pdf.ApplyStamp(imageStamper, 0)
pdf.SaveAs("stampImage.pdf")
$vbLabelText   $csharpLabel

Spire.PDF:

using Spire.Pdf;
using Spire.Pdf.Graphics;
using System.Drawing;

//save graphics state
PdfGraphicsState state = page.Canvas.Save();

//Draw the text - transform          
PdfFont font = new PdfFont(PdfFontFamily.Helvetica, 18f);
PdfSolidBrush brush1 = new PdfSolidBrush(Color.DeepSkyBlue);
PdfSolidBrush brush2 = new PdfSolidBrush(Color.CadetBlue);
page.Canvas.TranslateTransform(20, 200);
page.Canvas.ScaleTransform(1f, 0.6f);
page.Canvas.SkewTransform(-10, 0);
page.Canvas.DrawString("Go! Turn Around! Go! Go! Go!", font, brush1, 0, 0);
page.Canvas.SkewTransform(10, 0);
page.Canvas.DrawString("Go! Turn Around! Go! Go! Go!", font, brush2, 0, 0);
page.Canvas.ScaleTransform(1f, -1f);
page.Canvas.DrawString("Go! Turn Around! Go! Go! Go!", font, brush2, 0, -2 * 18);

//restore graphics
page.Canvas.Restore(state);
using Spire.Pdf;
using Spire.Pdf.Graphics;
using System.Drawing;

//save graphics state
PdfGraphicsState state = page.Canvas.Save();

//Draw the text - transform          
PdfFont font = new PdfFont(PdfFontFamily.Helvetica, 18f);
PdfSolidBrush brush1 = new PdfSolidBrush(Color.DeepSkyBlue);
PdfSolidBrush brush2 = new PdfSolidBrush(Color.CadetBlue);
page.Canvas.TranslateTransform(20, 200);
page.Canvas.ScaleTransform(1f, 0.6f);
page.Canvas.SkewTransform(-10, 0);
page.Canvas.DrawString("Go! Turn Around! Go! Go! Go!", font, brush1, 0, 0);
page.Canvas.SkewTransform(10, 0);
page.Canvas.DrawString("Go! Turn Around! Go! Go! Go!", font, brush2, 0, 0);
page.Canvas.ScaleTransform(1f, -1f);
page.Canvas.DrawString("Go! Turn Around! Go! Go! Go!", font, brush2, 0, -2 * 18);

//restore graphics
page.Canvas.Restore(state);
Imports Spire.Pdf
Imports Spire.Pdf.Graphics
Imports System.Drawing

'save graphics state
Private state As PdfGraphicsState = page.Canvas.Save()

'Draw the text - transform          
Private font As New PdfFont(PdfFontFamily.Helvetica, 18F)
Private brush1 As New PdfSolidBrush(Color.DeepSkyBlue)
Private brush2 As New PdfSolidBrush(Color.CadetBlue)
page.Canvas.TranslateTransform(20, 200)
page.Canvas.ScaleTransform(1F, 0.6F)
page.Canvas.SkewTransform(-10, 0)
page.Canvas.DrawString("Go! Turn Around! Go! Go! Go!", font, brush1, 0, 0)
page.Canvas.SkewTransform(10, 0)
page.Canvas.DrawString("Go! Turn Around! Go! Go! Go!", font, brush2, 0, 0)
page.Canvas.ScaleTransform(1F, -1F)
page.Canvas.DrawString("Go! Turn Around! Go! Go! Go!", font, brush2, 0, -2 * 18)

'restore graphics
page.Canvas.Restore(state)
$vbLabelText   $csharpLabel

IronPDF 的文本和圖像標記工具是一款強大且易於使用的標記工具,當您應用標記內容時,它採用類似於 HTML 和 CSS 的方法。 雖然 Spire.PDF 也提供基本的文字加蓋工具,但將加蓋的文字應用到 PDF 文件上需要更多的工作。

DOCX 轉 PDF

IronPDF

using IronPdf;

// Instantiate Renderer
DocxToPdfRenderer renderer = new DocxToPdfRenderer();

// Render from DOCX file
PdfDocument pdf = renderer.RenderDocxAsPdf("Modern-chronological-resume.docx");

// Save the PDF
pdf.SaveAs("pdfFromDocx.pdf");
using IronPdf;

// Instantiate Renderer
DocxToPdfRenderer renderer = new DocxToPdfRenderer();

// Render from DOCX file
PdfDocument pdf = renderer.RenderDocxAsPdf("Modern-chronological-resume.docx");

// Save the PDF
pdf.SaveAs("pdfFromDocx.pdf");
Imports IronPdf

' Instantiate Renderer
Private renderer As New DocxToPdfRenderer()

' Render from DOCX file
Private pdf As PdfDocument = renderer.RenderDocxAsPdf("Modern-chronological-resume.docx")

' Save the PDF
pdf.SaveAs("pdfFromDocx.pdf")
$vbLabelText   $csharpLabel

Spire.PDF:

Spire.PDF 本身無法將 DOCX 轉換為 PDF,不過可以使用 Spire.Doc 庫來處理此轉換,然後使用 Spire.PDF 處理生成的 PDF。

using Spire.Doc;

// Create a Document object
Document doc = new Document();

// Load a Word document
doc.LoadFromFile("C:\\Users\\Administrator\\Desktop\\Sample.docx");

// Save the document to PDF
doc.SaveToFile("ToPDF.pdf", FileFormat.PDF);

// Dispose resources
doc.Dispose();
using Spire.Doc;

// Create a Document object
Document doc = new Document();

// Load a Word document
doc.LoadFromFile("C:\\Users\\Administrator\\Desktop\\Sample.docx");

// Save the document to PDF
doc.SaveToFile("ToPDF.pdf", FileFormat.PDF);

// Dispose resources
doc.Dispose();
Imports Spire.Doc

' Create a Document object
Private doc As New Document()

' Load a Word document
doc.LoadFromFile("C:\Users\Administrator\Desktop\Sample.docx")

' Save the document to PDF
doc.SaveToFile("ToPDF.pdf", FileFormat.PDF)

' Dispose resources
doc.Dispose()
$vbLabelText   $csharpLabel

IronPDF 提供內建支援直接將 DOCX 轉換為 PDF,這意味著您不需要安裝其他庫來處理此任務,從而節省了時間。 另一方面,Spire.PDF 無法直接將 DOCX 轉換為 PDF,因此您需要安裝 Spire.Doc 程式庫來將 DOCX 文件轉換為 PDF。

程式範例比較摘要

以下是總結IronPDF和Spire.PDF for .NET之間在程式碼實現方面的主要差異的對比表:

Spire Pdf Html To Pdf 1 related to 程式範例比較摘要

定價和授權:IronPDF 與 Spire.PDF for .NET 庫

IronPDF 價格和授權

IronPDF 有不同級別和額外功能可供購買許可證。 開發人員還可以購買Iron Suite,以兩個價格獲得Iron Software所有產品的使用權限。 如果您尚未準備購買授權,IronPDF 提供 免費試用,可持續使用 30 天。

  • 永久許可證:根據您的團隊規模、專案需求和地點數量,提供一系列永久許可證。 每種授權類型均提供電子郵件支援。
  • Lite License:此授权费用为$749,支持一名开发人员、一个地点和一个项目。
  • Plus License: 支援三位開發人員、三個地點和三個項目,這是比 Lite License 更進一步的選擇,費用為 $1,499。Plus License 除了基本的電子郵件支援,還提供聊天支援和電話支援。
  • Professional License:此許可證適用於較大的團隊,支持十名開發人員、十個地點和十個項目,價格為 $2,999。它提供與先前層級相同的聯繫支持渠道,此外還提供螢幕共享支持。
  • 免版稅重發:IronPDF 的許可證還提供免版稅重發保障,額外收費 $1,999
  • 不中斷的產品支援:IronPDF 提供持續的產品更新、安全功能升級以及來自其工程團隊的支援,價格為每年 $999,或一次性支付 $1,999 即可獲得 5 年的保障。
  • Iron Suite:只需 $1,498,即可獲得包括 IronPDF、IronOCR、IronWord、IronXL、IronBarcode、IronQR、IronZIP、IronPrint 和 IronWebScraper 在內的所有 Iron Software 產品的訪問權限。

    Spire Pdf Html To Pdf 2 related to IronPDF 價格和授權

Spire.PDF

Spire.PDF 提供多種授權選項,視您的需求而定。

  • 免費版本:Spire.PDF 確實提供免費版本,這個完全免費的 PDF API 限制為 10 頁 PDF,超過此數量您將需要購買付費授權。
  • 開發者訂閱:根據您需要的支援類型,每年價格為 $999 或 $1,199,這個選項是針對需要建置 PDF 相關功能但不需要 OEM 發行權的開發者。
  • 開發者 OEM 訂閱:費用約為每年 $2,549 - $4,248,具體取決於您所需的支援程度,並包括免費升級、高級支援,以及將應用程式分發給最終用戶的能力。
  • 網站小型企業:根據您所需要的支援,價格分別為 $4,599 或 $7,598,此授權層級最多支援 10 位開發人員,涵蓋最多 10 個地點,提供一年更新與免費線上技術資源。
  • 網站 OEM 訂閱:費用為每年 $13,088 至 $16,687,具體視所需支援類型而定,目標對象為需要在多個地點部署應用程式的大型企業。

文件和支持:IronPDF 與 Spire.PDF for .NET

IronPDF

IronPDF 在提供廣泛的文檔和支援方面表現出色:

  • 綜合文件:涵蓋所有功能的廣泛且易於使用的文件。
  • 24/5 支援:提供現役工程師支持。
  • 影片教學:在 YouTube 上提供逐步的影片指南。
  • 社區論壇:活躍的社群提供額外支持。
  • 定期更新:每月產品更新,確保最新功能和安全修補程式。
  • PDF API 參考: 提供 API 參考資料,讓您可以充分利用我們工具的所有功能。

    如需更多資訊,請查看 IronPDF 詳細的文件,並訪問Iron Software YouTube 頻道

Spire.PDF for .NET 文件和支持

  • 論壇:Spire.PDF 有一個論壇,使用者可以在那裡互動,分享他們在使用 Spire.PDF 時遇到的技巧、用法和問題。
  • 程式碼範例:Spire.PDF 的網站上提供了程式碼範例,顯示如何在各種使用案例中使用該產品。
  • 新聞簡報:Spire.PDF 提供開發人員的新聞簡報,以公告更新和其他重要信息。
  • 支援:Spire.PDF 提供不同等級的支援和回應時間,這取決於您擁有的許可版本。

結論

總之,IronPDF 和 Spire.PDF for .NET 是在 .NET 應用程式中處理 PDF 文件的強大工具。 IronPDF 在易用性、跨平台兼容性和對現代網頁標準的支援方面表現出色,是優先選擇的產品之一,如果您希望提升在處理 PDF 文件時的效率。 Spire.PDF 提供了全面的功能集,但在處理複雜任務時可能需要更多的努力,並且可能缺乏 IronPDF 所提供的豐富而廣泛的功能集。

您可以嘗試30天免費試用來查看他們的可用功能。

Chipego
奇佩戈·卡林达
軟體工程師
Chipego 擁有天生的傾聽技能,這幫助他理解客戶問題,並提供智能解決方案。他在獲得信息技術理學學士學位後,于 2023 年加入 Iron Software 團隊。IronPDF 和 IronOCR 是 Chipego 專注的兩個產品,但隨著他每天找到新的方法來支持客戶,他對所有產品的了解也在不斷增長。他喜歡在 Iron Software 的協作生活,公司內的團隊成員從各自不同的經歷中共同努力,創造出有效的創新解決方案。當 Chipego 離開辦公桌時,他常常享受讀好書或踢足球的樂趣。
< 上一頁
ActivePDF DocConverter 教程及與 IronPDF 的比較
下一個 >
PDFSharp HTML 轉換PDF範例與教程比較