產品比較

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

發佈 2024年11月11日
分享:

介紹

您是否正在尋找一個 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。
  • IDEs: 支援使用 Microsoft Visual Studio 和 JetBrains Rider & ReSharper 等 IDEs。
  • 作業系統和處理器: 支援多種不同的作業系統和處理器,包括 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")
VB   C#

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
VB   C#

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")
VB   C#

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)
VB   C#

這兩個函式庫都提供了易於使用的方法來加密 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")
VB   C#

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)
VB   C#

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")
VB   C#

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()
VB   C#

數位簽署 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")
VB   C#

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")
VB   C#

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")
VB   C#

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)
VB   C#

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")
VB   C#

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()
VB   C#

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這使您以兩個產品的價格獲得IronSoftware所有產品的使用權。 如果您還沒有準備好購買許可證,IronPDF 提供一個免費試用持續30天。

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

    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 名開發者,享有 1 年的更新以及免費的線上技術資源。
  • 網站 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 所提供的豐富而廣泛的功能集。

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

< 上一頁
ActivePDF DocConverter 教程及與 IronPDF 的比較
下一個 >
PDFSharp HTML 轉換PDF範例與教程比較