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.
Running the samples
Section titled “Running the samples”The samples live in one flat project with a Program.cs dispatcher. Clone the repo
and run it:
cd samples/Rivoli.Pdf.Samplesdotnet runThis 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.
Coverage
Section titled “Coverage”The catalog spans the union of what the major PDF SDKs showcase. The entries fall into three groups:
| Group | Meaning | Count |
|---|---|---|
| Runnable | A sample exists and generates its output PDF | 51 |
| Library-supported | The library supports it; the sample program is not written | 10 |
| Reading-side | Depends on the import and rasterization features | 28 |
| Total | 89 |
The reading-side entries (filling existing forms, rendering pages to images, layout-preserving extraction) are listed rather than hidden, with their dependencies noted.
Categories
Section titled “Categories”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.
| Category | What it covers | Status | Learn the concepts |
|---|---|---|---|
| Getting started | First document, metadata, page sizes, orientation, margins, global options | Mostly | Getting started |
| Text & typography | Paragraphs, runs, spans, decorations, line/letter spacing, named styles, hyperlinks & symbols | Mostly | Document model · Styling |
| Content elements | Lists, tables, images, vector canvas, headers/footers, watermarks, layers, attachments | Mostly | Document model · Components & reuse |
| Real-world documents | Invoice, proposal, report with charts, certificate, contract, résumé, ticket, statement, catalog | Done | Document structure |
| Forms | AcroForm creation (all field types) | Partial | How-to guides |
| Document operations | Merge, split / page-range extraction | Partial | How-to guides |
| Extraction & search | Plain-text extraction, text search with coordinates, attachment & metadata read | Partial | How-to guides |
| Security & compliance | Password protection & permissions, digital signatures, PDF/A-1b, tagged/PDF-UA, veraPDF walkthrough | Mostly | How-to guides |
| Conversion | HTML → PDF, image(s) → PDF, Markdown → PDF | Partial | How-to guides |
| Integration & deployment | ASP.NET Core controller, parallel generation & thread-safety guidance | Partial | How-to guides |
| Code patterns | Reusable components, builder/fluent API, JSON round-trip, change tracking, caching, diagnostics | Mostly | Working with the builder · Components & reuse |
A taste of the showcase samples
Section titled “A taste of the showcase samples”The “Real-world documents” category is the most useful starting point: each sample is a self-contained document you would actually ship:
| Sample file | Output | Shows off |
|---|---|---|
31-InvoiceShowcaseSample.cs | output/31-invoice.pdf | The canonical demo: header, line-item table, totals |
38-CertificateShowcaseSample.cs | certificate PDF | Centered layout, large display type, borders |
39-ContractShowcaseSample.cs | contract PDF | A real AcroForm /Sig signature field |
40-ResumeShowcaseSample.cs | résumé PDF | Multi-section layout, styled headings |
43-AccountStatementSample.cs | statement PDF | A large table with a running balance and a repeating page header |
44-ReportWithChartsSample.cs | report PDF | Bar and line charts drawn as true vector graphics (VectorCanvasBlock) |
Reading-side capabilities
Section titled “Reading-side capabilities”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.
See also
Section titled “See also”- Getting started: install the packages and write your first document.
- The document model: the tree every sample builds.
- Working with the builder: the construction styles the samples use.
- Benchmarks & fidelity: how reading-side features are validated.