產品比較

IronPDF 與 iText7 的比較

介紹

一個體面且簡單的 PDF 操作工具可以簡化創建和編輯 PDF 文件所涉及的許多任務和過程。 在 .NET 生態系統中,有兩個熱門的庫——IronPDF 和 iText——可以在沒有任何 Adobe 相依性的情況下生成 PDF。 它們都具有多種功能,例如創建、編輯、轉換等,但本文將重點比較這些庫在三個標準上的表現:它們所提供功能的能力、它們提供的文檔質量、這些公司對其產品所採用的定價政策。

IronPDF 和 iText 總覽

IronPDF 是一個著名的 .NET PDF 庫,允許程式設計師輕鬆創建、修改和操作 PDF 文件。 它可以用於不同的 .NET 環境,包括 Core、8、7、6 和 Framework,使其對於各種開發需求具有高度靈活性。 IronPDF 的主要特點是其豐富的功能集,例如 HTML 到 PDF 的轉換、合併 PDF 的能力、PDF 加密和應用數位簽章等。 文件以用户能够轻松理解的方式编写,同时该库本身具有强大的技术支持。

iText 是最受歡迎的 PDF 庫之一,不僅適用於 Java,也適用於 .NET (C#)。 iText Core 8 提供了一個企業級的可編程解決方案,用於創建和操作 PDF 文件。 iText 提供許多不同的功能支援,並以開源(AGPL)許可證和商業許可證的形式發布。 這意味著,由於其多功能性,它能夠在數位轉型專案中涵蓋廣泛的使用案例。

跨平台相容性

IronPDF 和 iText 相容於各種平台; 他們可以在許多不同的系統中處理 PDF,也可以在 .NET 框架內處理。 因此,我們將比較每個產品所支持的框架和平台。

IronPDF:

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

iText

  • .NET 版本:

    • .NET Core(2.x, 3.x)

    • .NET Framework (4.6.1+)
  • .NET 5+
  • 應用環境:iText 支援多種應用環境,因其支援 Java 和 .NET(C#),包括: Windows、Mac、Linux 和 Docker。
  • 操作系統:運行於 Windows、macOS 及 Linux 操作系統

關鍵功能比較:IronPDF vs. iText

IronPDF 主要功能列表和 iText 都提供一系列功能和工具,可用於處理 PDF 文件; 接下來的這一部分將著重於深入瞭解這些功能,以及這兩個庫在執行不同PDF相關任務時的比較。

IronPDF

  • HTML 轉 PDF 轉換: 支援 HTML、CSS、JavaScript 和圖像。
  • PDF 檔案操作:拆分並合併文件,更改格式並編輯現有的 PDF 文件
  • 安全性:PDF加密和解密。
  • 編輯:添加註解、書籤和大綱。
  • 模板:應用頁眉、頁腳和頁碼。
  • 浮水印:輕鬆將文字和圖片浮水印應用於 PDF 檔案; 利用其 HTML/CSS 的使用來全面控制流程。
  • PDF 加蓋:使用 IronPDF 將影像和文字加蓋到您的 PDF 文件上。

    欲知更多有關IronPDF提供的廣泛功能套件,請造訪IronPDF功能頁面

iText

  • PDF 創建:支持從頭開始創建 PDF 文件。
  • 表單:建立和編輯 PDF 表單。
  • 數位簽章:簽署 PDF 文件。
  • 壓縮: 優化 PDF 文件大小。
  • 內容提取:從 PDF 中提取文字和圖片。
  • 開源:可在 AGPL 許可證下使用。
  • 自訂能力:可針對進階用例進行高度自訂。

IronPDF與iText之間PDF功能特性的比較

HTML 轉 PDF

使用 IronPDF 將HTML 內容轉換為 PDF是一項在許多不同辦公室和工作場所中非常簡單的任務。 以下是 IronPDF 和 iText 在處理此過程時的程式碼範例比較。

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

iText

using iText.Html2pdf;

static void Main(string[] args)
  {
    using (FileStream htmlSource = File.Open("input.html", FileMode.Open))
    using (FileStream pdfDest = File.Open("output.pdf", FileMode.Create))
    {
        ConverterProperties converterProperties = new ConverterProperties();
        HtmlConverter.ConvertToPdf(htmlSource, pdfDest, converterProperties);
    }
  }
using iText.Html2pdf;

static void Main(string[] args)
  {
    using (FileStream htmlSource = File.Open("input.html", FileMode.Open))
    using (FileStream pdfDest = File.Open("output.pdf", FileMode.Create))
    {
        ConverterProperties converterProperties = new ConverterProperties();
        HtmlConverter.ConvertToPdf(htmlSource, pdfDest, converterProperties);
    }
  }
Imports iText.Html2pdf

Shared Sub Main(ByVal args() As String)
	Using htmlSource As FileStream = File.Open("input.html", FileMode.Open)
	Using pdfDest As FileStream = File.Open("output.pdf", FileMode.Create)
		Dim converterProperties As New ConverterProperties()
		HtmlConverter.ConvertToPdf(htmlSource, pdfDest, converterProperties)
	End Using
	End Using
End Sub
$vbLabelText   $csharpLabel

在將 HTML 轉換為 PDF 時,IronPDF 提供了一個簡潔方便的工具來執行此任務。 利用 ChromePdfRenderer 將 HTML 內容轉換為 PDF,IronPDF 在為用戶提供像素完美的 PDF 文件方面表現出色。 用戶可以直接從 HTML 字串建立 PDF,如第一個範例所示,或在高級範例中藉由可選的基準路徑包括外部資產,如圖像。 iText 採用基本的方法,使用其 HtmlConverter 類別從 HTML 文件創建 PDF 文件。

加密 PDF 文件

使用 IronPDF 加密 PDF 文件 和 PDF 文件的解密在許多工作場所中都是至關重要的。 要輕鬆處理此任務,必須擁有一個可以方便執行的工具。 在下面的程式碼中,我們將看到iText和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
// The following code makes a PDF read only and will disallow copy & paste and printing
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
// The following code makes a PDF read only and will disallow copy & paste and printing
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
' The following code makes a PDF read only and will disallow copy & paste and printing
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

iText

using System;
using System.IO;
using System.Text;
using iText.Kernel.Pdf;

public class EncryptPdf
    {
        public static readonly String DEST = "results/sandbox/security/encrypt_pdf.pdf";
        public static readonly String SRC = "../../../resources/pdfs/hello.pdf";

        public static readonly String OWNER_PASSWORD = "World";
        public static readonly String USER_PASSWORD = "Hello";

        public static void Main(String[] args)
        {
            FileInfo file = new FileInfo(DEST);
            file.Directory.Create();

            new EncryptPdf().ManipulatePdf(DEST);
        }

        protected void ManipulatePdf(String dest)
        {
            PdfDocument document = new PdfDocument(new PdfReader(SRC), new PdfWriter(dest,
                new WriterProperties().SetStandardEncryption(
                    Encoding.UTF8.GetBytes(USER_PASSWORD),
                    Encoding.UTF8.GetBytes(OWNER_PASSWORD),
                    EncryptionConstants.ALLOW_PRINTING,
                    EncryptionConstants.ENCRYPTION_AES_128 
 EncryptionConstants.DO_NOT_ENCRYPT_METADATA
                )));
            document.Close();
        }
    }
using System;
using System.IO;
using System.Text;
using iText.Kernel.Pdf;

public class EncryptPdf
    {
        public static readonly String DEST = "results/sandbox/security/encrypt_pdf.pdf";
        public static readonly String SRC = "../../../resources/pdfs/hello.pdf";

        public static readonly String OWNER_PASSWORD = "World";
        public static readonly String USER_PASSWORD = "Hello";

        public static void Main(String[] args)
        {
            FileInfo file = new FileInfo(DEST);
            file.Directory.Create();

            new EncryptPdf().ManipulatePdf(DEST);
        }

        protected void ManipulatePdf(String dest)
        {
            PdfDocument document = new PdfDocument(new PdfReader(SRC), new PdfWriter(dest,
                new WriterProperties().SetStandardEncryption(
                    Encoding.UTF8.GetBytes(USER_PASSWORD),
                    Encoding.UTF8.GetBytes(OWNER_PASSWORD),
                    EncryptionConstants.ALLOW_PRINTING,
                    EncryptionConstants.ENCRYPTION_AES_128 
 EncryptionConstants.DO_NOT_ENCRYPT_METADATA
                )));
            document.Close();
        }
    }
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

IronPDF 為用戶提供了一種簡單的方法來加密 PDF 文件,並同時賦予用戶對過程的充足控制,包括編輯元數據和調整安全設置,例如將文檔設置為唯讀或限制用戶行為如複製和粘貼。 另一方面,iText 使用較低階且較長的方法,即在文件創建期間應用 PDF 加密,指定持有者和使用者密碼,並通過如 AES-128 之類的加密標準設置列印權限等權限。

編輯 PDF 內容

在處理機密或私人信息時,有時可能需要在 PDF 中使用 IronPDF 隱藏文本文件的部分內容。以下的代碼示例將展示如何使用 IronPDF 替代 iText 來隱藏文本。

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

iText

using System;
using System.IO;
using iText.Kernel.Pdf;
using iText.Layout;
using iText.Layout.Element;
using iText.Layout.Properties;
using iText.Kernel.Colors;

string src = "input.pdf";
string dest = "output_redacted.pdf";

using (PdfReader reader = new PdfReader(src))
            {
                using (PdfWriter writer = new PdfWriter(dest))
                {
                    using (PdfDocument pdfDoc = new PdfDocument(reader, writer))
                    {
                        // Iterate through each page
                        for (int pageNum = 1; pageNum <= pdfDoc.GetNumberOfPages(); pageNum++)
                        {
                            PdfPage page = pdfDoc.GetPage(pageNum);
                            PdfCanvas canvas = new PdfCanvas(page);
                            Rectangle[] rectanglesToRedact = { new Rectangle(100, 100, 200, 50) }; // Example: Define rectangles to redact

                            // Overlay black rectangles to simulate redaction
                            foreach (Rectangle rect in rectanglesToRedact)
                            {
                                canvas.SetFillColor(ColorConstants.BLACK)
                                    .Rectangle(rect.GetX(), rect.GetY(), rect.GetWidth(), rect.GetHeight())
                                    .Fill();
                            }
                        }
                    }
                }
using System;
using System.IO;
using iText.Kernel.Pdf;
using iText.Layout;
using iText.Layout.Element;
using iText.Layout.Properties;
using iText.Kernel.Colors;

string src = "input.pdf";
string dest = "output_redacted.pdf";

using (PdfReader reader = new PdfReader(src))
            {
                using (PdfWriter writer = new PdfWriter(dest))
                {
                    using (PdfDocument pdfDoc = new PdfDocument(reader, writer))
                    {
                        // Iterate through each page
                        for (int pageNum = 1; pageNum <= pdfDoc.GetNumberOfPages(); pageNum++)
                        {
                            PdfPage page = pdfDoc.GetPage(pageNum);
                            PdfCanvas canvas = new PdfCanvas(page);
                            Rectangle[] rectanglesToRedact = { new Rectangle(100, 100, 200, 50) }; // Example: Define rectangles to redact

                            // Overlay black rectangles to simulate redaction
                            foreach (Rectangle rect in rectanglesToRedact)
                            {
                                canvas.SetFillColor(ColorConstants.BLACK)
                                    .Rectangle(rect.GetX(), rect.GetY(), rect.GetWidth(), rect.GetHeight())
                                    .Fill();
                            }
                        }
                    }
                }
Imports System
Imports System.IO
Imports iText.Kernel.Pdf
Imports iText.Layout
Imports iText.Layout.Element
Imports iText.Layout.Properties
Imports iText.Kernel.Colors

Private src As String = "input.pdf"
Private dest As String = "output_redacted.pdf"

Using reader As New PdfReader(src)
				Using writer As New PdfWriter(dest)
					Using pdfDoc As New PdfDocument(reader, writer)
						' Iterate through each page
						Dim pageNum As Integer = 1
						Do While pageNum <= pdfDoc.GetNumberOfPages()
							Dim page As PdfPage = pdfDoc.GetPage(pageNum)
							Dim canvas As New PdfCanvas(page)
							Dim rectanglesToRedact() As Rectangle = { New Rectangle(100, 100, 200, 50) } ' Example: Define rectangles to redact

							' Overlay black rectangles to simulate redaction
							For Each rect As Rectangle In rectanglesToRedact
								canvas.SetFillColor(ColorConstants.BLACK).Rectangle(rect.GetX(), rect.GetY(), rect.GetWidth(), rect.GetHeight()).Fill()
							Next rect
							pageNum += 1
						Loop
					End Using
				End Using
$vbLabelText   $csharpLabel

IronPDF 的修訂工具簡潔易用,只需少量程式碼即可簡化修訂流程。 這有助於提高 PDF 編輯任務的效率,並為用戶提供輕鬆保護其敏感和私人數據的方式。

iText,另一方面,並沒有像 IronPDF 那樣提供內建的修訂工具。 但是,它仍然可以使用上面顯示的方法來覆蓋敏感數據,從而遮蓋使用者希望刪除的內容。 然而,這可能導致問題,因為這些矩形並未真正刪除或正確遮蔽文字,這意味著其他人可能會複製和貼上試圖被遮蔽的資料。

簽署 PDF 文件

能夠使用IronPDF對PDF文件進行數位簽署,例如PDF檔案,然後使其成為自動化過程,可能會節省時間。 以下是一些代碼,將比較 IronPDF 與 iText 在進行文件數字簽名時的差異。

IronPDF

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

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

// Create PdfSignature object
var sig = new PdfSignature(cert);

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

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

// Create PdfSignature object
var sig = new PdfSignature(cert);

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

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

' Create PdfSignature object
Private sig = New PdfSignature(cert)

' Sign PDF document
Private pdf As PdfDocument = PdfDocument.FromFile("document.pdf")
pdf.Sign(sig)
pdf.SaveAs("signed.pdf")
$vbLabelText   $csharpLabel

iText

using System;
using System.IO;
using iText.Kernel.Pdf;
using iText.Signatures;
using Org.BouncyCastle.Crypto;
using Org.BouncyCastle.Pkcs;
using Org.BouncyCastle.X509;

class Program
{
    static void Main(string[] args)
    {
        string src = "input.pdf";
        string dest = "output_signed.pdf";
        string pfxFile = "your_certificate.pfx";
        string pfxPassword = "your_password";

        try
        {
            // Load your certificate
            Pkcs12Store ks = new Pkcs12Store(new FileStream(pfxFile, FileMode.Open), pfxPassword.ToCharArray());
            string alias = null;
            foreach (string al in ks.Aliases)
            {
                if (ks.IsKeyEntry(al))
                {
                    alias = al;
                    break;
                }
            }
            ICipherParameters pk = ks.GetKey(alias).Key;
            X509CertificateEntry[] chain = ks.GetCertificateChain(alias);
            X509Certificate2 cert = new X509Certificate2(chain[0].Certificate.GetEncoded());

            // Create output PDF with signed content
            using (PdfReader reader = new PdfReader(src))
            {
                using (PdfWriter writer = new PdfWriter(dest))
                {
                    using (PdfDocument pdfDoc = new PdfDocument(reader, writer))
                    {
                        // Create the signer
                        PdfSigner signer = new PdfSigner(pdfDoc, writer, new StampingProperties().UseAppendMode());

                        // Configure signature appearance
                        PdfSignatureAppearance appearance = signer.GetSignatureAppearance();
                        appearance.SetReason("Digital Signature");
                        appearance.SetLocation("Your Location");
                        appearance.SetContact("Your Contact");

                        // Create signature
                        IExternalSignature pks = new PrivateKeySignature(pk, "SHA-256");
                        signer.SignDetached(pks, chain, null, null, null, 0, PdfSigner.CryptoStandard.CMS);
                    }
                }
            }
            Console.WriteLine($"PDF digitally signed successfully: {dest}");
        }
        catch (Exception ex)
        {
            Console.WriteLine($"Error signing PDF: {ex.Message}");
        }
    }
}
using System;
using System.IO;
using iText.Kernel.Pdf;
using iText.Signatures;
using Org.BouncyCastle.Crypto;
using Org.BouncyCastle.Pkcs;
using Org.BouncyCastle.X509;

class Program
{
    static void Main(string[] args)
    {
        string src = "input.pdf";
        string dest = "output_signed.pdf";
        string pfxFile = "your_certificate.pfx";
        string pfxPassword = "your_password";

        try
        {
            // Load your certificate
            Pkcs12Store ks = new Pkcs12Store(new FileStream(pfxFile, FileMode.Open), pfxPassword.ToCharArray());
            string alias = null;
            foreach (string al in ks.Aliases)
            {
                if (ks.IsKeyEntry(al))
                {
                    alias = al;
                    break;
                }
            }
            ICipherParameters pk = ks.GetKey(alias).Key;
            X509CertificateEntry[] chain = ks.GetCertificateChain(alias);
            X509Certificate2 cert = new X509Certificate2(chain[0].Certificate.GetEncoded());

            // Create output PDF with signed content
            using (PdfReader reader = new PdfReader(src))
            {
                using (PdfWriter writer = new PdfWriter(dest))
                {
                    using (PdfDocument pdfDoc = new PdfDocument(reader, writer))
                    {
                        // Create the signer
                        PdfSigner signer = new PdfSigner(pdfDoc, writer, new StampingProperties().UseAppendMode());

                        // Configure signature appearance
                        PdfSignatureAppearance appearance = signer.GetSignatureAppearance();
                        appearance.SetReason("Digital Signature");
                        appearance.SetLocation("Your Location");
                        appearance.SetContact("Your Contact");

                        // Create signature
                        IExternalSignature pks = new PrivateKeySignature(pk, "SHA-256");
                        signer.SignDetached(pks, chain, null, null, null, 0, PdfSigner.CryptoStandard.CMS);
                    }
                }
            }
            Console.WriteLine($"PDF digitally signed successfully: {dest}");
        }
        catch (Exception ex)
        {
            Console.WriteLine($"Error signing PDF: {ex.Message}");
        }
    }
}
Imports System
Imports System.IO
Imports iText.Kernel.Pdf
Imports iText.Signatures
Imports Org.BouncyCastle.Crypto
Imports Org.BouncyCastle.Pkcs
Imports Org.BouncyCastle.X509

Friend Class Program
	Shared Sub Main(ByVal args() As String)
		Dim src As String = "input.pdf"
		Dim dest As String = "output_signed.pdf"
		Dim pfxFile As String = "your_certificate.pfx"
		Dim pfxPassword As String = "your_password"

		Try
			' Load your certificate
			Dim ks As New Pkcs12Store(New FileStream(pfxFile, FileMode.Open), pfxPassword.ToCharArray())
			Dim [alias] As String = Nothing
			For Each al As String In ks.Aliases
				If ks.IsKeyEntry(al) Then
					[alias] = al
					Exit For
				End If
			Next al
			Dim pk As ICipherParameters = ks.GetKey([alias]).Key
			Dim chain() As X509CertificateEntry = ks.GetCertificateChain([alias])
			Dim cert As New X509Certificate2(chain(0).Certificate.GetEncoded())

			' Create output PDF with signed content
			Using reader As New PdfReader(src)
				Using writer As New PdfWriter(dest)
					Using pdfDoc As New PdfDocument(reader, writer)
						' Create the signer
						Dim signer As New PdfSigner(pdfDoc, writer, (New StampingProperties()).UseAppendMode())

						' Configure signature appearance
						Dim appearance As PdfSignatureAppearance = signer.GetSignatureAppearance()
						appearance.SetReason("Digital Signature")
						appearance.SetLocation("Your Location")
						appearance.SetContact("Your Contact")

						' Create signature
						Dim pks As IExternalSignature = New PrivateKeySignature(pk, "SHA-256")
						signer.SignDetached(pks, chain, Nothing, Nothing, Nothing, 0, PdfSigner.CryptoStandard.CMS)
					End Using
				End Using
			End Using
			Console.WriteLine($"PDF digitally signed successfully: {dest}")
		Catch ex As Exception
			Console.WriteLine($"Error signing PDF: {ex.Message}")
		End Try
	End Sub
End Class
$vbLabelText   $csharpLabel

在數位方式將簽名應用到 PDF 文件時,IronPDF 提供了一個簡潔而強大的工具來完成此過程。 其簡單性使流程能夠快速進行,為任何開發人員節省時間,以滿足他們的簽署需求。 iText 需要較長且更複雜的過程來對 PDF 文件進行數字簽名,儘管其使用不同的介面選項和密鑰的能力確實為使用者提供了更多的控制,但該工具執行此任務的複雜性可能會成為障礙。

將浮水印應用於 PDF 文件

透過軟體在PDF上使用IronPDF加入和個性化浮水印,可以大大幫助保密、版權保護、品牌化或其他涉及敏感資訊的任務。 以下是 IronPDF 和 iText 如何將浮水印應用於 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

iText

using iText.IO.Font;
using iText.IO.Font.Constants;
using iText.Kernel.Colors;
using iText.Kernel.Font;
using iText.Kernel.Pdf;
using iText.Kernel.Pdf.Canvas;
using iText.Kernel.Pdf.Extgstate;
using iText.Layout;
using iText.Layout.Element;
using iText.Layout.Properties;

public class TransparentWatermark 
    {
        public static readonly String DEST = "results/sandbox/stamper/transparent_watermark.pdf";
        public static readonly String SRC = "../../../resources/pdfs/hero.pdf";

        public static void Main(String[] args) 
        {
            FileInfo file = new FileInfo(DEST);
            file.Directory.Create();

            new TransparentWatermark().ManipulatePdf(DEST);
        }

        protected void ManipulatePdf(String dest) 
        {
            PdfDocument pdfDoc = new PdfDocument(new PdfReader(SRC), new PdfWriter(dest));
            PdfCanvas under = new PdfCanvas(pdfDoc.GetFirstPage().NewContentStreamBefore(), new PdfResources(), pdfDoc);
            PdfFont font = PdfFontFactory.CreateFont(FontProgramFactory.CreateFont(StandardFonts.HELVETICA));
            Paragraph paragraph = new Paragraph("This watermark is added UNDER the existing content")
                    .SetFont(font)
                    .SetFontSize(15);

            Canvas canvasWatermark1 = new Canvas(under, pdfDoc.GetDefaultPageSize())
                    .ShowTextAligned(paragraph, 297, 550, 1, TextAlignment.CENTER, VerticalAlignment.TOP, 0);
            canvasWatermark1.Close();
            PdfCanvas over = new PdfCanvas(pdfDoc.GetFirstPage());
            over.SetFillColor(ColorConstants.BLACK);
            paragraph = new Paragraph("This watermark is added ON TOP OF the existing content")
                    .SetFont(font)
                    .SetFontSize(15);

            Canvas canvasWatermark2 = new Canvas(over, pdfDoc.GetDefaultPageSize())
                    .ShowTextAligned(paragraph, 297, 500, 1, TextAlignment.CENTER, VerticalAlignment.TOP, 0);
            canvasWatermark2.Close();
            paragraph = new Paragraph("This TRANSPARENT watermark is added ON TOP OF the existing content")
                    .SetFont(font)
                    .SetFontSize(15);
            over.SaveState();

            // Creating a dictionary that maps resource names to graphics state parameter dictionaries
            PdfExtGState gs1 = new PdfExtGState();
            gs1.SetFillOpacity(0.5f);
            over.SetExtGState(gs1);
            Canvas canvasWatermark3 = new Canvas(over, pdfDoc.GetDefaultPageSize())
                    .ShowTextAligned(paragraph, 297, 450, 1, TextAlignment.CENTER, VerticalAlignment.TOP, 0);
            canvasWatermark3.Close();
            over.RestoreState();

            pdfDoc.Close();
        }
    }
using iText.IO.Font;
using iText.IO.Font.Constants;
using iText.Kernel.Colors;
using iText.Kernel.Font;
using iText.Kernel.Pdf;
using iText.Kernel.Pdf.Canvas;
using iText.Kernel.Pdf.Extgstate;
using iText.Layout;
using iText.Layout.Element;
using iText.Layout.Properties;

public class TransparentWatermark 
    {
        public static readonly String DEST = "results/sandbox/stamper/transparent_watermark.pdf";
        public static readonly String SRC = "../../../resources/pdfs/hero.pdf";

        public static void Main(String[] args) 
        {
            FileInfo file = new FileInfo(DEST);
            file.Directory.Create();

            new TransparentWatermark().ManipulatePdf(DEST);
        }

        protected void ManipulatePdf(String dest) 
        {
            PdfDocument pdfDoc = new PdfDocument(new PdfReader(SRC), new PdfWriter(dest));
            PdfCanvas under = new PdfCanvas(pdfDoc.GetFirstPage().NewContentStreamBefore(), new PdfResources(), pdfDoc);
            PdfFont font = PdfFontFactory.CreateFont(FontProgramFactory.CreateFont(StandardFonts.HELVETICA));
            Paragraph paragraph = new Paragraph("This watermark is added UNDER the existing content")
                    .SetFont(font)
                    .SetFontSize(15);

            Canvas canvasWatermark1 = new Canvas(under, pdfDoc.GetDefaultPageSize())
                    .ShowTextAligned(paragraph, 297, 550, 1, TextAlignment.CENTER, VerticalAlignment.TOP, 0);
            canvasWatermark1.Close();
            PdfCanvas over = new PdfCanvas(pdfDoc.GetFirstPage());
            over.SetFillColor(ColorConstants.BLACK);
            paragraph = new Paragraph("This watermark is added ON TOP OF the existing content")
                    .SetFont(font)
                    .SetFontSize(15);

            Canvas canvasWatermark2 = new Canvas(over, pdfDoc.GetDefaultPageSize())
                    .ShowTextAligned(paragraph, 297, 500, 1, TextAlignment.CENTER, VerticalAlignment.TOP, 0);
            canvasWatermark2.Close();
            paragraph = new Paragraph("This TRANSPARENT watermark is added ON TOP OF the existing content")
                    .SetFont(font)
                    .SetFontSize(15);
            over.SaveState();

            // Creating a dictionary that maps resource names to graphics state parameter dictionaries
            PdfExtGState gs1 = new PdfExtGState();
            gs1.SetFillOpacity(0.5f);
            over.SetExtGState(gs1);
            Canvas canvasWatermark3 = new Canvas(over, pdfDoc.GetDefaultPageSize())
                    .ShowTextAligned(paragraph, 297, 450, 1, TextAlignment.CENTER, VerticalAlignment.TOP, 0);
            canvasWatermark3.Close();
            over.RestoreState();

            pdfDoc.Close();
        }
    }
Imports iText.IO.Font
Imports iText.IO.Font.Constants
Imports iText.Kernel.Colors
Imports iText.Kernel.Font
Imports iText.Kernel.Pdf
Imports iText.Kernel.Pdf.Canvas
Imports iText.Kernel.Pdf.Extgstate
Imports iText.Layout
Imports iText.Layout.Element
Imports iText.Layout.Properties

Public Class TransparentWatermark
		Public Shared ReadOnly DEST As String = "results/sandbox/stamper/transparent_watermark.pdf"
		Public Shared ReadOnly SRC As String = "../../../resources/pdfs/hero.pdf"

		Public Shared Sub Main(ByVal args() As String)
			Dim file As New FileInfo(DEST)
			file.Directory.Create()

			Call (New TransparentWatermark()).ManipulatePdf(DEST)
		End Sub

		Protected Sub ManipulatePdf(ByVal dest As String)
			Dim pdfDoc As New PdfDocument(New PdfReader(SRC), New PdfWriter(dest))
			Dim under As New PdfCanvas(pdfDoc.GetFirstPage().NewContentStreamBefore(), New PdfResources(), pdfDoc)
			Dim font As PdfFont = PdfFontFactory.CreateFont(FontProgramFactory.CreateFont(StandardFonts.HELVETICA))
			Dim paragraph As Paragraph = (New Paragraph("This watermark is added UNDER the existing content")).SetFont(font).SetFontSize(15)

			Dim canvasWatermark1 As Canvas = (New Canvas(under, pdfDoc.GetDefaultPageSize())).ShowTextAligned(paragraph, 297, 550, 1, TextAlignment.CENTER, VerticalAlignment.TOP, 0)
			canvasWatermark1.Close()
			Dim over As New PdfCanvas(pdfDoc.GetFirstPage())
			over.SetFillColor(ColorConstants.BLACK)
			paragraph = (New Paragraph("This watermark is added ON TOP OF the existing content")).SetFont(font).SetFontSize(15)

			Dim canvasWatermark2 As Canvas = (New Canvas(over, pdfDoc.GetDefaultPageSize())).ShowTextAligned(paragraph, 297, 500, 1, TextAlignment.CENTER, VerticalAlignment.TOP, 0)
			canvasWatermark2.Close()
			paragraph = (New Paragraph("This TRANSPARENT watermark is added ON TOP OF the existing content")).SetFont(font).SetFontSize(15)
			over.SaveState()

			' Creating a dictionary that maps resource names to graphics state parameter dictionaries
			Dim gs1 As New PdfExtGState()
			gs1.SetFillOpacity(0.5F)
			over.SetExtGState(gs1)
			Dim canvasWatermark3 As Canvas = (New Canvas(over, pdfDoc.GetDefaultPageSize())).ShowTextAligned(paragraph, 297, 450, 1, TextAlignment.CENTER, VerticalAlignment.TOP, 0)
			canvasWatermark3.Close()
			over.RestoreState()

			pdfDoc.Close()
		End Sub
End Class
$vbLabelText   $csharpLabel

IronPDF 易於使用且直觀的 API 讓使用者可以快速將自訂浮水印套用到 PDF 文件,並在此過程中提供完整的控制。 其利用 HTML/CSS 進一步簡化了過程,同時不失去對自訂的任何控制。 iText 將浮水印添加到 PDF 的方法需要更多的手動工作來完成任務,這可能會減慢過程。

在 PDF 上加上圖像和文字標記

有時會需要在 PDF 頁面上添加文字或圖片印章,類似於在 PDF 文件上加上浮水印。 我們現在將比較 IronPDF 和 iText 在 PDF 文件上執行內容加蓋的表現。

IronPDF

using IronPdf;
using IronPdf.Editing;

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;

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

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

iText

using iText.Kernel.Pdf;
using iText.Layout;
using iText.Layout.Element;

public void StampPDF(string inputPdfPath, string outputPdfPath, string stampText)
{
    PdfDocument pdfDoc = new PdfDocument(new PdfReader(inputPdfPath), new PdfWriter(outputPdfPath));

    Document doc = new Document(pdfDoc);

    // Add stamp (text) to each page
    int numPages = pdfDoc.GetNumberOfPages();
    for (int i = 1; i <= numPages; i++)
    {
        doc.ShowTextAligned(new Paragraph(stampText),
                            36, 36, i, iText.Layout.Properties.TextAlignment.LEFT,
                            iText.Layout.Properties.VerticalAlignment.TOP, 0);
    }

    doc.Close();
}
using iText.Kernel.Pdf;
using iText.Layout;
using iText.Layout.Element;

public void StampPDF(string inputPdfPath, string outputPdfPath, string stampText)
{
    PdfDocument pdfDoc = new PdfDocument(new PdfReader(inputPdfPath), new PdfWriter(outputPdfPath));

    Document doc = new Document(pdfDoc);

    // Add stamp (text) to each page
    int numPages = pdfDoc.GetNumberOfPages();
    for (int i = 1; i <= numPages; i++)
    {
        doc.ShowTextAligned(new Paragraph(stampText),
                            36, 36, i, iText.Layout.Properties.TextAlignment.LEFT,
                            iText.Layout.Properties.VerticalAlignment.TOP, 0);
    }

    doc.Close();
}
Imports iText.Kernel.Pdf
Imports iText.Layout
Imports iText.Layout.Element

Public Sub StampPDF(ByVal inputPdfPath As String, ByVal outputPdfPath As String, ByVal stampText As String)
	Dim pdfDoc As New PdfDocument(New PdfReader(inputPdfPath), New PdfWriter(outputPdfPath))

	Dim doc As New Document(pdfDoc)

	' Add stamp (text) to each page
	Dim numPages As Integer = pdfDoc.GetNumberOfPages()
	For i As Integer = 1 To numPages
		doc.ShowTextAligned(New Paragraph(stampText), 36, 36, i, iText.Layout.Properties.TextAlignment.LEFT, iText.Layout.Properties.VerticalAlignment.TOP, 0)
	Next i

	doc.Close()
End Sub
$vbLabelText   $csharpLabel

IronPDF 可以幫助您以非常靈活且可自訂的方式在 PDF 上添加文字或圖像; 它讓您完全掌控。 對於熟悉 HTML/CSS 的開發人員來說,這個 API 容易理解和使用。 iText 利用其圖像和文字標註工具讓使用者對 PDF 檔案中顯示的內容有更多的控制,儘管這個過程可能會變得更為手動。

將 DOCX 轉換為 PDF

有時,您可能需要將 PDF 從一種格式轉換為另一種格式。 在這種情況下,我們正在查看使用 IronPDF 將 DOCX 轉換為 PDF,並比較 IronPDF 和 iText 處理此過程的不同方式。

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

iText

iText 本身無法處理 DOCX 到 PDF 的轉換; 相反,它依賴於外部庫,如 DocX 或 Aspose.Words。

IronPDF為開發人員提供了一個簡單而明確的工具,用於處理DOCX轉PDF的轉換任務,無需外部庫即可輕鬆將DOCX文件轉換為PDF格式。 iText,另一方面,依靠外部庫來執行這項任務。

程式範例比較摘要

iText C# HTML 轉換為 PDF 的替代方案

如需更詳細的範例,請造訪IronPDF 使用 HTML 創建 PDF 的範例

定價和授權:IronPDF 與 iText 庫比較

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 產品的訪問權限。

    IronPDF 授權比較

iText 授權

  • AGPL 授權:iText Core 庫是開源的,免費提供給用戶使用。 若要在此授權模式下使用iText,用戶必須遵守其條款,並且對iText的任何修改也必須在AGPL授權模式下發布。
  • 商業許可證: iText 提供商業許可模式,適用於不符合 AGPL 條款的開發項目,其價格是基於報價而定的。

文件和支援:IronPDF 與 iText

IronPDF

  • 全面的文件:涵蓋所有功能的詳細且易於使用的文件。
  • 24/5 支援:提供現役工程師支持。
  • 影片教學:在 YouTube 上提供逐步的影片指南。
  • 社區論壇:活躍的社群提供額外支持。
  • 定期更新:每月產品更新,確保最新功能和安全修補程式。

iText

  • 文件:詳細的文件涵蓋iText軟體提供的功能。
  • 範例和教程: 提供如何使用其各種功能的教程與代碼範例。
  • GitHub:開發人員可以輕鬆地將其遇到的任何問題或錯誤提交到iText GitHub儲存庫,並與iText團隊進行溝通
  • 更新:iText 提供定期更新和改進。

    有關 IronPDF 文檔和支持的更多詳細資訊,請造訪IronPDF 文檔Iron Software YouTube 頻道

結論

在 .NET 的 PDF 操作工具領域中,IronPDF 和 iText 都提供了針對各種開發需求的強大功能。 IronPDF 憑藉其在多種平台上的簡單整合脫穎而出,包括 .NET Core、Framework 和 Standard,以及全面的功能,例如 HTML 到 PDF 的轉換和高級安全選項。 另一方面,iText 因其 Java 來源而聞名,提供強大的 PDF 生成和操作工具,涵蓋開源和商業許可,強調多功能性和自定義。

選擇這些工具最終取決於專案需求、授權偏好以及所需的技術支援水準。 無論選擇 IronPDF 的簡單性和靈活性,還是功能豐富的開源 PDF 庫 iText,開發人員都有足夠的資源在其應用程式中有效地簡化 PDF 工作流程。

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

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