HTML to PDF, merging, splitting, text extraction, page rendering and printing — declared as separate interfaces, so a class asks for the one capability it needs. Several provider packages implement them; the one you register is the only place its name appears.
The interfaces below are the part that does not change when you swap the library underneath. Each provider then adds whatever extras its own library exposes.
Pass HTML, a page size, margins and header/footer fragments. Returns a file object you can save, stream or attach.
Combine any number of PDFs into one, or cut a document into page ranges — monthly archives, per-recipient splits.
Extract plain text for search indexing, render pages to images for thumbnails, or build a PDF from a set of images.
Send a document to a physical printer through a separate IPdfPrinter contract, with PDFtoPrinter or SimpleFreePdfPrinter behind it.
Install the one that fits your runtime and licensing, and name it once at registration. Every package here is published on nuget.org.
The provider appears where the concrete class is constructed, and nowhere else. Always-current samples live in the package documentation.
// HTML in, PDF out. Swap SelectPdf for DocNET, Spire, Playwright or PuppeteerSharp
// and this method does not change.
IHtmlToPdfService pdf = new Regira.Office.PDF.SelectPdf.PdfManager();
IMemoryFile invoice = await pdf.Create(new HtmlInput
{
HtmlContent = html,
Format = PageSize.A4,
Margins = new Margins { Top = 20, Bottom = 20, Left = 15, Right = 15 }
});
// Merging and text extraction are their own contracts, on the same file object.
IPdfMerger merger = new Regira.Office.PDF.DocNET.PdfManager(imageService);
IMemoryFile archive = (await merger.Merge([invoice, terms]))!;
IPdfTextExtractor extractor = new Regira.Office.PDF.DocNET.PdfManager(imageService);
string text = await extractor.GetText(archive);Generate a PDF from HTML or images, render pages as images, merge documents, extract plain text and split by page range — over plain HTTP, from any language.
The free tier needs no key and is rate-limited to 5 requests / 60 s. A trial or commercial key removes the limit — send it in the X-License-Key header.
Fill a .docx template with values and repeating tables, merge documents and convert to PDF — over Spire or MiniWord.