
IronPDF vs Accusoft PDF Viewer: Which C# Library Is Best for HTML to PDF?
IronPDF and Accusoft PDF Viewer both convert HTML to PDF in .NET. IronPDF offers straightforward syntax, local processing without cloud dependencies, and unlimited conversions starting at $999. In contrast, Accusoft requires internet connectivity and charges per transaction.
Overview
What Is IronPDF and How Does It Work?
IronPDF is a C# HTML to PDF library that enables developers to create PDF files from sources like HTML string, WebPage, and URL. It also allows setting properties like Watermark, Bookmark, and Header and Footer. Additionally, developers can merge multiple PDF files into one or convert PDF pages to images, and vice versa using image to PDF conversion.
IronPDF is free for development and offers a 30-day deployment trial for live projects. It provides complete documentation, code examples, and API reference to help developers get started quickly.
Developers can download a file project from this link.
What Is Accusoft PrizmDoc Viewer and How Does It Work?
PrizmDoc Viewer is a REST API that works with PDF files and converts them into other formats remotely. PrizmDoc can convert over 100 different file formats to PDF and PDF to PNG, JPG, TIFF, and SVG. It also provides various electronic signature options for applications.
How Do IronPDF and PrizmDoc Viewer Compare?
| IronPDF | PrizmDoc Viewer |
|---|---|
| Work with PDF files programmatically. | Work with PDF files programmatically. |
| Supports .NET Core with Windows, Mac, or Linux. | Supports .NET Core using Windows, Mac, or Linux. |
| Works Locally | Sends Documents to a remote server. |
| Work with or without Asynchronous Programming. | Must use Asynchronous Programming with System.Threading.Tasks. |
| Works offline once installed. | Requires internet connection for PrizmDoc server requests. |
| Provides many predefined functions. | Provides some predefined functions. |
| Often requires minimal lines of code. | Often requires many lines of code. |
| Unlimited conversions per project in each license. | Limited transactions in cloud-hosted licenses. |
| Free for development without time limits. | Limited transactions with trial. |
Let's install both libraries and compare the code.
Step 1: Installation
How Do I Install IronPDF in My .NET Project?
There are two ways to install IronPDF in a project, with no difference between approaches. IronPDF supports various environments including Azure deployment, AWS Lambda, Docker containers, and Blazor applications.
What Are the Different Ways to Download IronPDF?
Download IronPDF.dll and add its reference to the project. Developers can also use the Windows Installer for system-wide installation. After this, the namespace IronPDF becomes accessible using:
using IronPdf;Imports IronPdfNow, developers can easily access the provided functions and classes of IronPDF, including the ChromePdfRenderer for rendering, PDF document manipulation, and security features.
How Do I Install IronPDF via NuGet Package Manager?
-
Package Manager Console:
If using the Package Manager Console, run the following command:
-
Manage Packages for Solution:
If using the NuGet Package Manager GUI, browse for IronPDF in the search bar and install it. For advanced installation options, including platform-specific packages for Linux, macOS, or Windows, consult the installation guide.
How Do I Install PrizmDoc Viewer from Accusoft?
PrizmDoc Viewer has two parts: the server-side component called PrizmDoc Server which behaves as a RESTful API, and the client project that sends requests to the API and receives responses. Unlike IronPDF which operates locally without external dependencies, PrizmDoc requires network connectivity for cloud-based operations.
How Can I Access the PrizmDoc Server?
PrizmDoc Server is a server-side application that receives basic information with documents as requests (input) and converts documents to PDF files, then sends the converted PDF files back as responses (output). It serves as the technical heart of the product - a document processing and conversion engine. Developers can use it via two different methods, both having the same programming structure and techniques:
- Self-Hosted:
This option requires arranging a server. Download PrizmDoc Server then install it. Read More about how to install PrizmDoc Server on Windows.
Note: Self-hosted PrizmDoc Server requires significant memory and processing resources - consult Accusoft's sizing guide for current requirements. In contrast, IronPDF's system requirements are much more modest.
- Cloud-Hosted:
This cloud-based service eliminates the need to arrange a server. To use this option, create an account and copy the API key from the API Key menu on the homepage.
First, let's examine the basic structure for working with PrizmDoc Viewer to convert documents into PDF files by directly interacting with Accusoft server using WebClient() in a C# Console Application.
Note: The following example demonstrates how PrizmDoc handles PDF files conceptually. It is lengthy, so feel free to skip this example and move on to the comparison directly.
How Does Accusoft's Working Structure Function?
This example converts myWebpage.html to sample.pdf. Unlike IronPDF's straightforward HTML to PDF conversion, PrizmDoc requires multiple API calls.
Note: The Newtonsoft.Json library must be installed and referenced in the project.
First, add the following libraries to the project:
using System;
using System.IO;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq; // Install Newtonsoft.Json via NuGet Package ManagerImports System
Imports System.IO
Imports System.Net
Imports System.Text
Imports System.Threading.Tasks
Imports Newtonsoft.Json.Linq ' Install Newtonsoft.Json via NuGet Package ManagerThen create a public variable Accusoft API Key and paste the API Key in it:
static string ApiKey = "Your-API-KEY";Private Shared ApiKey As String = "Your-API-KEY"There are 3 steps to deal with PDF files using PrizmDoc Viewer:
- Upload a file to the
PrizmDocserver. - Convert the uploaded file.
- Download converted file from
PrizmDocserver.
A separate function handles each step:
static void Main(string[] args)
{
//---Upload file to Server---
JObject uploadResults = UploadToServer("myWebpage.html").Result;
string fileID = (string)uploadResults.SelectToken("fileId");
string affinityToken = (string)uploadResults.SelectToken("affinityToken");
//---Convert the uploaded file to PDF---
JObject convertResults = Convert(affinityToken, fileID).Result;
string processId = (string)convertResults.SelectToken("processId");
affinityToken = (string)convertResults.SelectToken("affinityToken");
//---Check the status that conversion is completed---
JObject convertStatusResults = ConvertStatus(processId, affinityToken).Result;
string convertStatus = (string)convertStatusResults.SelectToken("state");
//---Continuously checking whether conversion completed---
while (!(convertStatus.Equals("complete")))
{
System.Threading.Thread.Sleep(30000);
convertStatusResults = ConvertStatus(processId, affinityToken).Result;
convertStatus = (string)convertStatusResults.SelectToken("state");
}
//---Download the converted file from server---
string newFileID = (string)convertStatusResults.SelectToken("output.results[0].fileId");
DownloadFromServer(affinityToken, newFileID, "sample.pdf").Wait();
Console.WriteLine("PDF file created successfully...!");
Console.ReadKey();
}Shared Sub Main(ByVal args() As String)
'---Upload file to Server---
Dim uploadResults As JObject = UploadToServer("myWebpage.html").Result
Dim fileID As String = CStr(uploadResults.SelectToken("fileId"))
Dim affinityToken As String = CStr(uploadResults.SelectToken("affinityToken"))
'---Convert the uploaded file to PDF---
Dim convertResults As JObject = Convert(affinityToken, fileID).Result
Dim processId As String = CStr(convertResults.SelectToken("processId"))
affinityToken = CStr(convertResults.SelectToken("affinityToken"))
'---Check the status that conversion is completed---
Dim convertStatusResults As JObject = ConvertStatus(processId, affinityToken).Result
Dim convertStatus As String = CStr(convertStatusResults.SelectToken("state"))
'---Continuously checking whether conversion completed---
Do While Not (convertStatus.Equals("complete"))
System.Threading.Thread.Sleep(30000)
convertStatusResults = ConvertStatus(processId, affinityToken).Result
convertStatus = CStr(convertStatusResults.SelectToken("state"))
Loop
'---Download the converted file from server---
Dim newFileID As String = CStr(convertStatusResults.SelectToken("output.results[0].fileId"))
DownloadFromServer(affinityToken, newFileID, "sample.pdf").Wait()
Console.WriteLine("PDF file created successfully...!")
Console.ReadKey()
End Sub1. Upload file to the Server:
public static async Task<JObject> UploadToServer(string fileToUpload)
{
FileInfo input = new FileInfo(fileToUpload);
if (input == null)
{
throw new ArgumentException("Missing parameter input", nameof(input));
}
var fileName = input.Name;
var endpoint = new Uri("https://api.accusoft.com/PCCIS/V1/WorkFile");
using (var client = new WebClient())
{
client.Headers.Add("acs-api-key", ApiKey);
client.Headers.Add("Content-Type", "application/octet-stream");
using (var reader = new BinaryReader(input.OpenRead()))
{
var data = reader.ReadBytes((int)reader.BaseStream.Length);
var results = await client.UploadDataTaskAsync(endpoint, "POST", data);
string getResult = Encoding.ASCII.GetString(results);
return JObject.Parse(getResult);
}
}
}
2. Convert the uploaded file to PDF:
public static async Task<JObject> Convert(string affinityToken, string fileID)
{
var endpoint = new Uri("https://api.accusoft.com/v2/contentConverters");
using (var client = new WebClient())
{
client.Headers.Add("Content-Type", "application/json");
client.Headers.Add("acs-api-key", ApiKey);
client.Headers.Add("Accusoft-Affinity-Token", affinityToken);
JObject myJson =
new JObject(
new JProperty("input",
new JObject(
new JProperty("sources",
new JArray(
new JObject(
new JProperty("fileId", fileID)
)
)
),
new JProperty("dest",
new JObject(
new JProperty("format", "pdf")
)
)
)
)
);
string results = await client.UploadStringTaskAsync(endpoint, "POST", myJson.ToString());
return JObject.Parse(results);
}
}
The following JSON is the resulting value of the myJson object:
{
"input": {
"sources":
[
{"fileId": "Auto Generated FileId Value"}
],
"dest": {
"format": "pdf"
}
}
}
Check the status whether the conversion is completed or not
public static async Task<JObject> ConvertStatus(string processId, string affinityToken)
{
string endpoint = "https://api.accusoft.com/v2/contentConverters/" + processId;
using (var client = new WebClient())
{
client.BaseAddress = endpoint;
client.Headers.Add("acs-api-key", ApiKey);
client.Headers.Add("Accusoft-Affinity-Token", affinityToken);
string results = await client.DownloadStringTaskAsync(endpoint);
return JObject.Parse(results);
}
}
3. Download the converted file from server
public static async Task DownloadFromServer(string affinityToken, string fileId, string outfile)
{
var endpoint = new Uri("https://api.accusoft.com/PCCIS/V1/WorkFile/" + fileId);
using (var client = new WebClient())
{
client.Headers.Add("acs-api-key", ApiKey);
client.Headers.Add("Accusoft-Affinity-Token", affinityToken);
FileInfo output = new FileInfo(outfile);
using (var writeStream = output.Create())
{
var results = await client.DownloadDataTaskAsync(endpoint);
await writeStream.WriteAsync(results, 0, results.Length);
}
}
}
The above example requires significant effort. To minimize the workload, Accusoft introduced a .NET library named Accusoft.PrizmDocServerSDK, a wrapper around the PrizmDoc Server REST API. Let's examine how to install and use this library in .NET projects.
How Do I Install Accusoft.PrizmDocServerSDK?
There are two ways to install the wrapper.
-
Package Manager Console:
If using the Package Manager Console, run the following command:
-
Manage Packages for Solution:
If using the NuGet Package Manager GUI, browse for
Accusoft.PrizmDocServerSDKin the search bar and install it.
Now, developers can easily access the Accusoft.PrizmDocServer namespace and use it:
using Accusoft.PrizmDocServer;Imports Accusoft.PrizmDocServerHow To Tutorials
How Do IronPDF and PrizmDoc Viewer Compare in Code Examples?
After reviewing the introduction and installation of both components, it's time to work with both. The following use cases demonstrate implementation using both components to help understand programming structures and determine which fits project requirements.
How Do I Convert HTML to PDF Using IronPDF vs PrizmDoc Viewer?
For this comparison, let's convert a web page named myWebPage.html to a PDF file and save it to the target location. IronPDF's Chrome rendering engine provides pixel-perfect conversion with full support for CSS, JavaScript, and web fonts.
How Does IronPDF Convert HTML to PDF?
using IronPdf;
static void Main(string[] args)
{
// Create rendering converter
var converter = new ChromePdfRenderer();
// Render HTML file to PDF
using var PDF = converter.RenderHTMLFileAsPdf("myWebPage.html");
// Save to target location
PDF.SaveAs("sample.pdf");
}Imports IronPdf
Shared Sub Main(ByVal args() As String)
' Create rendering converter
Dim converter = New ChromePdfRenderer()
' Render HTML file to PDF
Dim PDF = converter.RenderHTMLFileAsPdf("myWebPage.html")
' Save to target location
PDF.SaveAs("sample.pdf")
End SubThe above code creates a sample.pdf file and saves it to the bin>debug folder of the project. IronPDF also supports HTML strings, URLs, and even ZIP files containing HTML as input sources.
Developers can also specify any path like this: PDF.SaveAs("E:/sample.pdf"); or save to memory stream for cloud deployments.
Read More about working with IronPDF to deal with PDF files.
Now, let's perform the same task using PrizmDoc Viewer for comparison.
How Does PrizmDoc Viewer Convert HTML to PDF?
In the PrizmDoc Viewer installation section, obtaining the Accusoft API Key was discussed. Here's how to use it.
First, send a request to the PrizmDoc server and receive a response. This process takes time, requiring Asynchronous Programming. IronPDF also supports async methods for improved performance.
Note: Ensure the system is connected to the internet when creating PDF files using PrizmDoc Viewer's cloud services.
using Accusoft.PrizmDocServer;
using Accusoft.PrizmDocServer.Conversion;
static void Main(string[] args)
{
ChromePdfRenderer().GetAwaiter().GetResult();
}
private static async Task ChromePdfRenderer()
{
// Instantiate PrizmDocServerClient object
var prizmDocServer = new PrizmDocServerClient("https://api.accusoft.com", "Your-API-KEY");
// Specify HTML file and convert it to a PDF.
ConversionResult result = await prizmDocServer.ConvertToPdfAsync("myWebPage.html");
// Save PDF file to the target location
await result.RemoteWorkFile.SaveAsync("sample.pdf");
}
Read more about working with PrizmDoc Viewer.
Which Library Provides Simpler HTML to PDF Conversion?
These examples demonstrate that IronPDF offers a simpler approach to creating PDF files and requires less time. IronPDF also provides rendering options for fine-tuning output, including custom paper sizes, margins, and viewport settings.
How Do I Convert Images to PDF Using IronPDF vs PrizmDoc Viewer?
This comparison demonstrates how to create a PDF file from an Image located in the debug folder of the project. Developers begin with IronPDF.
How Does IronPDF Convert Images to PDF?
using IronPdf;
static void Main(string[] args)
{
// Specify the image to be converted
using var converted = ImageToPdfConverter.ImageToPdf("google.png");
// Save PDF file to the target location
converted.SaveAs("sample.pdf");
}Imports IronPdf
Shared Sub Main(ByVal args() As String)
' Specify the image to be converted
Dim converted = ImageToPdfConverter.ImageToPdf("google.png")
' Save PDF file to the target location
converted.SaveAs("sample.pdf")
End SubIronPDF also supports multi-frame TIFF conversion, embedding images from Azure Blob Storage, and Base64 image embedding.
Output:
This screenshot shows the newly created PDF file sample.pdf using the above code:
Creating a PDF file from an image using IronPDF is straightforward. Now, let's perform the same task using PrizmDoc Viewer and examine its generated PDF file.
How Does PrizmDoc Viewer Convert Images to PDF?
using Accusoft.PrizmDocServer;
using Accusoft.PrizmDocServer.Conversion;
static void Main(string[] args)
{
ImageToPDF().GetAwaiter().GetResult();
}
private static async Task ImageToPDF()
{
// Instantiate PrizmDocServerClient object
var prizmDocServer = new PrizmDocServerClient("https://api.accusoft.com", "Your-API-KEY");
// Specify the image to be converted
ConversionResult results = await prizmDocServer.ConvertToPdfAsync("google.png");
// Save PDF file to the target location
await results.RemoteWorkFile.SaveAsync("sample.pdf");
}
Output: This screenshot shows the newly created PDF file sample.pdf from the above code:
Which Library Requires Less Code for Image to PDF Conversion?
IronPDF requires only two lines of code. In contrast, using PrizmDoc server involves more lines of code with asynchronous programming. The output from IronPDF also automatically provides a usable full-page document. IronPDF offers additional options for image positioning and multiple image conversions.
How Do I Merge Multiple PDF Files Using IronPDF vs PrizmDoc Viewer?
For this comparison, assume three PDF files exist named A.pdf, B.pdf, and C.pdf. The task is to merge them into one PDF file. Both components can perform this task. First, the example shows how to perform this using IronPDF.
How Does IronPDF Merge PDF Files?
using IronPdf;
using System.Collections.Generic;
static void Main(string[] args)
{
// Create rendering converter
var Renderer = new IronPdf.ChromePdfRenderer();
// Create a list of pdf files
var PDFs = new List<PdfDocument>();
PDFs.Add(PdfDocument.FromFile("A.pdf"));
PDFs.Add(PdfDocument.FromFile("B.pdf"));
PDFs.Add(PdfDocument.FromFile("C.pdf"));
// Merge the list of pdf file
using PdfDocument PDF = PdfDocument.Merge(PDFs);
// Save merged file to the target location
PDF.SaveAs("sample.pdf");
foreach(var pdf in PDFs)
{
pdf.Dispose();
}
}Imports IronPdf
Imports System.Collections.Generic
Shared Sub Main(ByVal args() As String)
' Create rendering converter
Dim Renderer = New IronPdf.ChromePdfRenderer()
' Create a list of pdf files
Dim PDFs = New List(Of PdfDocument)()
PDFs.Add(PdfDocument.FromFile("A.pdf"))
PDFs.Add(PdfDocument.FromFile("B.pdf"))
PDFs.Add(PdfDocument.FromFile("C.pdf"))
' Merge the list of pdf file
Using PDF As PdfDocument = PdfDocument.Merge(PDFs)
' Save merged file to the target location
PDF.SaveAs("sample.pdf")
'INSTANT VB NOTE: The variable pdf was renamed since Visual Basic will not allow local variables with the same name as parameters or other local variables:
For Each .pdf_Conflict In PDFs
.pdf_Conflict.Dispose()
Next pdf_Conflict
End Using
End SubThe above code creates a sample.pdf file, which combines A.pdf, B.pdf, and C.pdf. IronPDF also supports adding and copying pages between PDFs and splitting PDFs.
Now, let's perform the same task using PrizmDoc Viewer.
How Does PrizmDoc Viewer Merge PDF Files?
using System.Threading.Tasks;
using Accusoft.PrizmDocServer;
using Accusoft.PrizmDocServer.Conversion;
static void Main(string[] args)
{
PdfMerge().GetAwaiter().GetResult();
}
private static async Task PdfMerge()
{
// Instantiate PrizmDocServerClient object
var prizmDocServer = new PrizmDocServerClient("https://api.accusoft.com", "Your-API-KEY");
// Pass the list of pdf files to PrizmDoc Server
ConversionResult result = await prizmDocServer.CombineToPdfAsync(
new []
{
new ConversionSourceDocument("A.pdf"),
new ConversionSourceDocument("B.pdf"),
new ConversionSourceDocument("C.pdf"),
});
// Save merged file to the target location
await result.RemoteWorkFile.SaveAsync("sample.pdf");
}
The above code also creates a sample.pdf file, which combines the A.pdf, B.pdf, and C.pdf files.
How Do I Add Headers and Footers to PDFs Using IronPDF vs PrizmDoc Viewer?
For this comparison, assume a simple WebPage named myWebPage.html exists with the following HTML and CSS:
<html>
<head>
<style>
li {
font-size: x-large;
color: rgba(156, 89, 13, 0.897);
list-style: square;
}
</style>
</head>
<body>
<h1 style="text-align: center;">Hello World..!</h1>
<h1>Main Menu</h1>
<ul>
<li>SubMenu 1</li>
<li>SubMenu 2</li>
<li>SubMenu 3</li>
<li>SubMenu 4</li>
<li>SubMenu 5</li>
</ul>
</body>
</html>
The goal is to convert this WebPage to a PDF file with the following Header and Footer properties:
Page Titleon the left side of the HeaderDateTimeon the right side of the HeaderPage Number of Total Pageson the right side of the Footer
First, let's examine how IronPDF handles Headers and Footers.
How Does IronPDF Handle PDF Headers and Footers?
To handle Headers and Footers of PDF files, IronPDF provides a property on the ChromePdfRenderer class named RenderingOptions which can be used as follows:
-
For Header:
ChromePdfRenderer_Obj.RenderingOptions.TextHeader = new TextHeaderFooter();C# -
For Footer:
ChromePdfRenderer_Obj.RenderingOptions.TextFooter = new TextHeaderFooter();C#
The following properties can be set when initializing TextHeaderFooter():
CenterTextto print text in the center of the Header or FooterLeftTextto print text on the left side of the Header or FooterRightTextto print text on the right side of the Header or FooterDrawDividerLinedraws a line separating page content from Header or FooterFontFamilyto specify the font family of Header or FooterFontSizeto specify the font size of the Header or Footer- Spacing adjusts the space between page content and Header or Footer
The following predefined attributes help set Header or Footer content. They are written in curly brackets { }:
{page}prints the current page number in the Header or Footer{total-pages}prints the total number of pages in the Header or Footer{url}prints the URL of the rendered page{date}prints the current date in the Header or Footer{time}prints the current time in the Header or Footer{html-title}prints the title of the rendered web page in the Header or Footer{pdf-title}prints the document title in the Header or Footer
Read More in detail on working with Headers and Footers using IronPDF. IronPDF also supports HTML headers and footers for more complex designs.
The example shows the following example to implement the use case and demonstrate how to use the above properties:
using IronPdf;
static void Main(string[] args)
{
// Create rendering converter
var converter = new ChromePdfRenderer();
// Setting Header properties
converter.RenderingOptions.TextHeader = new TextHeaderFooter()
{
DrawDividerLine = true,
LeftText = "Page Title",
RightText = "{date} {time}",
FontSize = 13
};
// Setting footer properties
converter.RenderingOptions.TextFooter = new TextHeaderFooter()
{
RightText = "Page {page} of {total-pages}",
FontSize = 12
};
// Specify the file to be converted
using var PDF = converter.RenderHTMLFileAsPdf("myWebPage.html");
// Save to target location
PDF.SaveAs("sample.pdf");
}Imports IronPdf
Shared Sub Main(ByVal args() As String)
' Create rendering converter
Dim converter = New ChromePdfRenderer()
' Setting Header properties
converter.RenderingOptions.TextHeader = New TextHeaderFooter() With {
.DrawDividerLine = True,
.LeftText = "Page Title",
.RightText = "{date} {time}",
.FontSize = 13
}
' Setting footer properties
converter.RenderingOptions.TextFooter = New TextHeaderFooter() With {
.RightText = "Page {page} of {total-pages}",
.FontSize = 12
}
' Specify the file to be converted
Dim PDF = converter.RenderHTMLFileAsPdf("myWebPage.html")
' Save to target location
PDF.SaveAs("sample.pdf")
End SubOutput: The screenshot of the newly created PDF file sample.pdf by the above code:
Working with Headers and Footers using IronPDF involves intuitive language while creating PDF files. Now, the example shows how PrizmDoc Viewer handles Headers and Footers.
How Does PrizmDoc Viewer Handle PDF Headers and Footers?
PrizmDoc Viewer provides the HeaderFooterOptions class to deal with Headers and Footers, with the following properties:
- Lines specifies the line(s) for Header and Footer, where each line has the following properties:
- Left prints text on the left side of the Header or Footer line
- Center prints text in the center of the Header or Footer line
- Right prints text on the right side of the Header or Footer line
FontFamilyto specify the font family of the Header or Footer textFontSizeto specify the font size of the Header or Footer text- Color to specify the color of the Header or Footer text
Read More about setting Headers and Footers of PDF pages using PrizmDoc server.
The example shows how to implement the use case using the above properties:
using System.Threading.Tasks;
using System.Collections.Generic;
using Accusoft.PrizmDocServer;
using Accusoft.PrizmDocServer.Conversion;
static void Main(string[] args)
{
SetHeaderFooter().GetAwaiter().GetResult();
}
private static async Task SetHeaderFooter()
{
// Instantiate PrizmDocServerClient object with Header and footer properties
var prizmDocServer = new PrizmDocServerClient("https://api.accusoft.com", "Your-API-KEY");
ConversionResult result = await prizmDocServer.ConvertToPdfAsync(
"myWebPage.html",
header: new HeaderFooterOptions
{
Lines = new List<HeaderFooterLine>
{
new HeaderFooterLine { Left = "Page Title", Right = DateTime.Now.ToString() }
},
},
footer: new HeaderFooterOptions
{
Lines = new List<HeaderFooterLine>
{
new HeaderFooterLine { Right = "Page {{pageNumber}} of {{pageCount}}" },
},
});
// Save to the target location
await result.RemoteWorkFile.SaveAsync("sample.pdf");
}
Output:
The screenshot of the newly created PDF file by the above code:
Which Library Offers More Flexibility for Headers and Footers?
IronPDF provides more functions to set Header and Footer properties with a simple programming structure compared to PrizmDoc Viewer. The PDF file generated by IronPDF is also more readable and attractive than the PrizmDoc Viewer generated file. IronPDF also supports page numbers and page breaks for improved document control.
How Do I Convert PDF Pages to Images Using IronPDF vs PrizmDoc Viewer?
For this comparison, let's assume you have a simple PDF file named Sample_PDF.pdf with two pages.
The task is to create an image of each page. First, the example will see how to perform this using IronPDF.
How Does IronPDF Convert PDF Pages to Images?
using IronPdf;
static void Main(string[] args)
{
// Specify file to be converted
var pdf = PdfDocument.FromFile("Sample_PDF.pdf");
// Save images to the target location
pdf.RasterizeToImageFiles("image_*.png");
}Imports IronPdf
Shared Sub Main(ByVal args() As String)
' Specify file to be converted
Dim pdf = PdfDocument.FromFile("Sample_PDF.pdf")
' Save images to the target location
pdf.RasterizeToImageFiles("image_*.png")
End SubIronPDF also supports saving images to memory stream and different image formats including JPEG, TIFF, and more.
Output:
The above code creates the following two .png images:
Creating images of PDF pages using IronPDF is straightforward. Now, let's perform the same task using PrizmDoc Viewer.
How Does PrizmDoc Viewer Convert PDF Pages to Images?
using System.Linq;
using System.Collections.Generic;
using System.Threading.Tasks;
using Accusoft.PrizmDocServer;
using Accusoft.PrizmDocServer.Conversion;
static void Main(string[] args)
{
PdfToImage().GetAwaiter().GetResult();
}
private static async Task PdfToImage()
{
// Instantiate PrizmDocServerClient object
var prizmDocServer = new PrizmDocServerClient("https://api.accusoft.com", "Your-API-KEY");
// Convert PDF file to images
IEnumerable<ConversionResult> results = await prizmDocServer.ConvertAsync("Sample_PDF.pdf", DestinationFileFormat.Png);
// Save each image.
for (int i = 0; i < results.Count(); i++)
{
await results.ElementAt(i).RemoteWorkFile.SaveAsync($"page-{i + 1}.png");
}
}
Output:
The above code also creates the following two .png images:
Which Library Makes PDF to Image Conversion Easier?
Compared with PrizmDoc Viewer, IronPDF allows developers to easily create images of each page with minimal lines of code, even without iterating through pages.
Can I Use Bootstrap 5 Data Tables with IronPDF?
IronPDF's Chrome V8 rendering engine provides excellent support for Bootstrap 5 data tables, enabling developers to generate professional PDF reports with complex tabular layouts. This example demonstrates gradient headers, status badges, pagination controls, and summary metrics - features that highlight IronPDF's advantage over traditional PDF viewers like PrizmDoc. IronPDF fully supports modern CSS features including flexbox layouts, gradients, and responsive design.
using IronPdf;
var renderer = new ChromePdfRenderer();
string dataTableReport = @"
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<link href='https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css' rel='stylesheet'>
<style>
.table-header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 30px;
border-radius: 10px 10px 0 0;
}
.table-container {
background: white;
border-radius: 0 0 10px 10px;
box-shadow: 0 10px 30px rgba(0,0,0,0.1);
overflow: hidden;
}
.table th {
background: #f8f9fa;
font-weight: 600;
text-transform: uppercase;
font-size: 0.85rem;
letter-spacing: 0.5px;
}
.status-badge {
padding: 0.35em 0.65em;
border-radius: 0.25rem;
font-weight: 600;
font-size: 0.75rem;
}
.trend-positive { color: #198754; font-weight: 700; }
.trend-negative { color: #dc3545; font-weight: 700; }
@media print {
.table-container { page-break-inside: avoid; }
}
</style>
</head>
<body class='bg-light'>
<div class='container py-5'>
<div class='table-container'>
<div class='table-header'>
<div class='row align-items-center'>
<div class='col-md-8'>
<h2 class='mb-2'>Sales Performance Report</h2>
<p class='mb-0 opacity-75'>Q4 2024 Regional Analysis</p>
</div>
<div class='col-md-4 text-end'>
<div class='btn-group btn-group-sm'>
<button class='btn btn-light'>Export</button>
<button class='btn btn-light'>Filter</button>
<button class='btn btn-light'>Sort</button>
</div>
</div>
</div>
</div>
<div class='p-4'>
<div class='row mb-3'>
<div class='col-md-4'>
<input type='text' class='form-control form-control-sm' placeholder='Search regions...'>
</div>
<div class='col-md-8 text-end'>
<span class='text-muted small'>Showing 1-10 of 48 results</span>
</div>
</div>
<div class='table-responsive'>
<table class='table table-hover align-middle'>
<thead>
<tr>
<th>Region</th>
<th>Revenue</th>
<th>Units Sold</th>
<th>Growth</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<strong>North America</strong><br>
<small class='text-muted'>USA, Canada, Mexico</small>
</td>
<td>$4,280,000</td>
<td>12,450</td>
<td><span class='trend-positive'>↑ 18.5%</span></td>
<td><span class='status-badge bg-success text-white'>Exceeding</span></td>
<td><button class='btn btn-sm btn-outline-primary'>Details</button></td>
</tr>
<tr>
<td>
<strong>Europe</strong><br>
<small class='text-muted'>EU, UK, Switzerland</small>
</td>
<td>$3,650,000</td>
<td>10,890</td>
<td><span class='trend-positive'>↑ 12.3%</span></td>
<td><span class='status-badge bg-success text-white'>On Track</span></td>
<td><button class='btn btn-sm btn-outline-primary'>Details</button></td>
</tr>
<tr>
<td>
<strong>Asia Pacific</strong><br>
<small class='text-muted'>Japan, Australia, Singapore</small>
</td>
<td>$2,940,000</td>
<td>8,320</td>
<td><span class='trend-positive'>↑ 24.7%</span></td>
<td><span class='status-badge bg-primary text-white'>Growing</span></td>
<td><button class='btn btn-sm btn-outline-primary'>Details</button></td>
</tr>
<tr>
<td>
<strong>Latin America</strong><br>
<small class='text-muted'>Brazil, Argentina, Chile</small>
</td>
<td>$1,580,000</td>
<td>4,670</td>
<td><span class='trend-positive'>↑ 8.9%</span></td>
<td><span class='status-badge bg-info text-white'>Stable</span></td>
<td><button class='btn btn-sm btn-outline-primary'>Details</button></td>
</tr>
<tr>
<td>
<strong>Middle East</strong><br>
<small class='text-muted'>UAE, Saudi Arabia, Israel</small>
</td>
<td>$980,000</td>
<td>2,890</td>
<td><span class='trend-negative'>↓ 3.2%</span></td>
<td><span class='status-badge bg-warning text-dark'>Review</span></td>
<td><button class='btn btn-sm btn-outline-primary'>Details</button></td>
</tr>
</tbody>
<tfoot class='table-light'>
<tr>
<td><strong>Total</strong></td>
<td><strong>$13,430,000</strong></td>
<td><strong>39,220</strong></td>
<td><strong class='trend-positive'>↑ 14.8%</strong></td>
<td colspan='2'></td>
</tr>
</tfoot>
</table>
</div>
<div class='d-flex justify-content-between align-items-center mt-4'>
<div>
<select class='form-select form-select-sm' style='width: auto; display: inline-block;'>
<option>10 per page</option>
<option>25 per page</option>
<option>50 per page</option>
</select>
</div>
<nav>
<ul class='pagination pagination-sm mb-0'>
<li class='page-item disabled'><a class='page-link' href='#'>Previous</a></li>
<li class='page-item active'><a class='page-link' href='#'>1</a></li>
<li class='page-item'><a class='page-link' href='#'>2</a></li>
<li class='page-item'><a class='page-link' href='#'>3</a></li>
<li class='page-item'><a class='page-link' href='#'>Next</a></li>
</ul>
</nav>
</div>
</div>
</div>
<div class='row g-3 mt-4'>
<div class='col-md-3'>
<div class='card text-center'>
<div class='card-body'>
<h3 class='text-primary mb-1'>$13.4M</h3>
<small class='text-muted'>Total Revenue</small>
</div>
</div>
</div>
<div class='col-md-3'>
<div class='card text-center'>
<div class='card-body'>
<h3 class='text-success mb-1'>39,220</h3>
<small class='text-muted'>Units Sold</small>
</div>
</div>
</div>
<div class='col-md-3'>
<div class='card text-center'>
<div class='card-body'>
<h3 class='text-info mb-1'>14.8%</h3>
<small class='text-muted'>Growth Rate</small>
</div>
</div>
</div>
<div class='col-md-3'>
<div class='card text-center'>
<div class='card-body'>
<h3 class='text-warning mb-1'>5</h3>
<small class='text-muted'>Active Regions</small>
</div>
</div>
</div>
</div>
</div>
</body>
</html>";
var pdf = renderer.RenderHtmlAsPdf(dataTableReport);
pdf.SaveAs("data-table-report.pdf");
This code generates a sophisticated data table report with gradient headers, responsive tables, status badges, and summary metrics. IronPDF's Chrome rendering engine preserves all Bootstrap styling including table hover effects, badge colors, and pagination controls - capabilities that go beyond traditional PDF viewers. The engine also supports JavaScript rendering for dynamic content, custom fonts, and UTF-8 international characters.
Key Advantages vs PrizmDoc Viewer:
- Direct HTML table rendering without conversion
- Full Bootstrap component support
- Gradient backgrounds and modern CSS
- Responsive table layouts with proper pagination
- Support for complex JavaScript charts
- Print media CSS handling
For more details on Bootstrap PDF generation, see the complete rendering documentation. Developers can also explore Angular to PDF conversion and other JavaScript framework support.## How Do License Costs Compare Between IronPDF and PrizmDoc Viewer?
After reviewing the technical structure and available functions of both components, the following outlines the license pricing. This is crucial as developers aim to meet requirements within budget constraints.
What Are IronPDF's License Options?
IronPDF licenses start at $999 for a single developer. IronPDF provides flexible licensing options including development licenses, deployment licenses, and extension options for ongoing support and updates.
For developers at companies or agencies serving multiple clients, IronPDF offers tiered licensing that can be adjusted based on team size and project count. IronPDF offers license upgrade paths as needs evolve.
All IronPDF license packages include 1 year of support and updates. Read More about available license packages, tiers, and pricing. Developers can also apply license keys in various ways including Web.config and environment variables.
What Are PrizmDoc Viewer's License Options?
What Is the Cost of Self-Hosted PrizmDoc?
Self-hosted PrizmDoc Server is available under an annual license. Contact Accusoft for current pricing and available packages for PrizmDoc Viewer.
How Much Does Cloud-Based PrizmDoc Cost?
This license covers the cloud-based services of PrizmDoc Viewer, scaled based on the number of transactions.
Terminologies:
Transaction refers to sending a request to the PrizmDoc Viewer server and receiving the output (resulting document).
Prepaid Buckets means paying once and receiving transactions that do not expire.
Cloud pricing is usage-based and scales with transaction volume. Contact Accusoft for current cloud pricing tiers and rates.
Tutorial Quick Access
Get the C# IronPDF Quickstart Handbook
A free PDF resource guide that simplifies developing PDFs for .NET, with walkthroughs of common functions and examples for manipulating, editing, generating, and saving PDFs in C# and VB.NET for projects.
Download the GuideExplore the IronPDF API Reference
Explore the API Reference for IronPDF C# Library, including details of all of IronPDF's features, classes, method fields, namespaces, and enums.
View the API ReferencePrizmDoc Viewer is a registered trademark of its respective owner. This site is not affiliated with, endorsed by, or sponsored by Accusoft's PrizmDoc Viewer. 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.
Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.
Related Articles











