HTML to PDF · .NET Library & REST API 22M+ NuGet downloads · since 2014

HTML to PDF.
Any stack. Any scale.

SelectPdf is a battle-tested HTML to PDF toolkit shipping in two shapes: a .NET Library you embed — a perpetual HTML to PDF converter for .NET Framework, .NET Core and .NET 5–10 (free trial, plus a Community Edition) — and an HTML to PDF API you call from any language. Pick the one that matches your runtime — your invoices look the same either way.

01 / EMBED

.NET Library

The PDF library for .NET. Runs in-process, no per-page fees.

  • Pure C# — .NET Framework 2.0+/4.0+, .NET Core, .NET 5–10, ASP.NET & ASP.NET MVC
  • HTML→PDF, PDF→Text, merge, split, sign
  • Royalty-free runtime, perpetual license
$ dotnet add package Select.HtmlToPdf
02 / CALL

Online API

One endpoint. Any language. Free trial, no credit card.

  • REST · cURL, JS, Python, PHP, Go, Ruby
  • Headless Chromium under the hood
  • Free trial, no credit card · plans $19–$449/mo
$ curl https://selectpdf.com/api2/convert/
§Quickstart

HTML to PDF in three lines. One PDF.

Same engine. Same output. Same options. The .NET Library and the Online API are bit-for-bit equivalent — pick whichever matches your runtime.

Invoice.cs
using SelectPdf;

var converter = new HtmlToPdf();
converter.Options.PdfPageSize = PdfPageSize.A4;
converter.Options.MarginLeft = 20;

PdfDocument doc = converter.ConvertUrl(
    "https://yourapp.com/invoice/4821"
);

doc.Save("invoice-4821.pdf");
doc.Close();
convert.sh
curl -X POST https://selectpdf.com/api2/convert/ \
  -d "key=$SELECTPDF_KEY" \
  -d "url=https://yourapp.com/invoice/4821" \
  -d "page_size=A4" \
  --output invoice-4821.pdf
convert.js
const selectpdf = require("selectpdf");

const client = new selectpdf.HtmlToPdfClient(
  process.env.SELECTPDF_KEY
);
client.setPageSize("A4");

client.convertUrlToFile(
  "https://yourapp.com/invoice/4821",
  "invoice-4821.pdf",
  function (err, fileName) {
    if (err) return console.error(err);
    console.log("Saved", fileName);
  }
);
convert.py
import selectpdf

client = selectpdf.HtmlToPdfClient("YOUR_API_KEY")
client.setPageSize(selectpdf.PageSize.A4)

client.convertUrlToFile(
    "https://yourapp.com/invoice/4821",
    "invoice-4821.pdf",
)

print("Pages:", client.getNumberOfPages())
convert.php
<?php
require("SelectPdf.Api.php");

$client = new SelectPdf\Api\HtmlToPdfClient("YOUR_API_KEY");
$client->setPageSize(SelectPdf\Api\PageSize::A4);

$client->convertUrlToFile(
    "https://yourapp.com/invoice/4821",
    "invoice-4821.pdf"
);
convert.rb
require "selectpdf"

client = SelectPdf::HtmlToPdfClient.new("YOUR_API_KEY")
client.page_size = SelectPdf::PageSize::A4

client.convert_url_to_file(
  "https://yourapp.com/invoice/4821",
  "invoice-4821.pdf"
)
LIVE DEMO · NO KEY REQUIRED

Free HTML to PDF converter demo.
Paste a URL, watch it convert.

Real conversion through our watermarked demo — no signup, no key. We render the page, return a real PDF, and tell you exactly how long it took.

Web page options
Widthpx
Heightpx
Min loadsec
Max loadsec
Page margins
Toppt
Rightpt
Bottompt
Leftpt
Demo limits: rendered with Chromium, output capped at 5 pages, watermarked, load time clamped. The result panel shows what was clamped — remove every limit with a free API key.
· ms · p · WATERMARKED DEMO Download →

What people ship
with HTML to PDF.

A short list of the things developers reach for SelectPdf to build. Same engine handles all of them — pick the runtime, write the template, ship.

01

Invoicing

Generate every invoice your billing system emits — from a templated HTML page to a PDF attached to the customer's receipt.

Used by → Stripe, QuickBooks, custom ERPs
02

Reports

Convert dashboards, charts and tables into archive-ready PDFs. Keep page breaks where they belong, headers on every page.

Used by → Power BI, Metabase, internal tools
03

Contracts

Render legal documents from form data, then sign them. The .NET Library handles PDF/A and digital signatures in-process.

Used by → DocuSign-style flows, HR onboarding
04

Tickets & passes

Boarding passes, event tickets, gift cards. Embed barcodes and QR codes natively. Render at 300dpi for print, smaller for mobile.

Used by → Eventbrite, airline systems

.NET PDF Library or HTML to PDF API?

Side-by-side
01 / EMBED
.NET Library
02 / CALL
Online API
Where it runs
.NET LibraryInside your .NET process
Online APIOur infrastructure
Languages
.NET LibraryC#, F#, VB.NET
Online APIAny (REST)
Network required
.NET LibraryNo
Online APIYes
Pricing model
.NET LibraryPer-CPU, perpetual (from $499)
Online APIPer-conversion, metered ($19–$449/mo)
Free tier
.NET LibraryFree trial (watermarked)
Online APIFree trial, no credit card
Best for
.NET LibraryCompliance, on-prem, high volume
Online APIPolyglot stacks, quick start, spiky load
TRUSTED BY

Trusted for HTML to PDF since 2014 — teams that ship a lot of PDFs.

22M+
NUGET DOWNLOADS
2014
SHIPPING SINCE
v26.2
CURRENT RELEASE
4
RENDER ENGINES
FROM THE BLOG

Latest from the SelectPdf blog — HTML to PDF guides.

All posts →
?FAQ

HTML to PDF, answered.

SelectPdf is an HTML-to-PDF toolkit for developers, available as a perpetual self-hosted .NET library (runs in-process inside your app) and as a cloud REST API you call from any language. It has shipped since 2014 with 22M+ NuGet downloads.
Yes. The .NET library has a free, no-limit trial (every page watermarked) and a separate free Community Edition capped at five pages; the Online API has a free trial plus a keyless watermarked demo. Paid options are a perpetual library license from $499 or metered API plans from $19–$449/month.
The SelectPdf .NET library supports .NET Framework 2.0+/4.0+, .NET Core and .NET 5–10, including ASP.NET and ASP.NET MVC.
The .NET library runs on Windows. For Linux, macOS or any non-.NET language, use the SelectPdf Online API — the same engine over REST, callable from cURL, JavaScript, Python, PHP and Ruby.
Use the .NET library for in-process conversion with no network call, perpetual per-CPU licensing, or on-prem and compliance control. Use the Online API for polyglot stacks, a quick start with no install, or spiky load. Both use the same engine and produce identical output.
SelectPdf renders with a modern headless Chromium engine by default; Blink and WebKit engines are also available. Current HTML, CSS and JavaScript convert the same way they display in a browser.
Install the Select.HtmlToPdf NuGet package, create an HtmlToPdf converter, call ConvertUrl or ConvertHtmlString, then save the PdfDocument — about three lines of C#. The same conversion is one REST call with the Online API.
SelectPdf ships four rendering engines — WebKit, WebKit Restricted, Blink and Chromium. WebKit, WebKit Restricted and Chromium run on every supported framework from .NET Framework 2.0 onward, while the Blink engine requires .NET Framework 4.6.1 or later (.NET Core and .NET 5–10).