Zorg.Pdf.Extensions.AI
0.5.0
dotnet add package Zorg.Pdf.Extensions.AI --version 0.5.0
NuGet\Install-Package Zorg.Pdf.Extensions.AI -Version 0.5.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Zorg.Pdf.Extensions.AI" Version="0.5.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Zorg.Pdf.Extensions.AI" Version="0.5.0" />
<PackageReference Include="Zorg.Pdf.Extensions.AI" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Zorg.Pdf.Extensions.AI --version 0.5.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Zorg.Pdf.Extensions.AI, 0.5.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Zorg.Pdf.Extensions.AI@0.5.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Zorg.Pdf.Extensions.AI&version=0.5.0
#tool nuget:?package=Zorg.Pdf.Extensions.AI&version=0.5.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Zorg.Pdf.Extensions.AI
Tools for AI agents that write PDF documents with Zorg.Pdf, as Microsoft.Extensions.AI functions. Native AOT and trimming work: the tools use no reflection.
Pre-release: the API will change before 1.0.
| Tool | Does |
|---|---|
get_document_schema |
Returns the JSON Schema of a document, a short guide, and an example |
validate_document |
Checks a document and its data; returns every problem with a code and a JSON pointer |
render_document |
Renders a document with its data as tagged PDF; returns pages, size, warnings and where the file went |
get_capabilities |
Says what the host renders with: font families, conformance, PDF/A level, limits, and which optional tools exist |
render_preview |
Renders and returns one page as a PNG picture, so the model can check its layout by looking (when the host sets PreviewAsync, for example to Zorg.Pdf.Imaging's PdfPreview) |
render_markdown |
Renders Markdown as tagged PDF, for notes and reports that need no layout of their own (when the host sets ParseMarkdown, for example to Zorg.Pdf.Markdown) |
The model writes the document and its data. The host decides everything else: fonts, conformance, limits, and where rendered files go. The tools never read or write files themselves.
using Microsoft.Extensions.AI;
using Zorg.Pdf;
using Zorg.Pdf.Extensions.AI;
using Zorg.Pdf.Fonts;
IList<AITool> tools = [.. PdfTools.Create(new PdfToolOptions
{
Render = new RenderOptions
{
Fonts = FontCollection.Empty.Add(new FontFamily("Inter") { Regular = FontSource.FromFile("Inter-Regular.ttf") }),
Conformance = PdfConformance.PdfUA1,
},
SaveAsync = async (pdf, ct) => await storage.SaveAsync($"{pdf.Title}.pdf", pdf.Bytes, ct),
})];
ChatResponse response = await chatClient.GetResponseAsync(messages, new ChatOptions { Tools = tools }, cancellationToken);
Documentation
- Example documents, with their data
- Diagnostic codes
- Changelog
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Microsoft.Extensions.AI.Abstractions (>= 10.11.0)
- Zorg.Pdf (>= 0.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.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.5.0 | 48 | 11/15/2026 |
| 0.1.0-preview.1 | 47 | 11/15/2026 |