IronPDF vs PDFShift: C# HTML to PDF API Comparison
IronPDF offers a reliable local C# library with perpetual licensing starting at $749, while PDFShift provides a cloud API with pay-per-conversion pricing. For startups processing over 500 PDFs monthly, IronPDF becomes more cost-effective, offering better data privacy and offline capability.
The Portable Document Format (PDF) is the standard for representing text, links, graphics, and more in a single document. Manipulating PDFs in C# requires specialized PDF libraries for .NET applications. This article compares two different APIs for PDF generation, examining their performance, features, and licensing. When building .NET applications, developers need PDF generation capabilities that handle complex HTML layouts, CSS styling, and JavaScript rendering.
The PDF APIs discussed are:
- IronPDF
- PDFShift
What is IronPDF?
IronPDF is a complete HTML-to-PDF conversion API designed for .NET and .NET Core development. The library converts HTML sites and provides extensive PDF manipulation functions. IronPDF enables developers to create, alter, and extract content from PDF documents in .NET environments. The library simplifies generating PDFs from HTML pages and supports CSHTML to PDF conversion for MVC applications and Razor Pages.
PDFs can be edited, stamped, and improve with headers and footers. The library simplify reading PDF text and extracting images. IronPDF uses a .NET Chromium engine for HTML-to-PDF rendering. This engine ensures pixel-perfect rendering and supports modern web technologies including JavaScript to PDF conversion. The Chrome rendering engine milestone marked a significant advancement in rendering accuracy and performance optimization.
What Features Does IronPDF Offer?
What PDF Conversion Options Are Available?
Create PDFs from HTML, HTML Strings, MVC views, Web Forms, and URLs. Also supports Markdown, XML, and RTF conversions. The conversion features include DOCX to PDF and image to PDF transformations. For web applications, IronPDF handles ASPX page conversion and supports headless CSHTML rendering.
How Does PDF Imaging Work?
Create images from PDFs and PDFs from images. Includes image extraction, multiple formats, and PDF printing. Supports SVG graphics and Azure Blob Storage images. The library handles multi-frame TIFF conversion and provides high-quality PDF to image conversion. For memory-efficient processing, use rasterization with MemoryStream.
What File I/O Features Are Included?
IronPDF provides 128-bit encryption, password protection, and digital signatures. Includes HSM signing and PDF/A compliance. The PDF/A milestone expanded support for archival formats, including PDF/A-3 and ZUGFeRD. Additional security features include sanitizing PDFs and managing revision history.
How Can I Edit PDFs?
IronPDF offers watermarks, page management, backgrounds, foregrounds, and complete PDF manipulation. Includes drawing, annotations, and form management. Advanced editing includes text replacement, redaction, and transforming PDF pages. The PDFium DOM milestone improve handling of complex PDF structures.
How Do I Extract Content from PDFs?
Extract embedded text directly from PDFs. For image-embedded text, use IronOCR. The PDF DOM Object provides programmatic PDF structure access. Advanced extraction includes reading PDF text and managing fonts. For text analysis, use OpenAI integration for intelligent document processing.
How Do Headers and Footers Work?
Headers and footers can be added during creation or to existing PDFs. Supports text and HTML headers with dynamic page numbers. Advanced options include adding headers on specific pages and managing page breaks. The rendering options provide fine control over layout and paper sizing.
What Platforms Are Compatible?
IronPDF supports C#-compatible operating systems and frameworks:
- Windows and Windows Server
- Linux distributions
- macOS Intel and Apple Silicon
- .NET Core 2.1+, .NET 6 & 5
- .NET Standard 2.0 Compliance
- Microsoft Azure and Azure Functions
- AWS and AWS Lambda
- Docker containers
- Android and Blazor
The compatibility milestone expanded platform support. For deployment guidance, see IronPDF and IIS and deployment troubleshooting.
What is PDFShift?
PDFShift is an HTML-to-PDF conversion API providing quick conversions through cloud services. The API offers parallel conversions, asynchronous queries, raw HTML support, and more. PDFShift supports Ruby, Python, JavaScript, Node, and PHP. For VB.NET or F# developers, IronPDF provides native support while PDFShift requires HTTP integration. For comparison with other cloud services, see Aspose vs IronPDF and Syncfusion vs IronPDF.
PDFShift enables custom headers/footers, CSS application, and file encryption. However, the service lacks advanced manipulation features like PDF compression, linearization, or PDF/UA compliance. For enterprise requirements, review security CVE disclosures and Kerberos authentication.
What Features Does PDFShift Offer?
How Do Parallel Conversions Work?
PDFShift supports parallel conversions for simultaneous document processing. For similar functionality, see IronPDF's async and multithreading guide. IronPDF provides parallel PDF generation examples and multi-threaded generation with performance benchmarks. The async examples demonstrate batch processing optimization.
What Header and Footer Options Are Available?
Create custom headers/footers with page numbers and CSS/JavaScript. IronPDF provides advanced options including repeated table headers and custom HTML headers. The classic text headers offer simple implementation while HTML headers enable complex layouts. For dynamic content, use JavaScript message listeners.
Can I Convert Raw HTML Without Making Pages Public?
PDFShift converts raw HTML without public pages. IronPDF offers similar capabilities with base URL configuration and DataURI embedding. The embed image base64 example shows self-contained HTML conversion. For secure conversions, use custom logging and HTTP request headers.
What is the PDF Quality Like?
PDFShift creates high-fidelity PDFs quickly. IronPDF's Chrome rendering engine produces pixel-perfect PDFs matching browser output. The pixel-perfect tutorial explains quality optimization. For specific requirements, configure viewport settings and rendering delays.
How Do Asynchronous Requests Work?
Real-time notifications for conversion completion with simple integration. IronPDF provides complete async support with batch processing examples. The async PDF generation example shows performance improvements. For large-scale processing, see memory management and performance assistance.
How Do I Create a New Project in Visual Studio?
Open Visual Studio and select File > New Project > Console Application. This example uses a console application. For setup instructions, see the installation overview and quickstart guide. Additional project templates include Blazor tutorials and MAUI PDF viewing. For troubleshooting setup issues, consult the quick troubleshooting guide.
Enter project name and path. Click create. Select the required .NET framework:

Visual Studio generates the application structure and opens program.cs for code entry:

How Do I Install the IronPDF Library?
Install IronPDF four ways:
- Visual Studio NuGet Package Manager
- Visual Studio Command-Line
- Direct Download from NuGet
- Direct Download from IronPDF
For alternative methods, see Windows Installer guide or advanced NuGet installation. Platform-specific guides include Linux setup, macOS installation, and Docker deployment. For size-constrained environments, use IronPDF Slim.
How Do I Use the Visual Studio NuGet Package Manager?
Visual Studio provides NuGet Package Manager for direct installation:

Search for "IronPDF" in the package manager:

Select IronPDF and install the package. For smaller deployments, consider IronPDF Slim. If encountering issues, see failed to deploy NuGet package and deployment exceptions.
How Do I Use the Visual Studio Command-Line?
Go to Tools > NuGet Package Manager > Package Manager Console:

Enter in the console:
Install-Package IronPdf
The package downloads and installs. For platform-specific installations, see Linux, macOS, or Docker deployment. For dependency errors, check Chrome dependencies and Pdfium dependencies.

Can I Download Directly from the NuGet Webpage?
Download the NuGet package directly:
- Navigate to NuGet IronPDF Page
- Select download package
- Double-click for automatic installation
- Reload solution
For package management, see IronPDF runtimes folder guide. If experiencing version conflicts, review assembly version mismatch and ClickOnce compatibility.
Can I Download Directly from the IronPDF Webpage?
Download from the IronPDF Download Page. After download:
- Right-click project in solution window
- Select references and browse to file
- Click OK
For licensing setup, see using license keys and applying licenses. Additional configuration options include setting license in Web.config and managing license extensions.
How Does PDFShift Work?
PDFShift operates remotely via API. Submit POST requests using C# RestClient with API key authentication. The server processes requests and returns PDFs through HTTP. For local processing, IronPDF's native engine provides better performance and security. Compare with native vs remote engine options. For API alternatives, review Apryse vs IronPDF and iText vs IronPDF.
How Do I Make PDFs from HTML?
Both tools provide HTML conversion with different approaches. IronPDF offers extensive options including HTML ZIP files and custom rendering. The creating PDFs tutorial covers complete generation methods. For advanced scenarios, explore JavaScript rendering and responsive CSS handling.
How Do I Create PDFs from URLs using IronPDF?
Creating PDFs from URLs requires three lines. This code example shows how IronPDF allows developers to implement URL-to-PDF conversion:
using IronPdf;
var Renderer = new IronPdf.ChromePdfRenderer();
// Configure render options for better results
Renderer.RenderingOptions.PaperSize = IronPdf.Rendering.PdfPaperSize.A4;
Renderer.RenderingOptions.MarginTop = 25;
Renderer.RenderingOptions.MarginBottom = 25;
// Create a PDF from a URL or local file path
using var pdf = Renderer.RenderUrlAsPdf("___PROTECTED_URL_68___");
// Export to a file or Stream
pdf.SaveAs("url.pdf");using IronPdf;
var Renderer = new IronPdf.ChromePdfRenderer();
// Configure render options for better results
Renderer.RenderingOptions.PaperSize = IronPdf.Rendering.PdfPaperSize.A4;
Renderer.RenderingOptions.MarginTop = 25;
Renderer.RenderingOptions.MarginBottom = 25;
// Create a PDF from a URL or local file path
using var pdf = Renderer.RenderUrlAsPdf("___PROTECTED_URL_68___");
// Export to a file or Stream
pdf.SaveAs("url.pdf");For authenticated pages, see TLS website logins. For JavaScript sites, use WaitFor delays and custom JavaScript. Advanced options include render delays and JavaScript to PDF conversion. For performance optimization, see initial render slow solutions.
Output:

How Do I Convert HTML to PDF using IronPDF?
Convert HTML to PDF easily:
using IronPdf;
var pdf = new ChromePdfRenderer();
// Add custom CSS for better formatting
pdf.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Print;
pdf.RenderingOptions.EnableJavaScript = true;
// Include web fonts and icons
pdf.RenderingOptions.WaitFor.FontsLoaded();
PdfDocument doc = pdf.RenderHtmlAsPdf("<h1>This is a heading</h1>");
doc.SaveAs("FirstPDFDocument.pdf");using IronPdf;
var pdf = new ChromePdfRenderer();
// Add custom CSS for better formatting
pdf.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Print;
pdf.RenderingOptions.EnableJavaScript = true;
// Include web fonts and icons
pdf.RenderingOptions.WaitFor.FontsLoaded();
PdfDocument doc = pdf.RenderHtmlAsPdf("<h1>This is a heading</h1>");
doc.SaveAs("FirstPDFDocument.pdf");For complex HTML, use base URLs for relative paths. Add web fonts and icons for typography. Additional formatting options include custom fonts and international languages. For troubleshooting fonts, see font management and font kerning issues.

How Do I Create PDFs from URLs using PDFShift?
Converting URLs with PDFShift requires POST requests:
using System;
using RestSharp;
using RestSharp.Authenticators;
using System.IO;
namespace PDFShiftExample
{
class Program
{
static void Main(string[] args)
{
var client = new RestClient("___PROTECTED_URL_69___");
client.Authenticator = new HttpBasicAuthenticator("api", "your_api_key");
var request = new RestRequest(Method.POST);
var json = new
{
source = "___PROTECTED_URL_70___",
// Additional options
landscape = false,
use_print = false
};
request.AddJsonBody(json);
var response = client.Execute(request);
if (!response.IsSuccessful)
{
// Handle the unsuccessful response
Console.WriteLine($"Error: {response.StatusCode} - {response.ErrorMessage}");
}
else
{
File.WriteAllBytes("result.pdf", response.RawBytes);
}
}
}
}using System;
using RestSharp;
using RestSharp.Authenticators;
using System.IO;
namespace PDFShiftExample
{
class Program
{
static void Main(string[] args)
{
var client = new RestClient("___PROTECTED_URL_69___");
client.Authenticator = new HttpBasicAuthenticator("api", "your_api_key");
var request = new RestRequest(Method.POST);
var json = new
{
source = "___PROTECTED_URL_70___",
// Additional options
landscape = false,
use_print = false
};
request.AddJsonBody(json);
var response = client.Execute(request);
if (!response.IsSuccessful)
{
// Handle the unsuccessful response
Console.WriteLine($"Error: {response.StatusCode} - {response.ErrorMessage}");
}
else
{
File.WriteAllBytes("result.pdf", response.RawBytes);
}
}
}
}How Do I Convert HTML to PDF using PDFShift?
PDFShift provides HTML-to-PDF conversion:
using System;
using System.IO;
using RestSharp;
using RestSharp.Authenticators;
namespace PDFShiftExample
{
class Program
{
static void Main(string[] args)
{
var client = new RestClient("___PROTECTED_URL_71___");
client.Authenticator = new HttpBasicAuthenticator("api", "your_api_key");
var request = new RestRequest(Method.POST);
string documentContent = File.ReadAllText("document.html");
var json = new
{
source = documentContent,
// Additional formatting options
margin = "20px",
format = "A4"
};
request.AddJsonBody(json);
var response = client.Execute(request);
if (!response.IsSuccessful)
{
// Handle the unsuccessful response
Console.WriteLine($"Error: {response.StatusCode}");
}
else
{
File.WriteAllBytes("result.pdf", response.RawBytes);
}
}
}
}using System;
using System.IO;
using RestSharp;
using RestSharp.Authenticators;
namespace PDFShiftExample
{
class Program
{
static void Main(string[] args)
{
var client = new RestClient("___PROTECTED_URL_71___");
client.Authenticator = new HttpBasicAuthenticator("api", "your_api_key");
var request = new RestRequest(Method.POST);
string documentContent = File.ReadAllText("document.html");
var json = new
{
source = documentContent,
// Additional formatting options
margin = "20px",
format = "A4"
};
request.AddJsonBody(json);
var response = client.Execute(request);
if (!response.IsSuccessful)
{
// Handle the unsuccessful response
Console.WriteLine($"Error: {response.StatusCode}");
}
else
{
File.WriteAllBytes("result.pdf", response.RawBytes);
}
}
}
}How Do I Add Custom Headers and Footers?
Headers and footers improve PDF documents by providing consistent information across pages. Both IronPDF and PDFShift support this functionality. For advanced scenarios, refer to adding headers to pages and page break control. The page numbers and page breaks example shows complete implementation. For layout control, explore custom margins and PDF page orientation.
How Do I Add Headers and Footers using IronPDF?
IronPDF offers two methods for implementing headers and footers:
TextHeaderFooter: This method uses text-based headers with dynamic data.
HtmlHeaderFooter: This approach allows HTML-rendered headers and footers using templates.
using IronPdf;
var Renderer = new IronPdf.ChromePdfRenderer();
// Configure text header with merge fields
Renderer.RenderingOptions.FirstPageNumber = 1; // use 2 if a cover page will be appended
Renderer.RenderingOptions.TextHeader.DrawDividerLine = true;
Renderer.RenderingOptions.TextHeader.CenterText = "{url}";
Renderer.RenderingOptions.TextHeader.Font = IronPdf.Font.FontTypes.Helvetica;
Renderer.RenderingOptions.TextHeader.FontSize = 12;
// Add HTML footer with page numbers
Renderer.RenderingOptions.HtmlFooter = new IronPdf.HtmlHeaderFooter()
{
HtmlFragment = "<div style='text-align:center'>Page {page} of {total-pages}</div>",
Height = 25,
DrawDividerLine = true
};
// Apply custom margins
Renderer.RenderingOptions.MarginTop = 40;
Renderer.RenderingOptions.MarginBottom = 40;
var pdf = Renderer.RenderHtmlAsPdf("<h1>Document with Headers</h1>");
pdf.SaveAs("headers-footers.pdf");using IronPdf;
var Renderer = new IronPdf.ChromePdfRenderer();
// Configure text header with merge fields
Renderer.RenderingOptions.FirstPageNumber = 1; // use 2 if a cover page will be appended
Renderer.RenderingOptions.TextHeader.DrawDividerLine = true;
Renderer.RenderingOptions.TextHeader.CenterText = "{url}";
Renderer.RenderingOptions.TextHeader.Font = IronPdf.Font.FontTypes.Helvetica;
Renderer.RenderingOptions.TextHeader.FontSize = 12;
// Add HTML footer with page numbers
Renderer.RenderingOptions.HtmlFooter = new IronPdf.HtmlHeaderFooter()
{
HtmlFragment = "<div style='text-align:center'>Page {page} of {total-pages}</div>",
Height = 25,
DrawDividerLine = true
};
// Apply custom margins
Renderer.RenderingOptions.MarginTop = 40;
Renderer.RenderingOptions.MarginBottom = 40;
var pdf = Renderer.RenderHtmlAsPdf("<h1>Document with Headers</h1>");
pdf.SaveAs("headers-footers.pdf");For complex layouts, consider using table of contents and bookmarks. The outlines and bookmarks example provides navigation structure. For precise positioning, use custom margins example and transform PDF pages.
How Do I Add Headers and Footers using PDFShift?
PDFShift allows customization of documents with headers and footers for identification or branding:
using System;
using RestSharp;
using RestSharp.Authenticators;
using System.IO;
namespace PDFShiftExample
{
class Program
{
static void Main(string[] args)
{
var client = new RestClient("___PROTECTED_URL_72___");
client.Authenticator = new HttpBasicAuthenticator("api", "your_api_key");
var request = new RestRequest(Method.POST);
var json = new
{
source = "___PROTECTED_URL_73___",
footer = new {
source = "<div style=\"font-size: 12px\">Page {{page}} of {{total}}</div>",
spacing = "50px"
},
header = new {
source = "<div>Company Name</div>",
spacing = "30px"
}
};
request.AddJsonBody(json);
var response = client.Execute(request);
if (!response.IsSuccessful)
{
// Handle the unsuccessful response
}
else
{
File.WriteAllBytes("result.pdf", response.RawBytes);
}
}
}
}using System;
using RestSharp;
using RestSharp.Authenticators;
using System.IO;
namespace PDFShiftExample
{
class Program
{
static void Main(string[] args)
{
var client = new RestClient("___PROTECTED_URL_72___");
client.Authenticator = new HttpBasicAuthenticator("api", "your_api_key");
var request = new RestRequest(Method.POST);
var json = new
{
source = "___PROTECTED_URL_73___",
footer = new {
source = "<div style=\"font-size: 12px\">Page {{page}} of {{total}}</div>",
spacing = "50px"
},
header = new {
source = "<div>Company Name</div>",
spacing = "30px"
}
};
request.AddJsonBody(json);
var response = client.Execute(request);
if (!response.IsSuccessful)
{
// Handle the unsuccessful response
}
else
{
File.WriteAllBytes("result.pdf", response.RawBytes);
}
}
}
}How Do I Add Watermarks to PDFs?
Watermarking PDFs adds branding and security to documents. Both IronPDF and PDFShift support watermarking. For additional options, see stamping text and images and stamping new content. The PDF watermarking example demonstrates advanced techniques. For batch processing, use efficient HTML stamping.
How Do I Add Watermarks using IronPDF?
IronPDF enables watermarking of PDFs using HTML. Watermarks can include opacity, rotation, and hyperlinks. For examples, see PDF watermarking examples. For multiple stamps, consider efficient HTML stamping. Additional options include backgrounds and foregrounds example and draw text and bitmap.
using IronPdf;
var Renderer = new IronPdf.ChromePdfRenderer();
using var Pdf = Renderer.RenderUrlAsPdf("___PROTECTED_URL_74___");
// Add text watermark with opacity and rotation
Pdf.WatermarkAllPages("<h2 style='color:red'>SAMPLE</h2>",
IronPdf.Editing.WaterMarkLocation.MiddleCenter,
50, // opacity
-45, // rotation
"___PROTECTED_URL_75___");
// Add image watermark
Pdf.ApplyWatermark("<img src='logo.png' style='width:200px'>",
30, // opacity
IronPdf.Editing.VerticalAlignment.Top,
IronPdf.Editing.HorizontalAlignment.Right);
Pdf.SaveAs(@"C:\Path\To\Watermarked.pdf");using IronPdf;
var Renderer = new IronPdf.ChromePdfRenderer();
using var Pdf = Renderer.RenderUrlAsPdf("___PROTECTED_URL_74___");
// Add text watermark with opacity and rotation
Pdf.WatermarkAllPages("<h2 style='color:red'>SAMPLE</h2>",
IronPdf.Editing.WaterMarkLocation.MiddleCenter,
50, // opacity
-45, // rotation
"___PROTECTED_URL_75___");
// Add image watermark
Pdf.ApplyWatermark("<img src='logo.png' style='width:200px'>",
30, // opacity
IronPdf.Editing.VerticalAlignment.Top,
IronPdf.Editing.HorizontalAlignment.Right);
Pdf.SaveAs(@"C:\Path\To\Watermarked.pdf");For advanced watermarking, combine with backgrounds and foregrounds or custom stamping. The attach cover page example shows document branding. For precise control, use rotating text and scale PDF objects.

How Do I Add Watermarks using PDFShift?
PDFShift allows for the addition of watermarks to documents for identification purposes:
using System;
using RestSharp;
using RestSharp.Authenticators;
using System.IO;
namespace PDFShiftExample
{
class Program
{
static void Main(string[] args)
{
var client = new RestClient("___PROTECTED_URL_76___");
client.Authenticator = new HttpBasicAuthenticator("api", "your_api_key");
var request = new RestRequest(Method.POST);
var json = new
{
source = "___PROTECTED_URL_77___",
watermark = new {
image = "___PROTECTED_URL_78___",
offset_x = 50,
offset_y = "100px",
rotate = 45,
opacity = 0.5
}
};
request.AddJsonBody(json);
var response = client.Execute(request);
if (!response.IsSuccessful)
{
// Handle the unsuccessful response
}
else
{
File.WriteAllBytes("result.pdf", response.RawBytes);
}
}
}
}using System;
using RestSharp;
using RestSharp.Authenticators;
using System.IO;
namespace PDFShiftExample
{
class Program
{
static void Main(string[] args)
{
var client = new RestClient("___PROTECTED_URL_76___");
client.Authenticator = new HttpBasicAuthenticator("api", "your_api_key");
var request = new RestRequest(Method.POST);
var json = new
{
source = "___PROTECTED_URL_77___",
watermark = new {
image = "___PROTECTED_URL_78___",
offset_x = 50,
offset_y = "100px",
rotate = 45,
opacity = 0.5
}
};
request.AddJsonBody(json);
var response = client.Execute(request);
if (!response.IsSuccessful)
{
// Handle the unsuccessful response
}
else
{
File.WriteAllBytes("result.pdf", response.RawBytes);
}
}
}
}How Well Do These Tools Support Bootstrap and Modern CSS?
Modern web development relies on CSS frameworks for responsive design, and PDF libraries must accurately convert these frameworks. See the Bootstrap & Flex CSS guide. For responsive design, check viewport and zoom settings and custom paper sizes. The custom PDF paper size example shows precise sizing. For layout control, explore fit to paper and zoom and responsive HTML to PDF.
Does IronPDF Support Bootstrap and Modern CSS Frameworks?
IronPDF's Chrome rendering engine provides extensive support for CSS frameworks:
- Bootstrap 5: Full flexbox and CSS Grid with responsive utilities
- Bootstrap 4: Complete card systems, navigation, form components
- Tailwind CSS: All utility classes and responsive modifiers
- Foundation: Complete grid and component systems
- Modern CSS3: Flexbox, Grid, custom properties, animations, transforms
Validation: The Bootstrap homepage and templates convert accurately. See the rendering options guide. IronPDF supports Angular to PDF and other frameworks. Additional framework support includes JavaScript charts and WebGL rendering. For optimization, use HTML rendering settings and pixel-perfect formatting.
Code Example: Contact Form with Bootstrap
using IronPdf;
var renderer = new ChromePdfRenderer();
// Configure for improve Bootstrap rendering
renderer.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Screen;
renderer.RenderingOptions.EnableJavaScript = true;
renderer.RenderingOptions.RenderDelay = 500; // Allow JS to execute
renderer.RenderingOptions.ViewPortWidth = 1200; // Desktop viewport
string bootstrapContact = @"
<!DOCTYPE html>
<html>
<head>
<link href='___PROTECTED_URL_79___ rel='stylesheet'>
<style>
@media print {
.no-print { display: none; }
}
</style>
</head>
<body>
<div class='container my-5'>
<div class='row justify-content-center'>
<div class='col-lg-8'>
<div class='card shadow'>
<div class='card-header bg-primary text-white'>
<h2 class='mb-0'>Contact Us</h2>
</div>
<div class='card-body'>
<form>
<div class='row g-3'>
<div class='col-md-6'>
<label class='form-label'>First Name</label>
<input type='text' class='form-control' placeholder='John'>
</div>
<div class='col-md-6'>
<label class='form-label'>Last Name</label>
<input type='text' class='form-control' placeholder='Doe'>
</div>
</div>
<div class='mt-3'>
<label class='form-label'>Email Address</label>
<div class='input-group'>
<span class='input-group-text'>@</span>
<input type='email' class='form-control' placeholder='john.doe@example.com'>
</div>
</div>
<div class='mt-3'>
<label class='form-label'>Subject</label>
<select class='form-select'>
<option>General Inquiry</option>
<option>Technical Support</option>
<option>Sales Question</option>
<option>Partnership Opportunity</option>
</select>
</div>
<div class='mt-3'>
<label class='form-label'>Message</label>
<textarea class='form-control' rows='5' placeholder='Your message here...'></textarea>
</div>
<div class='d-flex justify-content-between align-items-center mt-4'>
<div class='form-check'>
<input class='form-check-input' type='checkbox' id='newsletter'>
<label class='form-check-label' for='newsletter'>
Subscribe to newsletter
</label>
</div>
<button type='submit' class='btn btn-primary px-4'>Submit</button>
</div>
</form>
</div>
</div>
<div class='alert alert-info mt-4 d-flex align-items-center' role='alert'>
<svg class='bi flex-shrink-0 me-2' width='24' height='24'></svg>
<div>We typically respond within 24 hours during business days.</div>
</div>
</div>
</div>
</div>
</body>
</html>";
var pdf = renderer.RenderHtmlAsPdf(bootstrapContact);
pdf.SaveAs("contact-form.pdf");using IronPdf;
var renderer = new ChromePdfRenderer();
// Configure for improve Bootstrap rendering
renderer.RenderingOptions.CssMediaType = IronPdf.Rendering.PdfCssMediaType.Screen;
renderer.RenderingOptions.EnableJavaScript = true;
renderer.RenderingOptions.RenderDelay = 500; // Allow JS to execute
renderer.RenderingOptions.ViewPortWidth = 1200; // Desktop viewport
string bootstrapContact = @"
<!DOCTYPE html>
<html>
<head>
<link href='___PROTECTED_URL_79___ rel='stylesheet'>
<style>
@media print {
.no-print { display: none; }
}
</style>
</head>
<body>
<div class='container my-5'>
<div class='row justify-content-center'>
<div class='col-lg-8'>
<div class='card shadow'>
<div class='card-header bg-primary text-white'>
<h2 class='mb-0'>Contact Us</h2>
</div>
<div class='card-body'>
<form>
<div class='row g-3'>
<div class='col-md-6'>
<label class='form-label'>First Name</label>
<input type='text' class='form-control' placeholder='John'>
</div>
<div class='col-md-6'>
<label class='form-label'>Last Name</label>
<input type='text' class='form-control' placeholder='Doe'>
</div>
</div>
<div class='mt-3'>
<label class='form-label'>Email Address</label>
<div class='input-group'>
<span class='input-group-text'>@</span>
<input type='email' class='form-control' placeholder='john.doe@example.com'>
</div>
</div>
<div class='mt-3'>
<label class='form-label'>Subject</label>
<select class='form-select'>
<option>General Inquiry</option>
<option>Technical Support</option>
<option>Sales Question</option>
<option>Partnership Opportunity</option>
</select>
</div>
<div class='mt-3'>
<label class='form-label'>Message</label>
<textarea class='form-control' rows='5' placeholder='Your message here...'></textarea>
</div>
<div class='d-flex justify-content-between align-items-center mt-4'>
<div class='form-check'>
<input class='form-check-input' type='checkbox' id='newsletter'>
<label class='form-check-label' for='newsletter'>
Subscribe to newsletter
</label>
</div>
<button type='submit' class='btn btn-primary px-4'>Submit</button>
</div>
</form>
</div>
</div>
<div class='alert alert-info mt-4 d-flex align-items-center' role='alert'>
<svg class='bi flex-shrink-0 me-2' width='24' height='24'></svg>
<div>We typically respond within 24 hours during business days.</div>
</div>
</div>
</div>
</div>
</body>
</html>";
var pdf = renderer.RenderHtmlAsPdf(bootstrapContact);
pdf.SaveAs("contact-form.pdf");Output: A professional contact form with Bootstrap's form controls, grid layout, card styling, and input groups—all accurately rendered in PDF.
For more examples, see rendering charts and WebGL sites. The add barcodes in HTML example shows additional HTML elements. For performance optimization, use PDF assets and performance guide and package size management.
Does PDFShift Support Bootstrap and Modern CSS?
- Cloud API: All conversions via HTTP API calls to PDFShift servers
- Bootstrap Support: Generally handles Bootstrap 4/5 layouts well
- CSS3 Support: Good flexbox and modern CSS rendering
- Internet Required: Cannot generate PDFs offline
- Per-Document Pricing: Charges per conversion, not per-developer license
Key considerations for PDFShift:
- External Dependency: All PDF generation requires internet and external API availability
- Data Privacy: HTML content sent to third-party servers for processing
- Volume Costs: Per-document pricing can become expensive at scale
- Latency: Network round-trips add delay to each conversion
- No Offline Capability: Cannot work in air-gapped or offline environments
Development impact: While PDFShift handles Bootstrap well, the cloud architecture introduces operational trade-offs:
- Ongoing per-document costs vs IronPDF's one-time per-developer license
- External service dependency vs local on-premises processing
- Data handling considerations for sensitive content
- Internet connectivity requirement vs offline capability
Development impact: Cloud architecture introduces operational considerations:
- Ongoing per-document costs versus one-time licensing
- External dependency versus local processing control
- Data handling requirements for sensitive content
- Internet connectivity prerequisites
For high-volume applications or sensitive data, IronPDF's local processing offers better control and value. Consider parallel generation and multi-threading for performance. The multi-threaded example shows concurrent processing. For cloud alternatives, see Azure deployment and AWS Lambda integration.
See the Bootstrap & Flexbox CSS Guide and HTML rendering settings. For modern CSS support, review international languages and CMYK and metadata visibility.
What Are the Licensing Options?
IronPDF offers a free developer license. The light package begins at $799, with no hidden costs. The package includes SaaS and OEM redistribution. All licenses come with a 30-day money-back guarantee, one year of support and upgrades, and are valid for development, testing, staging, and production with a perpetual license. See IronPDF's Pricing and Licensing. For license management, see applying license keys and license key configuration. The license keys guide covers all configuration methods. For troubleshooting licensing, see unable to connect to licensing server and using declarations.

PDFShift offers five packages available monthly or yearly using credits:
- Free: 50 credits monthly
- Startup: 500 credits monthly ($9) or 6,000 yearly ($99)
- Boost: 2,500 credits monthly ($24) or 30,000 yearly ($240)
- Growth: 5,000 credits monthly ($39) or 60,000 yearly ($390)
- Business: 25,000 credits monthly ($99)
File size limits: 1MB (free), 5MB (paid packages).

Visit the PDFShift Pricing Page.
Which PDF API Should I Choose?
IronPDF is free for indie developers and provides extensive PDF modification and conversion features. IronPDF offers superior editing and formatting tools. The library converts HTML to vector PDFs for commercial printing with clear, high-quality output. See Iron Software Licensing Information. For additional capabilities, explore organizing PDFs, signing and securing PDFs, and PDF conversion options. The complete feature list covers all capabilities. For enterprise features, review digital signatures example and encryption and decryption.
PDFShift is a cloud-based HTML-to-PDF API with simple endpoints and support for multiple languages. PDFShift handles parallel conversions through server requests. However, the service lacks advanced features like PDF form creation, PDF merging, text replacement, or metadata editing. For form handling comparison, see form data example and fill and edit forms. For document organization, review merge PDFs example and split PDF pages.
IronPDF licenses are developer-based with a one-time purchase. PDFShift uses monthly or yearly credit-based licensing requiring ongoing subscriptions. IronPDF supports OEM and SaaS distribution; PDFShift does not. For license management, see IronPDF extensions and upgrade options. The changelog tracks all product updates. For support options, see engineering support request guide and best support practices.
Comparing both tools: IronPDF offers substantially more features. PDFShift provides limited PDF manipulation capabilities. IronPDF converts URLs to PDF in three lines while PDFShift requires additional code complexity. IronPDF integrates quickly and easily into .NET projects. PDFShift's cloud system depends on RestSharp and external APIs, adding integration complexity. For troubleshooting resources, see the quick troubleshooting guide and engineering support. Additional resources include Azure log files and AWS log files. For deployment guidance, review Azure deployment troubleshooting and debugging Azure Functions.
Iron Software offers five tools for the price of two. The Iron Suite includes:
- IronBarcode - Barcode generation and reading
- IronXL - Excel file manipulation without Office
- IronOCR - Advanced OCR for text extraction
- IronPDF - Complete PDF manipulation library
- IronWebScraper - Web scraping and data extraction
Visit the Iron Suite Page to explore IRONSUITE. For additional Iron Software products, explore IronSecureDoc Documentation for document security needs. The product demos showcase real-world applications. For competitive analysis, review QuestPDF vs IronPDF comparison. The milestones page highlights key achievements since 2015.
Frequently Asked Questions
How can I convert HTML to PDF in C#?
You can use IronPDF's RenderHtmlAsPdf method to convert HTML strings into PDFs. You can also convert HTML files into PDFs using RenderHtmlFileAsPdf.
What are the benefits of using IronPDF for PDF manipulation?
IronPDF offers a robust set of features for PDF manipulation, including PDF creation from various formats, image extraction, encryption, editing capabilities, and compatibility with multiple platforms such as Windows, Linux, and cloud services like Azure and AWS.
What are the key features of PDFShift?
PDFShift is a cloud-based API that supports swift HTML-to-PDF conversions with features like parallel conversions, custom headers, asynchronous requests, and compatibility with multiple programming languages.
How do IronPDF and PDFShift differ in terms of licensing?
IronPDF offers a developer-based licensing with a one-time purchase and a 30-day money-back guarantee. In contrast, PDFShift uses a credit-based licensing system with monthly and yearly plans.
Can IronPDF be used in cloud environments?
Yes, IronPDF supports cloud environments such as Microsoft Azure and AWS, making it versatile for different deployment scenarios.
How do you add headers and footers to a PDF using IronPDF?
IronPDF allows you to add headers and footers to PDFs using its built-in methods, which can be customized to include text, images, or page numbers.
What platforms does IronPDF support?
IronPDF supports almost all operating systems and frameworks compatible with C#, including Windows, Linux, .NET Core, and can also be used in cloud environments.
How can I install IronPDF in my Visual Studio project?
IronPDF can be installed using the Visual Studio NuGet Package Manager, the Visual Studio Command-Line, or by directly downloading from the NuGet or IronPDF webpages.
Is it possible to perform image extraction from PDFs using IronPDF?
Yes, IronPDF provides capabilities for extracting images from PDFs, allowing developers to manipulate and reuse images outside of the original document.








