Skip to content

Examples gallery

A filterable index over the sample projects, with screenshots and source links.

The gallery is backed by a single runnable project, samples/Rivoli.Pdf.Samples/. Every entry below is a real, committed sample that writes a PDF you can open and inspect. The full catalog is in samples/CATALOG.md.

The samples live in one flat project with a Program.cs dispatcher. Clone the repo and run it:

Terminal window
cd samples/Rivoli.Pdf.Samples
dotnet run

This builds the documents in memory and writes the output PDFs into the repo’s .outputs/ tree. Open any of them in your PDF viewer to see the rendered result: that is the “screenshot”: each sample produces a concrete file (for example output/01-basic-document.pdf, output/31-invoice.pdf) rather than a static image checked into the docs.

The catalog spans the union of what the major PDF SDKs showcase. The entries fall into three groups:

GroupMeaningCount
RunnableA sample exists and generates its output PDF51
Library-supportedThe library supports it; the sample program is not written10
Reading-sideDepends on the import and rasterization features28
Total89

The reading-side entries (filling existing forms, rendering pages to images, layout-preserving extraction) are listed rather than hidden, with their dependencies noted.

The categories below mirror the catalog and link conceptually to the parts of the docs that explain the underlying model. Browse the matching sample files in samples/Rivoli.Pdf.Samples/ for working code.

CategoryWhat it coversStatusLearn the concepts
Getting startedFirst document, metadata, page sizes, orientation, margins, global optionsMostlyGetting started
Text & typographyParagraphs, runs, spans, decorations, line/letter spacing, named styles, hyperlinks & symbolsMostlyDocument model · Styling
Content elementsLists, tables, images, vector canvas, headers/footers, watermarks, layers, attachmentsMostlyDocument model · Components & reuse
Real-world documentsInvoice, proposal, report with charts, certificate, contract, résumé, ticket, statement, catalogDoneDocument structure
FormsAcroForm creation (all field types)PartialHow-to guides
Document operationsMerge, split / page-range extractionPartialHow-to guides
Extraction & searchPlain-text extraction, text search with coordinates, attachment & metadata readPartialHow-to guides
Security & compliancePassword protection & permissions, digital signatures, PDF/A-1b, tagged/PDF-UA, veraPDF walkthroughMostlyHow-to guides
ConversionHTML → PDF, image(s) → PDF, Markdown → PDFPartialHow-to guides
Integration & deploymentASP.NET Core controller, parallel generation & thread-safety guidancePartialHow-to guides
Code patternsReusable components, builder/fluent API, JSON round-trip, change tracking, caching, diagnosticsMostlyWorking with the builder · Components & reuse

The “Real-world documents” category is the most useful starting point: each sample is a self-contained document you would actually ship:

Sample fileOutputShows off
31-InvoiceShowcaseSample.csoutput/31-invoice.pdfThe canonical demo: header, line-item table, totals
38-CertificateShowcaseSample.cscertificate PDFCentered layout, large display type, borders
39-ContractShowcaseSample.cscontract PDFA real AcroForm /Sig signature field
40-ResumeShowcaseSample.csrésumé PDFMulti-section layout, styled headings
43-AccountStatementSample.csstatement PDFA large table with a running balance and a repeating page header
44-ReportWithChartsSample.csreport PDFBar and line charts drawn as true vector graphics (VectorCanvasBlock)

The reading-side entries cluster around a few themes: filling and flattening existing forms, rendering a page to an image, layout-preserving text extraction, advanced table layout, PDF/A-2 / PDF/A-3, barcodes/QR, and SVG import. These build on the import and rasterization work described in Benchmarks & fidelity.