Test in a live environment
Test in production without watermarks.
Works wherever you need it to.
PDF stands for Portable Document Format. The easiest way to summarize what this means is to imagine a folder that contains a collection of files, from graphics to text and more. These elements make up modern PDFs, and they are the basic building blocks from which PDFs are created. This file format was "discovered/invented" in the 1990s as a way to exchange information between users with different computer settings.
In this article, we will compare two popular PDF libraries for .NET components. These two libraries are:
IronPDF and SautinSoft PDF Focus .NET both focus on creating PDF files that can be read or edited in your Microsoft .NET applications, including ASP.NET web applications and traditional Windows applications. We can now compare these two libraries to decide which is best to use in our application. First, we will compare the features of the two libraries, then we will move on to their performance levels when converting and manipulating PDF files.
Both libraries are supported by the Microsoft .NET framework.
SautinSoft PDF Focus .NET is designed to assist you in the development of applications that require the conversion of files to PDF documents. If you wish to provide a way to convert PDF to Word from your WinForms or WPF/XAML application, you only need to add a reference to "SautinSoft.PdfFocus.dll" and write 3-4 lines of C# code.
Below are the features of SautinSoft PDF Focus .NET:
IronPDF from Iron Software is a powerful tool designed for .NET developers. It provides an easy and smart approach to transform any form of HTML web page into PDF format, without the problems that arise from producing any form of PDF document with only some strings of code.
In addition, IronPDF provides the ability to programmatically include many kinds of elements in a PDF document, including headers, footers, watermarks, and bookmarks.
Below are the features of IronPDF:
IronPDF.dll can be downloaded directly from the IronPDF NuGet Package and used as a reference in .NET projects. IronPDF classes can be accessed using the IronPdf namespace.
SautinSoft.PdfFocus packages can be downloaded directly from the official website and used as a reference in .NET projects. SautinSoft.PdfFocus objects can be used to convert documents.
Follow the same steps mentioned above, but search for IronPDF instead of SautinSoft.PdfFocus.
Add the IronPDF library as a project reference, as shown below:
This library offers developers top-quality conversion at affordable prices. The main point of interest is that PDF Focus .NET is less expensive than all of its competitive counterparts. For example, one license for the PDF Focus .NET - HTML Edition is valued at $749(USD), and the Total Edition starts from $778.
If you need a .NET library that can extract text data from PDF documents, then you are in the right place.
PDF Focus .NET helps you extract text from any PDF document. Text can be extracted from an entire document or individual pages. The library extracts high-quality text without unnecessary spaces between words, and it also supports Unicode characters. Furthermore, the layout of the text looks the same as in RTF, with the correct line breaks and columns. It also provides an API for converting PDF documents.
SautinSoft PDF Focus has its own PDF reader and DOCX renderer. Your .NET application will be able to convert any PDF documents to DOCX on the fly, without any dependencies on Microsoft Office or on Adobe Acrobat. Almost all features from both applications are supported. The resulting DOCX document will contain paragraphs, columns, tables, hyperlinks, images, page breaks, and so forth.
Another point of interest is that PDF Focus .NET has an AI feature and can understand and recreate real tables with rows and cells (PDF documents don't have real tables...if you see a table inside a PDF, it is actually just a set of lines that just gives the feeling of a real table).
// PM> Install-Package IronPdf
using IronPdf;
var Renderer = new IronPdf.ChromePdfRenderer();
Renderer.RenderHtmlAsPdf("<h1>Test HTML with images</h1>").SaveAs("test_image.pdf");
/****** Advanced ******/
// 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 PDF = Renderer.RenderHtmlAsPdf("<img src='icons/iron.png'>", @"C:\site\assets\");
PDF.SaveAs("html-with-assets.pdf")
// PM> Install-Package IronPdf
using IronPdf;
var Renderer = new IronPdf.ChromePdfRenderer();
Renderer.RenderHtmlAsPdf("<h1>Test HTML with images</h1>").SaveAs("test_image.pdf");
/****** Advanced ******/
// 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 PDF = Renderer.RenderHtmlAsPdf("<img src='icons/iron.png'>", @"C:\site\assets\");
PDF.SaveAs("html-with-assets.pdf")
IRON VB CONVERTER ERROR developers@ironsoftware.com
// PM> Install-Package IronPdf
using IronPdf;
IronPdf.ChromePdfRenderer Renderer = new IronPdf.ChromePdfRenderer();
var Pdf = Renderer.RenderUrlAsPdf("https://www.google.com/");
Pdf.SaveAs("url.pdf");
// see also Pdf.Stream
// PM> Install-Package IronPdf
using IronPdf;
IronPdf.ChromePdfRenderer Renderer = new IronPdf.ChromePdfRenderer();
var Pdf = Renderer.RenderUrlAsPdf("https://www.google.com/");
Pdf.SaveAs("url.pdf");
// see also Pdf.Stream
' PM> Install-Package IronPdf
Imports IronPdf
Private Renderer As New IronPdf.ChromePdfRenderer()
Private Pdf = Renderer.RenderUrlAsPdf("https://www.google.com/")
Pdf.SaveAs("url.pdf")
' see also Pdf.Stream
// PM> Install-Package IronPdf
using IronPdf;
using System.IO;
using System.Linq;
// Get all images(.jpg) from folder
var ImageFiles = System.IO.Directory.EnumerateFiles(@"C:\project\test").Where(f => f.EndsWith(".jpg") || f.EndsWith(".jpeg"));
// Convert the images to a PDF and save it.
ImageToPdfConverter.ImageToPdf(ImageFiles).SaveAs(@"C:\project\testing.pdf");
//Also see PdfDocument.RasterizeToImageFiles() method to flatten a PDF to images or thumbnails
// PM> Install-Package IronPdf
using IronPdf;
using System.IO;
using System.Linq;
// Get all images(.jpg) from folder
var ImageFiles = System.IO.Directory.EnumerateFiles(@"C:\project\test").Where(f => f.EndsWith(".jpg") || f.EndsWith(".jpeg"));
// Convert the images to a PDF and save it.
ImageToPdfConverter.ImageToPdf(ImageFiles).SaveAs(@"C:\project\testing.pdf");
//Also see PdfDocument.RasterizeToImageFiles() method to flatten a PDF to images or thumbnails
' PM> Install-Package IronPdf
Imports IronPdf
Imports System.IO
Imports System.Linq
' Get all images(.jpg) from folder
Private ImageFiles = System.IO.Directory.EnumerateFiles("C:\project\test").Where(Function(f) f.EndsWith(".jpg") OrElse f.EndsWith(".jpeg"))
' Convert the images to a PDF and save it.
ImageToPdfConverter.ImageToPdf(ImageFiles).SaveAs("C:\project\testing.pdf")
'Also see PdfDocument.RasterizeToImageFiles() method to flatten a PDF to images or thumbnails
string pdfFile = @"c:\test.pdf";
MemoryStream docxStream = new MemoryStream();
SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
// Assume that we already have a PDF document as stream.
using (FileStream pdfStream = new FileStream(pdfFile, FileMode.Open, FileAccess.Read))
{
f.OpenPdf(pdfStream);
if (f.PageCount > 0)
{
int res = f.ToWord(docxStream);
// Save docxStream to a file for demonstration purposes.
if (res == 0)
{
string docxFile = Path.ChangeExtension(pdfFile, ".docx");
File.WriteAllBytes(docxFile, docxStream.ToArray());
System.Diagnostics.Process.Start(docxFile);
}
}
}
string pdfFile = @"c:\test.pdf";
MemoryStream docxStream = new MemoryStream();
SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
// Assume that we already have a PDF document as stream.
using (FileStream pdfStream = new FileStream(pdfFile, FileMode.Open, FileAccess.Read))
{
f.OpenPdf(pdfStream);
if (f.PageCount > 0)
{
int res = f.ToWord(docxStream);
// Save docxStream to a file for demonstration purposes.
if (res == 0)
{
string docxFile = Path.ChangeExtension(pdfFile, ".docx");
File.WriteAllBytes(docxFile, docxStream.ToArray());
System.Diagnostics.Process.Start(docxFile);
}
}
}
Dim pdfFile As String = "c:\test.pdf"
Dim docxStream As New MemoryStream()
Dim f As New SautinSoft.PdfFocus()
' Assume that we already have a PDF document as stream.
Using pdfStream As New FileStream(pdfFile, FileMode.Open, FileAccess.Read)
f.OpenPdf(pdfStream)
If f.PageCount > 0 Then
Dim res As Integer = f.ToWord(docxStream)
' Save docxStream to a file for demonstration purposes.
If res = 0 Then
Dim docxFile As String = Path.ChangeExtension(pdfFile, ".docx")
File.WriteAllBytes(docxFile, docxStream.ToArray())
System.Diagnostics.Process.Start(docxFile)
End If
End If
End Using
SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
f.OpenPdf(@"C:\Computer\testpdf");
if (f.PageCount > 0)
{
//Set image properties: Jpeg, 200 dpi
f.ImageOptions.ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg;
f.ImageOptions.Dpi = 200;
//Save all PDF pages as page1.jpg, page2.jpg ... pageN.jpg
f.ToImage(@"C:\Pictures\, "page");
}
SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
f.OpenPdf(@"C:\Computer\testpdf");
if (f.PageCount > 0)
{
//Set image properties: Jpeg, 200 dpi
f.ImageOptions.ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg;
f.ImageOptions.Dpi = 200;
//Save all PDF pages as page1.jpg, page2.jpg ... pageN.jpg
f.ToImage(@"C:\Pictures\, "page");
}
Dim f As New SautinSoft.PdfFocus()
f.OpenPdf("C:\Computer\testpdf")
If f.PageCount > 0 Then
'Set image properties: Jpeg, 200 dpi
f.ImageOptions.ImageFormat = System.Drawing.Imaging.ImageFormat.Jpeg
f.ImageOptions.Dpi = 200
'Save all PDF pages as page1.jpg, page2.jpg ... pageN.jpg
'INSTANT VB TODO TASK: The following line uses invalid syntax:
' f.ToImage("C:\Pictures\, "page"); }
SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
f.OpenPdf(@"c:\test.pdf");
if (f.PageCount > 0)
{
int result = f.ToHtml(@"c:\output.html");
//Open HTML document
if (result==0)
{
System.Diagnostics.Process.Start(@"c:\output.html");
}
}
SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
f.OpenPdf(@"c:\test.pdf");
if (f.PageCount > 0)
{
int result = f.ToHtml(@"c:\output.html");
//Open HTML document
if (result==0)
{
System.Diagnostics.Process.Start(@"c:\output.html");
}
}
Dim f As New SautinSoft.PdfFocus()
f.OpenPdf("c:\test.pdf")
If f.PageCount > 0 Then
Dim result As Integer = f.ToHtml("c:\output.html")
'Open HTML document
If result=0 Then
System.Diagnostics.Process.Start("c:\output.html")
End If
End If
The main disadvantage of the SautinSoft library is that it prints the trial notice "Created by an unlicensed version of PDF Focus .NET," and the random addition of the word "Trial." This is not the case with IronPDF.
The basic price of using IronPDF is almost half that of SautinSoft.
When we compare both libraries, we can clearly see that IronPDF is more reliable and cost-effective, almost half the price of SautinSoft, and provides better support and features.
In this article, we have compared IronPDF and SautinSoft PDF Focus .NET. We have found that IronPDF is used for the conversion of web forms, local HTML pages, and other web pages to PDF with .NET, while SautinSoft PDF Focus is used for the conversion of PDF to any format such as DOCX, images, HTML, etc. With trial work, we found that IronPDF provides unlimited trial features and adds no product labels to the output product.
In conclusion, we prefer IronPDF because of its better performance and the numerous features provided to developers who work with the Portable Document Format. They also provide good support and documentation to ensure optimal use of all the impressive features.
9 .NET API products for your office documents