ObviousPDF.Csv
1.5.0
dotnet add package ObviousPDF.Csv --version 1.5.0
NuGet\Install-Package ObviousPDF.Csv -Version 1.5.0
<PackageReference Include="ObviousPDF.Csv" Version="1.5.0" />
<PackageVersion Include="ObviousPDF.Csv" Version="1.5.0" />
<PackageReference Include="ObviousPDF.Csv" />
paket add ObviousPDF.Csv --version 1.5.0
#r "nuget: ObviousPDF.Csv, 1.5.0"
#:package ObviousPDF.Csv@1.5.0
#addin nuget:?package=ObviousPDF.Csv&version=1.5.0
#tool nuget:?package=ObviousPDF.Csv&version=1.5.0
ObviousPDF.Csv
CSV-to-PDF renderer for the ObviousPDF library.
Overview
ObviousPDF.Csv accepts a CSV document conforming to the ObviousPDF CSV Format and produces a tagged, accessible PDF. It is a format peer of ObviousPDF.Json and ObviousPDF.Xml, sharing the same rendering pipeline and accessibility guarantees.
Quick Start
using ObviousPDF.Csv;
// Render from CSV string to file
PdfCsvRenderer.Render(csvString, "output.pdf");
// Render from CSV file to PDF file
PdfCsvRenderer.RenderFromFile("document.csv", "output.pdf");
// Validate without rendering
var validator = new PdfCsvValidator();
var result = validator.Validate(csvString);
if (!result.IsValid)
Console.WriteLine(result);
// Generate a starter form template for users to fill in
var templateCsv = PdfCsvRenderer.CreateFormTemplate("Expense Reimbursement Form");
File.WriteAllText("expense-form-template.csv", templateCsv);
Form Template Generator
PdfCsvRenderer.CreateFormTemplate() creates a starter CSV file for form-based documents. The generated template includes:
[DOCUMENT]settings with accessibility defaults enabled[FONTS]entries for common title and field text- A sample
[PAGE 1]section with form field placeholders
Use the optional pageCount parameter to generate multiple sample page sections.
CSV Format
The ObviousPDF CSV format uses section headers to organize document structure:
[DOCUMENT]
coordinateOrigin,bottomLeft
language,en-US
tagged,true
[FONTS]
id,mode,standardFont,bundledFont,path,description,data
heading,bundled,,SerifBold,,Heading font,
[PAGE 1]
type,x,y,...,text,...,fontRef,fontSize,...
text,72,720,...,Hello World!,...,heading,24,...
Key Features
- Section-based —
[DOCUMENT],[PAGE n],[FONTS],[IMAGES],[STRUCTURE], etc. - Spreadsheet-friendly — Designed for creation in Excel, Google Sheets, or LibreOffice Calc
- Full accessibility — Tagged PDF, PDF/UA-1, structure tree, alt text
Easy Accessibility (Recommended)
Make any CSV-to-PDF document fully accessible with a single line:
[DOCUMENT]
coordinateOrigin,topLeft
accessible,true
language,en-US
displayDocTitle,true
info.title,"My Document"
With accessible,true, the renderer automatically enables tagged PDF, PDF/UA-1 conformance,
auto-tagging for text and images, standard font auto-upgrade, and correct form field structure
placement. No manual structure tree is required.
Use the structureTag column to override the default <P> auto-tag:
text,160,28,,,,,,,U.S. Individual Income Tax Return,title-font,14,black,,,,,,,,,,,,,H1,,
text,36,90,,,,,,,Filing Status,section-font,10,white,,,,,,,,,,,,,H2,,
See the Form 1040 Easy Accessibility example for a complete 3-page IRS form with checkboxes, text fields, and dropdowns.
Sister Projects
| Package | Format | Best For |
|---|---|---|
ObviousPDF.Json |
JSON | Web APIs, LLM/AI generation |
ObviousPDF.Xml |
XML | Enterprise workflows, XSLT transforms |
ObviousPDF.Csv |
CSV | Spreadsheet authoring (Excel, Google Sheets) |
All three pipelines produce identical PDF output and share the same accessibility features.
- Compact color syntax —
rgb(0.2,0.4,0.8),gray(0.5),cmyk(...),#1A4C99,red - All content types — Text, images, graphics, form fields, annotations, transforms
Requirements
- .NET 6.0, .NET 8.0, .NET 9.0, or .NET 10.0
- ObviousPDF core package (referenced automatically)
License
See LICENSE.md for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- ObviousPDF (>= 1.5.0)
- ObviousPDF.Json (>= 1.5.0)
-
net6.0
- ObviousPDF (>= 1.5.0)
- ObviousPDF.Json (>= 1.5.0)
-
net8.0
- ObviousPDF (>= 1.5.0)
- ObviousPDF.Json (>= 1.5.0)
-
net9.0
- ObviousPDF (>= 1.5.0)
- ObviousPDF.Json (>= 1.5.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.