Invoicing
Generate every invoice your billing system emits — from a templated HTML page to a PDF attached to the customer's receipt.
Use the free online HTML to PDF converter above, or build it into your app. SelectPdf is a battle-tested HTML to PDF toolkit in two shapes. Embed the .NET library: SelectPdf.Universal, our new flagship, runs on Windows, Linux and macOS on Apple Silicon, and the classic library still covers .NET Framework 2.0 and later. Or call the HTML to PDF API from any language. Every option renders with the latest Chromium engine, giving pixel-perfect PDFs with full HTML5, CSS3 and JavaScript support. One perpetual license covers both libraries, with a free trial and a Community Edition.
Our new flagship, SelectPdf.Universal. Self-hosted, no per-page fees.
One endpoint. Any language. Free trial, no credit card.
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.
Same engine. Same output. Same options. The .NET Library and the Online API are bit-for-bit equivalent — pick whichever matches your runtime.
using SelectPdf.Universal; // classic Windows library: 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();
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
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);
}
);
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())
<?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"
);
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"
)
SelectPdf converts HTML to PDF from .NET and from any language over REST. Point the HTML to PDF converter at a URL or pass a raw HTML string and it returns a pixel-accurate PDF, rendered by a real Chromium browser engine with full HTML5, CSS3 and JavaScript and control over page size, margins, headers, footers and page numbering. The same Chromium engine powers both the self-hosted .NET library and the online HTML to PDF API, so a layout you convert today renders identically whichever you pick. Start free — the .NET trial and the Community Edition need no card, and a free Online API key includes 200 conversions to convert HTML to PDF online before you choose a plan.
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.
Generate every invoice your billing system emits — from a templated HTML page to a PDF attached to the customer's receipt.
Convert dashboards, charts and tables into archive-ready PDFs. Keep page breaks where they belong, headers on every page.
Render legal documents from form data, then sign them. The .NET Library handles PDF/A, accessible (tagged) PDF and digital signatures on your own server.
Boarding passes, event tickets, gift cards. Embed barcodes and QR codes natively. Render at 300dpi for print, smaller for mobile.
For twelve years the answer to “can I run the SelectPdf library on Linux?” was no — use the Online API instead. That answer changes today. SelectPdf 26.4 introduces Selec…
Read →This is a complete, hands-on guide to converting HTML to PDF in C# with the SelectPdf library for .NET. It works up from a three-line conversion to a production-ready wor…
Read →Updated October 2026 for SelectPdf 26.4: the library now runs on Linux, in Docker and on macOS on Apple Silicon as well, through the new SelectPdf.Universal packages. The…
Read →