Test in a live environment
Test in production without watermarks.
Works wherever you need it to.
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.
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.
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.
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.
// 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
Stream inputFile = new FileStream("D:/input.pdf", FileMode.Open, FileAccess.ReadWrite);
// Export annotation and save the output file
CommonUtilities.SaveOutputDocument(inputFile, annotations, DocumentType.Pdf);
// 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
Stream inputFile = new FileStream("D:/input.pdf", FileMode.Open, FileAccess.ReadWrite);
// Export annotation and save the output file
CommonUtilities.SaveOutputDocument(inputFile, annotations, DocumentType.Pdf);
IRON VB CONVERTER ERROR developers@ironsoftware.com
IronPDF allows users to annotate PDF documents programmatically using methods like IronPdf.PdfDocument.AddTextAnnotation
.
using PdfDocument Pdf = PdfDocument.FromFile("existing.pdf");// Create a PDF annotation object
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 PdfDocument Pdf = PdfDocument.FromFile("existing.pdf");// Create a PDF annotation object
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 Pdf As PdfDocument = PdfDocument.FromFile("existing.pdf") ' Create a PDF annotation object
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 Using
IronPDF's annotation features include options like color selection, element resizing, opacity settings, and text editing.
In document processing, converting certain file formats to PDF is essential. Here's a comparison of how GroupDocs and IronPDF perform conversions:
GroupDocs Conversion API enables conversion of various document types like MS Word and Excel to PDF without requiring other productivity suites.
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("Done");
}
}
}
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("Done");
}
}
}
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("Done")
End Sub
End Class
End Namespace
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();
// HTML to PDF
converter.Convert("converted.pdf", convertOptions);
Console.WriteLine("Done");
}
}
}
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();
// HTML to PDF
converter.Convert("converted.pdf", convertOptions);
Console.WriteLine("Done");
}
}
}
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()
' HTML to PDF
converter.Convert("converted.pdf", convertOptions)
Console.WriteLine("Done")
End Sub
End Class
End Namespace
IronPDF leverages a Chromium engine to accurately convert 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")
For more transformative power, consider reviewing IronPDF documentation on HTML to PDF converters.
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")
For more information regarding URL to PDF conversion using IronPDF, please visit the official API guide.
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.
9 .NET API products for your office documents