Zum Fußzeileninhalt springen
PRODUKTVERGLEICHE

Ein Vergleich zwischen IronPDF und GroupDocs

Comparing IronPDF and GroupDocs for PDF Document Automation

GroupDocs and IronPDF are both cross-platform applications that provide engineers with tools for document automation, enabling the creation, editing, formatting, and printing of PDF documents—one of the most widely used document formats today. When building projects with .NET and .NET Core, developers must choose the tools that best suit their project needs.

Developers need to be well-informed about the libraries and tools available to them, and PDF libraries are no exception. Each library has its own set of strengths and weaknesses, and it is essential for developers to select the tool that best meets the business and project requirements.

This article will compare two of the most popular PDF libraries for .NET and .NET Core developers: GroupDocs and IronPDF.

What is IronPDF?

IronPDF is a C#-based commercial PDF creation package for the .NET platform. It generates PDFs from HTML, CSS, images, and JavaScript, making it versatile for web applications, secure intranets, console apps, WPF apps, and MVC-patterned websites. IronPDF is compatible with all .NET Framework and .NET Core projects starting with version 4. For more details, visit the IronPDF official website.

What is the GroupDocs Library?

The GroupDocs.Editor API is a cross-platform .NET library that provides developers the capability to create simple applications that interface seamlessly with popular HTML editors (both free and paid) to convert, edit, and manipulate documents across a variety of file formats. You can learn more about its features here.

Annotating PDF Documents

GroupDocs.Annotation

GroupDocs.Annotation for .NET enables developers to create applications using C#, ASP.NET, and other .NET technologies capable of performing document annotation functions such as drawing shapes, adding text and images, and highlighting text. Annotations can be manipulated and saved back in the original file type.

using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using GroupDocs.Annotation;
using GroupDocs.Annotation.Models;
using GroupDocs.Annotation.Models.AnnotationModels;

// Initialize list of AnnotationInfo
List<AnnotationInfo> annotations = new List<AnnotationInfo>();

// Initialize text annotation
AnnotationInfo textAnnotation = new AnnotationInfo
{
    Box = new Rectangle((float)265.44, (float)153.86, 206, 36),
    Type = AnnotationType.Text
};

// Add annotation to list
annotations.Add(textAnnotation);

// Get input file stream
using Stream inputFile = new FileStream("D:/input.pdf", FileMode.Open, FileAccess.ReadWrite);

// Export annotation and save the output file
CommonUtilities.SaveOutputDocument(inputFile, annotations, DocumentType.Pdf);
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using GroupDocs.Annotation;
using GroupDocs.Annotation.Models;
using GroupDocs.Annotation.Models.AnnotationModels;

// Initialize list of AnnotationInfo
List<AnnotationInfo> annotations = new List<AnnotationInfo>();

// Initialize text annotation
AnnotationInfo textAnnotation = new AnnotationInfo
{
    Box = new Rectangle((float)265.44, (float)153.86, 206, 36),
    Type = AnnotationType.Text
};

// Add annotation to list
annotations.Add(textAnnotation);

// Get input file stream
using Stream inputFile = new FileStream("D:/input.pdf", FileMode.Open, FileAccess.ReadWrite);

// Export annotation and save the output file
CommonUtilities.SaveOutputDocument(inputFile, annotations, DocumentType.Pdf);
Imports System
Imports System.Collections.Generic
Imports System.Drawing
Imports System.IO
Imports GroupDocs.Annotation
Imports GroupDocs.Annotation.Models
Imports GroupDocs.Annotation.Models.AnnotationModels

' Initialize list of AnnotationInfo
Private annotations As New List(Of AnnotationInfo)()

' Initialize text annotation
Private textAnnotation As New AnnotationInfo With {
	.Box = New Rectangle(CSng(265.44), CSng(153.86), 206, 36),
	.Type = AnnotationType.Text
}

' Add annotation to list
annotations.Add(textAnnotation)

' Get input file stream
Using inputFile As Stream = New FileStream("D:/input.pdf", FileMode.Open, FileAccess.ReadWrite)
	
	' Export annotation and save the output file
	CommonUtilities.SaveOutputDocument(inputFile, annotations, DocumentType.Pdf)
End Using
$vbLabelText   $csharpLabel

IronPDF

IronPDF allows users to annotate PDF documents programmatically using methods like IronPdf.PdfDocument.AddTextAnnotation.

using System;
using IronPdf;

class Program
{
    static void Main()
    {
        // Create a PDF annotation object
        PdfDocument pdf = PdfDocument.FromFile("existing.pdf");
        var annotation = new IronPdf.Annotations.TextAnnotation()
        {
            Title = "This is the major title",
            Subject = "This is a subtitle",
            Contents = "This is the long 'sticky note' comment content...",
            Icon = IronPdf.Annotations.TextAnnotation.AnnotationIcon.Help,
            Opacity = 0.9,
            Printable = false,
            Hidden = false,
            OpenByDefault = true,
            ReadOnly = false,
            Rotateable = true
        };

        // Add the annotation "sticky note" to a specific page and location within any new or existing PDF.
        pdf.AddTextAnnotation(annotation, 1, 150, 250);
        pdf.SaveAs("existing.pdf");
    }
}
using System;
using IronPdf;

class Program
{
    static void Main()
    {
        // Create a PDF annotation object
        PdfDocument pdf = PdfDocument.FromFile("existing.pdf");
        var annotation = new IronPdf.Annotations.TextAnnotation()
        {
            Title = "This is the major title",
            Subject = "This is a subtitle",
            Contents = "This is the long 'sticky note' comment content...",
            Icon = IronPdf.Annotations.TextAnnotation.AnnotationIcon.Help,
            Opacity = 0.9,
            Printable = false,
            Hidden = false,
            OpenByDefault = true,
            ReadOnly = false,
            Rotateable = true
        };

        // Add the annotation "sticky note" to a specific page and location within any new or existing PDF.
        pdf.AddTextAnnotation(annotation, 1, 150, 250);
        pdf.SaveAs("existing.pdf");
    }
}
Imports System
Imports IronPdf

Friend Class Program
	Shared Sub Main()
		' Create a PDF annotation object
		Dim pdf As PdfDocument = PdfDocument.FromFile("existing.pdf")
		Dim annotation = New IronPdf.Annotations.TextAnnotation() With {
			.Title = "This is the major title",
			.Subject = "This is a subtitle",
			.Contents = "This is the long 'sticky note' comment content...",
			.Icon = IronPdf.Annotations.TextAnnotation.AnnotationIcon.Help,
			.Opacity = 0.9,
			.Printable = False,
			.Hidden = False,
			.OpenByDefault = True,
			.ReadOnly = False,
			.Rotateable = True
		}

		' Add the annotation "sticky note" to a specific page and location within any new or existing PDF.
		pdf.AddTextAnnotation(annotation, 1, 150, 250)
		pdf.SaveAs("existing.pdf")
	End Sub
End Class
$vbLabelText   $csharpLabel

IronPDF's annotation features include options like color selection, element resizing, opacity settings, and text editing.

File Type Conversion

In document processing, converting certain file formats to PDF is essential. Here's a comparison of how GroupDocs and IronPDF perform conversions:

Converting Files to PDF with GroupDocs

GroupDocs Conversion API enables conversion of various document types like MS Word and Excel to PDF without requiring other productivity suites.

Convert XLSB to PDF in C#

using System;
using GroupDocs.Conversion.Options.Convert;

namespace ConvertXlsbToPdfInCSharp
{
    class Program
    {
        public static void Main(string[] args)
        {
            // Load license
            string licensePath = "GroupDocs.Conversion.lic";
            GroupDocs.Conversion.License lic = new GroupDocs.Conversion.License();
            lic.SetLicense(licensePath);

            // Load source XLSB for conversion
            var converter = new GroupDocs.Conversion.Converter("sample.xlsb");

            // Conversion options
            var convertOptions = new PdfConvertOptions();

            // Convert XLSB to PDF
            converter.Convert("converted.pdf", convertOptions);
            Console.WriteLine("Conversion complete.");
        }
    }
}
using System;
using GroupDocs.Conversion.Options.Convert;

namespace ConvertXlsbToPdfInCSharp
{
    class Program
    {
        public static void Main(string[] args)
        {
            // Load license
            string licensePath = "GroupDocs.Conversion.lic";
            GroupDocs.Conversion.License lic = new GroupDocs.Conversion.License();
            lic.SetLicense(licensePath);

            // Load source XLSB for conversion
            var converter = new GroupDocs.Conversion.Converter("sample.xlsb");

            // Conversion options
            var convertOptions = new PdfConvertOptions();

            // Convert XLSB to PDF
            converter.Convert("converted.pdf", convertOptions);
            Console.WriteLine("Conversion complete.");
        }
    }
}
Imports System
Imports GroupDocs.Conversion.Options.Convert

Namespace ConvertXlsbToPdfInCSharp
	Friend Class Program
		Public Shared Sub Main(ByVal args() As String)
			' Load license
			Dim licensePath As String = "GroupDocs.Conversion.lic"
			Dim lic As New GroupDocs.Conversion.License()
			lic.SetLicense(licensePath)

			' Load source XLSB for conversion
			Dim converter = New GroupDocs.Conversion.Converter("sample.xlsb")

			' Conversion options
			Dim convertOptions = New PdfConvertOptions()

			' Convert XLSB to PDF
			converter.Convert("converted.pdf", convertOptions)
			Console.WriteLine("Conversion complete.")
		End Sub
	End Class
End Namespace
$vbLabelText   $csharpLabel

Convert HTML to PDF

GroupDocs can convert HTML documents into PDF format, useful for transforming web content into printable archives. You can see a full tutorial on converting HTML to PDF here.

using System;
using GroupDocs.Conversion.Options.Convert;

namespace ConvertHtmlToPdfInCSharp
{
    class Program
    {
        public static void Main(string[] args)
        {
            // Use license
            string licensePath = "GroupDocs.Conversion.lic";
            GroupDocs.Conversion.License lic = new GroupDocs.Conversion.License();
            lic.SetLicense(licensePath);

            // Load HTML document
            var converter = new GroupDocs.Conversion.Converter("sample.html");

            // PDF options
            var convertOptions = new PdfConvertOptions();

            // Convert HTML to PDF
            converter.Convert("converted.pdf", convertOptions);
            Console.WriteLine("Conversion complete.");
        }
    }
}
using System;
using GroupDocs.Conversion.Options.Convert;

namespace ConvertHtmlToPdfInCSharp
{
    class Program
    {
        public static void Main(string[] args)
        {
            // Use license
            string licensePath = "GroupDocs.Conversion.lic";
            GroupDocs.Conversion.License lic = new GroupDocs.Conversion.License();
            lic.SetLicense(licensePath);

            // Load HTML document
            var converter = new GroupDocs.Conversion.Converter("sample.html");

            // PDF options
            var convertOptions = new PdfConvertOptions();

            // Convert HTML to PDF
            converter.Convert("converted.pdf", convertOptions);
            Console.WriteLine("Conversion complete.");
        }
    }
}
Imports System
Imports GroupDocs.Conversion.Options.Convert

Namespace ConvertHtmlToPdfInCSharp
	Friend Class Program
		Public Shared Sub Main(ByVal args() As String)
			' Use license
			Dim licensePath As String = "GroupDocs.Conversion.lic"
			Dim lic As New GroupDocs.Conversion.License()
			lic.SetLicense(licensePath)

			' Load HTML document
			Dim converter = New GroupDocs.Conversion.Converter("sample.html")

			' PDF options
			Dim convertOptions = New PdfConvertOptions()

			' Convert HTML to PDF
			converter.Convert("converted.pdf", convertOptions)
			Console.WriteLine("Conversion complete.")
		End Sub
	End Class
End Namespace
$vbLabelText   $csharpLabel

Converting Files to PDF with IronPDF

IronPDF leverages a Chromium engine to accurately convert HTML to PDF.

HTML to PDF

IronPDF can convert HTML content directly into PDF with a simple implementation.

using IronPdf;

var renderer = new IronPdf.ChromePdfRenderer();
using var pdf = renderer.RenderHtmlAsPdf("<h1>Html with CSS and Images</h1>");
pdf.SaveAs("pixel-perfect.pdf");
using IronPdf;

var renderer = new IronPdf.ChromePdfRenderer();
using var pdf = renderer.RenderHtmlAsPdf("<h1>Html with CSS and Images</h1>");
pdf.SaveAs("pixel-perfect.pdf");
Imports IronPdf

Private renderer = New IronPdf.ChromePdfRenderer()
Private pdf = renderer.RenderHtmlAsPdf("<h1>Html with CSS and Images</h1>")
pdf.SaveAs("pixel-perfect.pdf")
$vbLabelText   $csharpLabel

For more transformative power, consider reviewing IronPDF documentation on HTML to PDF converters.

URL to PDF

Converting entire web URLs into PDF format is straightforward with IronPDF, which uses a custom browser engine.

using IronPdf;

IronPdf.ChromePdfRenderer renderer = new IronPdf.ChromePdfRenderer();
using var pdf = renderer.RenderUrlAsPdf("https://ironpdf.com/");

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

IronPdf.ChromePdfRenderer renderer = new IronPdf.ChromePdfRenderer();
using var pdf = renderer.RenderUrlAsPdf("https://ironpdf.com/");

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

Private renderer As New IronPdf.ChromePdfRenderer()
Private pdf = renderer.RenderUrlAsPdf("https://ironpdf.com/")

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

For more information regarding URL to PDF conversion using IronPDF, please visit the official API guide.

Conclusion

IronPDF and GroupDocs each offer unique advantages in PDF document processing. IronPDF excels in simplicity and ease of use with minimal setup and effective HTML rendering. GroupDocs provides comprehensive coverage for a broader range of document types beyond PDF, useful for diverse conversion requirements. IronPDF licensing is transparent with options available on the IronPDF pricing page, providing options for different project sizes and requirements.

As the demand for PDF signatures and document processing capabilities grows, understanding these libraries' strengths can help developers choose the right tool for their needs. Explore more about Iron Software's continuous innovation and features here.

Hinweis:GroupDocs is a registered trademark of its respective owner. This site is not affiliated with, endorsed by, or sponsored by GroupDocs. All product names, logos, and brands are property of their respective owners. Comparisons are for informational purposes only and reflect publicly available information at the time of writing.

Häufig gestellte Fragen

Wie kann ich HTML in PDF mit einer .NET-Bibliothek konvertieren?

Sie können die RenderHtmlAsPdf-Methode von IronPDF verwenden, um HTML-Strings in PDFs zu konvertieren. Für die Konvertierung von HTML-Dateien steht die RenderHtmlFileAsPdf-Methode zur Verfügung.

Welche Funktionen bietet IronPDF für PDF-Anmerkungen?

IronPDF bietet leistungsstarke Anmerkungsfunktionen, die es Benutzern ermöglichen, Textanmerkungen hinzuzufügen, Farben anzupassen, Elemente zu vergrößern, die Deckkraft einzustellen und Text innerhalb von PDFs programmatisch zu bearbeiten.

Welche .NET-Bibliothek unterstützt eine breitere Palette von Dokumentenformaten für die Konvertierung?

GroupDocs unterstützt eine breitere Palette von Dokumentenformaten und ermöglicht die Konvertierung von MS Word, Excel und anderen Dateitypen in PDF, was es ideal für diverse Dokumentkonvertierungsanforderungen macht.

Wie handhabt IronPDF die Konvertierung von Web-URLs in PDF?

IronPDF kann gesamte Web-URLs mit seiner benutzerdefinierten Browser-Engine in PDF-Format konvertieren und vereinfacht so die Erstellung von PDFs aus Online-Inhalten.

Welche Vorteile bietet die Verwendung von IronPDF für die Automatisierung von PDF-Dokumenten?

IronPDF bietet Einfachheit und Benutzerfreundlichkeit mit minimalem Setup, effektive HTML-Darstellung und leistungsstarke Anmerkungsfunktionen und ist daher gut geeignet für Webanwendungen und MVC-gemusterte Websites.

Wie kann ich Anmerkungen zu Dokumenten mit GroupDocs hinzufügen?

GroupDocs ermöglicht das Hinzufügen verschiedener Anmerkungen, einschließlich Formen, Texten und Bildern, zu Dokumenten und bietet umfassende Werkzeuge für die Dokumentenmanipulation in mehreren Formaten.

Was sollten Entwickler bei der Auswahl einer PDF-Bibliothek beachten?

Entwickler sollten ihre spezifischen Projektanforderungen evaluieren und die Stärken von Bibliotheken wie IronPDF und GroupDocs vergleichen, um diejenige auszuwählen, die am besten zu ihren Bedürfnissen passt.

Kann IronPDF für sichere Dokumentenerstellung in Webanwendungen verwendet werden?

Ja, IronPDF ist geeignet für die Erstellung sicherer PDF-Dokumente in Webanwendungen und nutzt seine Fähigkeiten, um HTML, CSS und JavaScript mit Präzision darzustellen.

Curtis Chau
Technischer Autor

Curtis Chau hat einen Bachelor-Abschluss in Informatik von der Carleton University und ist spezialisiert auf Frontend-Entwicklung mit Expertise in Node.js, TypeScript, JavaScript und React. Leidenschaftlich widmet er sich der Erstellung intuitiver und ästhetisch ansprechender Benutzerschnittstellen und arbeitet gerne mit modernen Frameworks sowie der Erstellung gut strukturierter, optisch ansprechender ...

Weiterlesen