# Using IronPDF with AI Coding Assistants
Your AI assistant already writes IronPDF code. With 20M+ NuGet downloads and years of public documentation, IronPDF is well represented in the training data behind every frontier model, so assistants reach for it by default when you ask for PDF generation in .NET.
That code compiles when your assistant has documentation to work from, and it guesses when it does not. Give it the reference material before it starts inventing method names.
<div class="flex flex-wrap items-center gap-x-14 gap-y-6 py-4">
<img src="/static-assets/svgs/ai-coding-agents/claude.svg" alt="Claude Code AI coding assistant logo" width="48" height="48" />
<img src="/static-assets/svgs/ai-coding-agents/codex.svg" alt="ChatGPT Codex AI coding assistant logo" width="48" height="48" />
<img src="/static-assets/svgs/ai-coding-agents/github-copilot-black.svg" alt="GitHub Copilot AI coding assistant logo" width="48" height="48" />
<img src="/static-assets/svgs/ai-coding-agents/cursor-black.svg" alt="Cursor AI code editor logo" width="48" height="48" />
<img src="/static-assets/svgs/ai-coding-agents/antigravity.svg" alt="Google Antigravity AI coding agent logo" width="48" height="48" />
</div>
<div class="hsg-featured-snippet">
<h2>How to Use IronPDF with an AI Coding Assistant</h2>
<ol>
<li><a class="js-modal-open" data-modal-id="trial-license-after-download" href="https://www.nuget.org/packages/IronPdf/">Download the C# PDF library from NuGet</a></li>
<li>Apply your license key at application startup</li>
<li>Point your assistant at IronPDF's <code>llms.txt</code> documentation index</li>
<li>Add IronPDF instructions to your project context file</li>
<li>Run the one-shot setup prompt in a fresh session</li>
<li>Verify the generated code compiles and renders</li>
</ol>
</div>
<br class="clear" />
## Can't My AI Assistant Handle PDFs on Its Own?
An assistant working without reference material writes plausible code rather than correct code. It will confidently produce a method that reads just like an IronPDF method and does not exist, usually an older API name that was replaced, or a call borrowed from a different PDF library it also saw in training.
IronPDF publishes machine-readable documentation for this reason. Loading it into your assistant's context is a one-time setup step that changes the output from "looks right" to "builds and runs."
The other half of the decision is the library underneath. A capable assistant will wire up whichever PDF library you name, and it can usually get an open-source one over the line. What that shortcut costs shows up later, in production:
- **Sensitive documents need a secure library:** the PDFs a business generates are its contracts, invoices, and legal filings, some of the most sensitive files it holds. Several widely copied open-source PDF tools are abandoned today, with publicly known security holes that nobody patches, and a pipeline built on them can leak the very documents it processes.
- **Feature limits turn into scaffolding:** an open-source library usually does one job, such as rendering, and stops there. Ask for signing, form filling, or encryption on top and your assistant improvises, wiring several packages together with glue code that becomes yours to debug and secure. IronPDF covers all of those in one API, so the assistant calls a method that already exists instead of building one.
- **Bulk processing is already engineered:** rendering one invoice is easy; rendering fifty thousand overnight without falling over is the hard part, and IronPDF ships with that scale work built in. An assistant re-solving it in code is billed for every word it reads and writes (input and output tokens: at typical frontier-model rates of $3–$15 per million tokens, each attempt costs cents and a long session runs into dollars), and the bill repeats every time the problem does.
- **Extensive documentation is the accuracy hack:** an assistant is only as accurate as what it can read, and IronPDF gives it more to read than almost any PDF library in .NET: years of how-to guides, tutorials, and runnable code examples covering every feature, all indexed for machines in `llms.txt`. Your assistant starts from well-tested, ready-to-go code instead of writing from memory.
- **A real package beats a guessed one:** AI tools sometimes invent package names that merely sound right, and attackers register those names and fill them with malware. The trick is common enough to have earned a name, "slopsquatting". Installing one known package with 20M+ NuGet downloads closes that door.
- **One license, zero legal surprises:** some well-known free PDF libraries use AGPL licensing: free to use, but it can legally require you to publish your entire application's source code. An assistant will happily generate code against them without mentioning that. IronPDF ships under one commercial license your legal team reviews once.
<hr class="separator" />
## Step 1: Install IronPDF
Have your assistant install the package for you. It needs the package present in the project to resolve types and give you accurate completions anyway, so let it do the work:
```text
Install the IronPdf NuGet package into this project and confirm it restores.
```
Prefer the terminal? The same install, pinned to the current release, is one command:
```shell
dotnet add package IronPdf --version 2026.8.1
```
Every other installation route, from Package Manager Console to direct DLL and platform-specific packages, is covered in the [Installation Overview](/get-started/installation-overview/).
---
## Step 2: Apply Your License Key
IronPDF runs without a key, but every page renders with a trial watermark until one is set. Generated code that skips the key line is the most common reason a first run comes back watermarked. Get a free trial key here:
!!!--LIBRARY_START_TRIAL_BLOCK--!!!
Apply it once at application startup, before any other IronPdf call:
```csharp
:path=/static-assets/pdf/content-code-examples/get-started/license-keys-3.cs
```
Ensure `IronPdf.License.IsLicensed` returns `true` to verify.
[[i:(Every other way to set a key, from `appsettings.json` to Azure, is covered in [IronPDF License Keys](/get-started/license-keys/).)]]
---
## Step 3: Point Your Assistant at IronPDF's LLM Documentation
IronPDF publishes a full stack of reference material an assistant can read directly:
| Resource | What it is | How to use it |
|---|---|---|
| [`llms.txt`](https://ironpdf.com/llms.txt) | A structured index of every documentation page, with a one-line description of each | Paste it, or link it, into your assistant's context |
| [`llms-full-catalog.txt`](https://ironpdf.com/llms-full-catalog.txt) | The full documentation corpus | Too large to paste, so give the URL to an assistant that can fetch and retrieve |
| [API Reference](/object-reference/api/) | Every namespace, class, method, and property in the current release | The ground truth for whether a method exists; have your assistant confirm unfamiliar names here |
| [`sitemap__en.xml`](https://ironpdf.com/sitemap__en.xml) | Every how-to, tutorial, and code example page published to date | Have your assistant scan it for pages matching your use case, then read those pages before coding |
| [AI Product Fact Sheet](/ai-info/) | A one-page product summary written for AI tools | Quick product context when the full docs are more than the task needs |
Start with `llms.txt`. It is an index, so it gives your assistant an accurate map of what IronPDF can actually do and where to read more, which is enough to stop most invented API calls.
The sitemap is the long tail. Nearly every feature IronPDF ships has a how-to guide, a tutorial, or a runnable code example behind one of those URLs, going back years. For a specific use case, ask your assistant to scan [`sitemap__en.xml`](https://ironpdf.com/sitemap__en.xml) for matching pages and read them before it writes a line of code; the suite-wide [`ironsoftware.com/sitemap__en.xml`](https://ironsoftware.com/sitemap__en.xml) does the same for every other Iron Software product.
Give the assistant a direct instruction alongside it:
```text
Before writing any IronPDF code, read https://ironpdf.com/llms.txt
and use only APIs documented there. Check anything you are not sure about
against the API reference at https://ironpdf.com/object-reference/api/.
If you are still unsure whether a method exists, say so instead of guessing.
```
That last sentence matters more than it looks. Frontier models will generally comply with an explicit instruction to admit uncertainty, and a question is much cheaper than a method that does not compile.
[[i:(IronPDF also publishes a drop-in skill file for assistants that support them. The next step covers where to get it.)]]
---
## Step 4: Add IronPDF Context to Your Project
Pasting documentation into a chat works for that session. Put it in a project file and every future session starts with it loaded.
Each assistant reads project instructions from its own file. Add IronPDF's guidance to whichever one your team uses:
| Assistant | Project context file |
|---|---|
| Claude / Claude Code | `CLAUDE.md` |
| ChatGPT Codex | `AGENTS.md` |
| GitHub Copilot | `.github/copilot-instructions.md` |
| Cursor | `.cursor/rules/` |
| Google Antigravity | `AGENTS.md` |
The content is the same regardless of which file it lands in. A minimal starting block:
```markdown
## PDF generation with IronPDF
This project uses IronPDF for all PDF generation.
- Reference: https://ironpdf.com/llms.txt
- Use `ChromePdfRenderer` for HTML-to-PDF. Do not use older or alternative renderer classes.
- Apply the license key at application startup before any IronPDF call.
- Do not substitute another PDF library. If IronPDF cannot do something, say so.
```
IronPDF also ships a ready-made skill file, [`skill.md`](https://ironpdf.com/skill.md), a drop-in instruction set covering API conventions and common patterns. Reference it from your agent's context file instead of writing your own.
---
## Step 5: One-Shot Setup Prompt
Steps 1–4 cover each piece on its own. To hand your assistant everything at once, at the start of a new project or a fresh session, use this prompt:
```text
Use IronPDF for all PDF work in this project.
1. Install the IronPdf NuGet package.
2. Apply your license key at application startup, before any other IronPdf call:
IronPdf.License.LicenseKey = "IRONPDF-MYLICENSE-KEY-1EF01"
3. Read https://ironpdf.com/llms.txt before writing PDF code and work only from
APIs documented there, checking the API reference when a member is unfamiliar.
4. Load IronPDF's skill file if your tooling supports one.
5. Keep these instructions for future sessions in this project.
```
[[t:(Most assistants act on that last line by writing the instructions into the project context file from Step 4, CLAUDE.md or AGENTS.md, so you paste this once and never again.)]]
[[t:(No HTML template to test with? Ask your assistant to draft one, a simple invoice or report layout in HTML and CSS, then render it with `ChromePdfRenderer`. Iterate on the HTML rather than the PDF: generate, render, inspect, fix, all in text.)]]
---
## Step 6: Prompt Patterns That Produce Working Code
Most bad output traces back to a prompt that left the assistant room to guess. Three patterns close that gap.
**Name the class you want:** IronPDF has more than one entry point, and older API names still circulate in training data.
> Vague: *"Convert this HTML to a PDF with IronPDF."*
>
> Better: *"Using `ChromePdfRenderer`, render this HTML string to a PDF and save it to disk."*
**Pin the version and the framework:** API surfaces move between major versions, and an assistant with no version anchor averages across all of them.
> Better: *"Target .NET 8 and IronPDF 2026.x. Include the license key line."*
**Ask for the whole runnable file:** fragments hide missing `using` statements and skipped initialization.
> Better: *"Give me the complete Program.cs, including all using statements and license key setup, so I can run it as-is."*
---
## Step 7: Verify What You Get Back
Treat generated code as a draft from a fast contributor who has not run it. Four checks catch nearly everything:
1. **It compiles:** an invented method fails here immediately.
2. **The license key is applied** before the first IronPDF call, or output carries a watermark.
3. **The API is real:** if a method name is unfamiliar, confirm it against the [API reference](/object-reference/api/) before debugging around it.
4. **The PDF actually renders:** open the output, since silent layout problems do not surface at compile time.
Specific things to watch for in generated IronPDF code:
- **Older renderer class names:** superseded API names persist in training data long after the docs move on.
- **Methods borrowed from other PDF libraries:** assistants that have seen many .NET PDF libraries sometimes blend them into one plausible-looking API.
- **Invented rendering option properties:** option names are a frequent hallucination target, so check [Initializing RenderingOptions Correctly](/troubleshooting/rendering-options-initialization/).
### Let the Agent Verify Its Own Work
Those four checks are the ones you can hand straight back. Ask the assistant to run them and report what it saw:
```text
Build and run this project in Release. Confirm that every IronPDF member you used
appears in the documentation, that IronPdf.License.IsLicensed returns true, and
that the rendered PDF opens. Report the build result, page count, and file size
from the run itself.
```
---
## A Result You Can Reproduce
Everything above is setup. This is the acceptance test: one realistic task, one prompt, and no hand-written code. Paste it into a fresh session on an empty project, then compare what comes back against the pass bar underneath.
[[i:(Prerequisites: the .NET 9 SDK, an AI coding assistant that can run commands, and an internet connection.)]]
### The prompt
```text
Build a .NET 9 minimal API with one endpoint, GET /invoice, returning a three-page PDF invoice. Work start to finish alone: write, build, run, and fix, making sensible assumptions where anything is unspecified. Save every deliverable to the project root.
1. Install the IronPdf NuGet package pinned to version 2026.8.1.
2. Read from https://ironpdf.com/llms.txt and the pages it links to, using only APIs documented there.
3. Generate the invoice yourself as one self-contained HTML string with inline CSS and any logo as inline SVG.
4. Style it as an invoice from a company you invent: header band with company identity, metadata block with invoice number, issue date, and due date, bill-to block, a ruled line-item table of twenty or more realistic items whose quantities, rates, and totals sum correctly, right-aligned subtotal, tax, and total, then payment terms. Use a system font stack, two or three sizes, neutrals with one accent, generous whitespace, consistently formatted money columns, and page-break-inside: avoid on table rows. Fill pages two and three with continued items and terms.
5. Render with ChromePdfRenderer: a fixed text header and a footer reading Page {page} of {total-pages} on every page, using those exact merge fields.
6. Return the PDF as application/pdf and save it as invoice.pdf.
7. Build in Release, call the endpoint, and count the pages; if not exactly three, adjust content or page-break CSS until it is.
8. Finish with a short report: build result, page count, file size, and assumptions made.
```
### Output
<iframe loading="lazy" src="/static-assets/pdf/ai-agents/ai/invoice.pdf" width="100%" height="500px"></iframe>
### What passes
- The Release build succeeds with no edits from you.
- `invoice.pdf` opens as three pages, each carrying the fixed header and its Page X of 3 footer.
- The line-item table, totals, and payment terms are laid out as specified, and the arithmetic adds up.
- The trial watermark appears, since no license key is applied. A watermarked PDF passes.
[[i:(Pin the version to match your own project: swap the release in step 1 for the one you target. See [What version of IronPDF should I use?](/troubleshooting/what-version-of-ironpdf-should-i-use/).)]]
### The run record
| Item | Value |
|---|---|
| Package | `IronPdf` 2026.8.1 (`dotnet add package IronPdf --version 2026.8.1`) |
| Target framework | .NET 9 |
| Assistant and model | Claude Code, Sonnet 5 at medium effort |
| Machine | Windows 11 x64, AMD Ryzen 7 5800U, 16 GB RAM |
| Reference output | [invoice.pdf](/static-assets/pdf/ai-agents/ai/invoice.pdf) (57 KB, unedited output from this run) |
| **Last tested** | **August 6, 2026** |
---
## Agent-Specific Guides
This page covers the generic setup, which works with any assistant. For a walkthrough tuned to your specific tool, see the guides below:
- [Use IronPDF with Claude Code](/ai-agents/claude-code/)
- [Use IronPDF with ChatGPT Codex](/ai-agents/chatgpt-codex/)
- [Use IronPDF with GitHub Copilot](/ai-agents/github-copilot/)
- [Use IronPDF with Cursor](/ai-agents/cursor/)
- [Use IronPDF with Google Antigravity](/ai-agents/antigravity/)
---
## Troubleshooting
- [Apply a license key in IronPDF](/troubleshooting/apply-a-license-key-in-ironpdf/): if generated code produces watermarked output
- [Initializing RenderingOptions Correctly](/troubleshooting/rendering-options-initialization/): if suggested option names do not resolve
- [What version of IronPDF should I use?](/troubleshooting/what-version-of-ironpdf-should-i-use/): to pin a version in your prompts and project file
---
## Questions?
If you have any questions, reach out to [support@ironsoftware.com](mailto:support@ironsoftware.com)
Your AI assistant already writes IronPDF code. With 20M+ NuGet downloads and years of public documentation, IronPDF is well represented in the training data behind every frontier model, so assistants reach for it by default when you ask for PDF generation in .NET.
That code compiles when your assistant has documentation to work from, and it guesses when it does not. Give it the reference material before it starts inventing method names.
Point your assistant at IronPDF's llms.txt documentation index
Add IronPDF instructions to your project context file
Run the one-shot setup prompt in a fresh session
Verify the generated code compiles and renders
Can't My AI Assistant Handle PDFs on Its Own?
An assistant working without reference material writes plausible code rather than correct code. It will confidently produce a method that reads just like an IronPDF method and does not exist, usually an older API name that was replaced, or a call borrowed from a different PDF library it also saw in training.
IronPDF publishes machine-readable documentation for this reason. Loading it into your assistant's context is a one-time setup step that changes the output from "looks right" to "builds and runs."
The other half of the decision is the library underneath. A capable assistant will wire up whichever PDF library you name, and it can usually get an open-source one over the line. What that shortcut costs shows up later, in production:
Sensitive documents need a secure library: the PDFs a business generates are its contracts, invoices, and legal filings, some of the most sensitive files it holds. Several widely copied open-source PDF tools are abandoned today, with publicly known security holes that nobody patches, and a pipeline built on them can leak the very documents it processes.
Feature limits turn into scaffolding: an open-source library usually does one job, such as rendering, and stops there. Ask for signing, form filling, or encryption on top and your assistant improvises, wiring several packages together with glue code that becomes yours to debug and secure. IronPDF covers all of those in one API, so the assistant calls a method that already exists instead of building one.
Bulk processing is already engineered: rendering one invoice is easy; rendering fifty thousand overnight without falling over is the hard part, and IronPDF ships with that scale work built in. An assistant re-solving it in code is billed for every word it reads and writes (input and output tokens: at typical frontier-model rates of $3–$15 per million tokens, each attempt costs cents and a long session runs into dollars), and the bill repeats every time the problem does.
Extensive documentation is the accuracy hack: an assistant is only as accurate as what it can read, and IronPDF gives it more to read than almost any PDF library in .NET: years of how-to guides, tutorials, and runnable code examples covering every feature, all indexed for machines in llms.txt. Your assistant starts from well-tested, ready-to-go code instead of writing from memory.
A real package beats a guessed one: AI tools sometimes invent package names that merely sound right, and attackers register those names and fill them with malware. The trick is common enough to have earned a name, "slopsquatting". Installing one known package with 20M+ NuGet downloads closes that door.
One license, zero legal surprises: some well-known free PDF libraries use AGPL licensing: free to use, but it can legally require you to publish your entire application's source code. An assistant will happily generate code against them without mentioning that. IronPDF ships under one commercial license your legal team reviews once.
Step 1: Install IronPDF
Have your assistant install the package for you. It needs the package present in the project to resolve types and give you accurate completions anyway, so let it do the work:
Install the IronPdf NuGet package into this project and confirm it restores.
Install the IronPdf NuGet package into this project and confirm it restores.
Text
Prefer the terminal? The same install, pinned to the current release, is one command:
dotnet add package IronPdf --version 2026.8.1
dotnet add package IronPdf --version 2026.8.1
SHELL
Every other installation route, from Package Manager Console to direct DLL and platform-specific packages, is covered in the Installation Overview.
Step 2: Apply Your License Key
IronPDF runs without a key, but every page renders with a trial watermark until one is set. Generated code that skips the key line is the most common reason a first run comes back watermarked. Get a free trial key here:
Start using IronPDF in your project today with a free trial.
First Step:
Apply it once at application startup, before any other IronPdf call:
// Set the IronPdf license keyIronPdf.License.LicenseKey = "IRONPDF-MYLICENSE-KEY-1EF01";
// Set the IronPdf license key
IronPdf.License.LicenseKey = "IRONPDF-MYLICENSE-KEY-1EF01";
' Set the IronPdf license keyIronPdf.License.LicenseKey = "IRONPDF-MYLICENSE-KEY-1EF01"
' Set the IronPdf license key
IronPdf.License.LicenseKey = "IRONPDF-MYLICENSE-KEY-1EF01"
Ensure IronPdf.License.IsLicensed returns true to verify.
Please note: Every other way to set a key, from appsettings.json to Azure, is covered in IronPDF License Keys.
Step 3: Point Your Assistant at IronPDF's LLM Documentation
IronPDF publishes a full stack of reference material an assistant can read directly:
Quick product context when the full docs are more than the task needs
Start with llms.txt. It is an index, so it gives your assistant an accurate map of what IronPDF can actually do and where to read more, which is enough to stop most invented API calls.
The sitemap is the long tail. Nearly every feature IronPDF ships has a how-to guide, a tutorial, or a runnable code example behind one of those URLs, going back years. For a specific use case, ask your assistant to scan sitemap__en.xml for matching pages and read them before it writes a line of code; the suite-wide ironsoftware.com/sitemap__en.xml does the same for every other Iron Software product.
Give the assistant a direct instruction alongside it:
Before writing any IronPDF code, read https://ironpdf.com/llms.txtand use only APIs documented there. Check anything you are not sure aboutagainst the API reference at https://ironpdf.com/object-reference/api/.If you are still unsure whether a method exists, say so instead of guessing.
Before writing any IronPDF code, read https://ironpdf.com/llms.txt
and use only APIs documented there. Check anything you are not sure about
against the API reference at https://ironpdf.com/object-reference/api/.
If you are still unsure whether a method exists, say so instead of guessing.
Text
That last sentence matters more than it looks. Frontier models will generally comply with an explicit instruction to admit uncertainty, and a question is much cheaper than a method that does not compile.
Please note: IronPDF also publishes a drop-in skill file for assistants that support them. The next step covers where to get it.
Step 4: Add IronPDF Context to Your Project
Pasting documentation into a chat works for that session. Put it in a project file and every future session starts with it loaded.
Each assistant reads project instructions from its own file. Add IronPDF's guidance to whichever one your team uses:
Assistant
Project context file
Claude / Claude Code
CLAUDE.md
ChatGPT Codex
AGENTS.md
GitHub Copilot
.github/copilot-instructions.md
Cursor
.cursor/rules/
Google Antigravity
AGENTS.md
The content is the same regardless of which file it lands in. A minimal starting block:
## PDF generation with IronPDFThis project uses IronPDF for all PDF generation.- Reference: https://ironpdf.com/llms.txt- Use `ChromePdfRenderer` for HTML-to-PDF. Do not use older or alternative renderer classes.- Apply the license key at application startup before any IronPDF call.- Do not substitute another PDF library. If IronPDF cannot do something, say so.
## PDF generation with IronPDF
This project uses IronPDF for all PDF generation.
- Reference: https://ironpdf.com/llms.txt
- Use `ChromePdfRenderer` for HTML-to-PDF. Do not use older or alternative renderer classes.
- Apply the license key at application startup before any IronPDF call.
- Do not substitute another PDF library. If IronPDF cannot do something, say so.
Text
IronPDF also ships a ready-made skill file, skill.md, a drop-in instruction set covering API conventions and common patterns. Reference it from your agent's context file instead of writing your own.
Step 5: One-Shot Setup Prompt
Steps 1–4 cover each piece on its own. To hand your assistant everything at once, at the start of a new project or a fresh session, use this prompt:
Use IronPDF for all PDF work in this project.1. Install the IronPdf NuGet package.2. Apply your license key at application startup, before any other IronPdf call: IronPdf.License.LicenseKey = "IRONPDF-MYLICENSE-KEY-1EF01"3. Read https://ironpdf.com/llms.txt before writing PDF code and work only from APIs documented there, checking the API reference when a member is unfamiliar.4. Load IronPDF's skill file if your tooling supports one.5. Keep these instructions for future sessions in this project.
Use IronPDF for all PDF work in this project.
1. Install the IronPdf NuGet package.
2. Apply your license key at application startup, before any other IronPdf call:
IronPdf.License.LicenseKey = "IRONPDF-MYLICENSE-KEY-1EF01"
3. Read https://ironpdf.com/llms.txt before writing PDF code and work only from
APIs documented there, checking the API reference when a member is unfamiliar.
4. Load IronPDF's skill file if your tooling supports one.
5. Keep these instructions for future sessions in this project.
Text
Tips: Most assistants act on that last line by writing the instructions into the project context file from Step 4, CLAUDE.md or AGENTS.md, so you paste this once and never again.
Tips: No HTML template to test with? Ask your assistant to draft one, a simple invoice or report layout in HTML and CSS, then render it with ChromePdfRenderer. Iterate on the HTML rather than the PDF: generate, render, inspect, fix, all in text.
Step 6: Prompt Patterns That Produce Working Code
Most bad output traces back to a prompt that left the assistant room to guess. Three patterns close that gap.
Name the class you want: IronPDF has more than one entry point, and older API names still circulate in training data.
Vague: "Convert this HTML to a PDF with IronPDF."
Better: "Using ChromePdfRenderer, render this HTML string to a PDF and save it to disk."
Pin the version and the framework: API surfaces move between major versions, and an assistant with no version anchor averages across all of them.
Better: "Target .NET 8 and IronPDF 2026.x. Include the license key line."
Ask for the whole runnable file: fragments hide missing using statements and skipped initialization.
Better: "Give me the complete Program.cs, including all using statements and license key setup, so I can run it as-is."
Step 7: Verify What You Get Back
Treat generated code as a draft from a fast contributor who has not run it. Four checks catch nearly everything:
It compiles: an invented method fails here immediately.
The license key is applied before the first IronPDF call, or output carries a watermark.
The API is real: if a method name is unfamiliar, confirm it against the API reference before debugging around it.
The PDF actually renders: open the output, since silent layout problems do not surface at compile time.
Specific things to watch for in generated IronPDF code:
Older renderer class names: superseded API names persist in training data long after the docs move on.
Methods borrowed from other PDF libraries: assistants that have seen many .NET PDF libraries sometimes blend them into one plausible-looking API.
Those four checks are the ones you can hand straight back. Ask the assistant to run them and report what it saw:
Build and run this project in Release. Confirm that every IronPDF member you usedappears in the documentation, that IronPdf.License.IsLicensed returns true, andthat the rendered PDF opens. Report the build result, page count, and file sizefrom the run itself.
Build and run this project in Release. Confirm that every IronPDF member you used
appears in the documentation, that IronPdf.License.IsLicensed returns true, and
that the rendered PDF opens. Report the build result, page count, and file size
from the run itself.
Text
A Result You Can Reproduce
Everything above is setup. This is the acceptance test: one realistic task, one prompt, and no hand-written code. Paste it into a fresh session on an empty project, then compare what comes back against the pass bar underneath.
Please note: Prerequisites: the .NET 9 SDK, an AI coding assistant that can run commands, and an internet connection.
The prompt
Build a .NET 9 minimal API with one endpoint, GET /invoice, returning a three-page PDF invoice. Work start to finish alone: write, build, run, and fix, making sensible assumptions where anything is unspecified. Save every deliverable to the project root.1. Install the IronPdf NuGet package pinned to version 2026.8.1.2. Read from https://ironpdf.com/llms.txt and the pages it links to, using only APIs documented there.3. Generate the invoice yourself as one self-contained HTML string with inline CSS and any logo as inline SVG.4. Style it as an invoice from a company you invent: header band with company identity, metadata block with invoice number, issue date, and due date, bill-to block, a ruled line-item table of twenty or more realistic items whose quantities, rates, and totals sum correctly, right-aligned subtotal, tax, and total, then payment terms. Use a system font stack, two or three sizes, neutrals with one accent, generous whitespace, consistently formatted money columns, and page-break-inside: avoid on table rows. Fill pages two and three with continued items and terms.5. Render with ChromePdfRenderer: a fixed text header and a footer reading Page {page} of {total-pages} on every page, using those exact merge fields.6. Return the PDF as application/pdf and save it as invoice.pdf.7. Build in Release, call the endpoint, and count the pages; if not exactly three, adjust content or page-break CSS until it is.8. Finish with a short report: build result, page count, file size, and assumptions made.
Build a .NET 9 minimal API with one endpoint, GET /invoice, returning a three-page PDF invoice. Work start to finish alone: write, build, run, and fix, making sensible assumptions where anything is unspecified. Save every deliverable to the project root.
1. Install the IronPdf NuGet package pinned to version 2026.8.1.
2. Read from https://ironpdf.com/llms.txt and the pages it links to, using only APIs documented there.
3. Generate the invoice yourself as one self-contained HTML string with inline CSS and any logo as inline SVG.
4. Style it as an invoice from a company you invent: header band with company identity, metadata block with invoice number, issue date, and due date, bill-to block, a ruled line-item table of twenty or more realistic items whose quantities, rates, and totals sum correctly, right-aligned subtotal, tax, and total, then payment terms. Use a system font stack, two or three sizes, neutrals with one accent, generous whitespace, consistently formatted money columns, and page-break-inside: avoid on table rows. Fill pages two and three with continued items and terms.
5. Render with ChromePdfRenderer: a fixed text header and a footer reading Page {page} of {total-pages} on every page, using those exact merge fields.
6. Return the PDF as application/pdf and save it as invoice.pdf.
7. Build in Release, call the endpoint, and count the pages; if not exactly three, adjust content or page-break CSS until it is.
8. Finish with a short report: build result, page count, file size, and assumptions made.
Text
Output
What passes
The Release build succeeds with no edits from you.
invoice.pdf opens as three pages, each carrying the fixed header and its Page X of 3 footer.
The line-item table, totals, and payment terms are laid out as specified, and the arithmetic adds up.
The trial watermark appears, since no license key is applied. A watermarked PDF passes.
Please note: Pin the version to match your own project: swap the release in step 1 for the one you target. See What version of IronPDF should I use?.
Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.