Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import {readFileSync} from 'node:fs'
import {defineConfig, HeadConfig} from 'vitepress'
import llmstxt from 'vitepress-plugin-llms'
import imageSizePlugin from "./markdownit-imagesize-plugin";

const isProd = process.env.NODE_ENV === 'production';
const llmsTxtTemplate = readFileSync(new URL('./llms-txt-template.md', import.meta.url), 'utf-8').trimEnd();

function getPlausibleScript() : HeadConfig[] {
if (!isProd)
Expand All @@ -23,7 +25,26 @@ export default defineConfig({
cleanUrls: false,

vite: {
plugins: [llmstxt()]
plugins: [llmstxt({
domain: 'https://www.questpdf.com',
customLLMsTxtTemplate: llmsTxtTemplate,
ignoreFiles: [
'api-reference/tip-*.md',

'license.md',
'license/community.md',
'license/guide.md',
'license/professional-enterprise.md',
'license/purchase-success.md',
'privacy-policy.md',
'security-policy.md',
'terms-of-service.md',

'pricing.md',
'contact.md',
'features-overview.md',
],
})]
},

head: [
Expand Down
22 changes: 22 additions & 0 deletions docs/.vitepress/llms-txt-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# QuestPDF

> QuestPDF is a C# library for generating PDF documents such as invoices, reports and data exports. Documents are written in C# with a fluent API, not in HTML.
> You compose layouts from elements like text, images, SVG, tables and grids, and the layout engine splits the content across pages, including headers, footers and page numbers. Barcodes are added by integrating ZXing.Net.
> Output can comply with PDF/A, PDF/UA and ZUGFeRD/Factur-X. Existing PDFs can be merged, overlaid, encrypted and given attachments. Runs on Windows, Linux and macOS, including Docker and cloud hosting. The Companion App previews documents with hot reload.

Install with `dotnet add package QuestPDF`. Start with [Quick start](https://www.questpdf.com/quick-start.md), then the [In-Depth Invoice Tutorial](https://www.questpdf.com/invoice-tutorial.md).

## About

- [Pricing](https://www.questpdf.com/pricing.html)
- [License Selection Guide](https://www.questpdf.com/license/guide.html): Choosing a license
- [LICENSE.md](https://github.com/QuestPDF/QuestPDF/blob/main/LICENSE.md): Binding license terms
- [Features Overview](https://www.questpdf.com/features-overview.html): What QuestPDF can do
- [Security Policy](https://www.questpdf.com/security-policy.html)
- [Privacy Policy](https://www.questpdf.com/privacy-policy.html)
- [Terms of Service](https://www.questpdf.com/terms-of-service.html)
- [llms-full.txt](https://www.questpdf.com/llms-full.txt): Everything in one file

## Table of Contents

{toc}
4 changes: 2 additions & 2 deletions docs/api-reference/image/svg.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ Document

## Font Support

Text inside an SVG image uses the same fonts as the rest of the document: the bundled `Lato` font, files deployed along with the application (see [automatic local font registration](/api-reference/text/font-management#automatic-local-font-registration)), and fonts registered via the `FontManager` class.
Text inside an SVG image uses the same fonts as the rest of the document: the bundled `Lato` font, files deployed along with the application (see [automatic local font registration](/api-reference/text/font-management.md#automatic-local-font-registration)), and fonts registered via the `FontManager` class.
Fonts installed in the operating system are available only when the `QuestPDF.Settings.UseSystemFonts` setting is enabled.

::: warning
The `QuestPDF.Settings.ThrowOnMissingFontFamilies` and `QuestPDF.Settings.ThrowOnMissingTextGlyphs` settings do not apply to SVG content. A missing font family or glyph inside an SVG image does not raise an exception.
:::

Learn more in the [font management](/api-reference/text/font-management) section.
Learn more in the [font management](/api-reference/text/font-management.md) section.


## Limitations
Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/layers.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The Layers element adds content either underneath (as a background) or on top of (as a watermark) the main content.

The main layer supports paging, can span multiple pages, and determines the container's target length.
Additional layers can also span multiple pages: like the main layer, a long layer continues on the next page, but it is not repeated on each one. For content on every page, such as a watermark, use the page's [Background or Foreground slot](/api-reference/page/slots).
Additional layers can also span multiple pages: like the main layer, a long layer continues on the next page, but it is not repeated on each one. For content on every page, such as a watermark, use the page's [Background or Foreground slot](/api-reference/page/slots.md).

| Method | Description |
|------------------|--------------------------------------------------|
Expand Down
4 changes: 2 additions & 2 deletions docs/api-reference/page/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ document.Page(page =>

You can apply a default text style to every text element within a page.
This is particularly helpful for setting consistent fonts, sizes, and colors across your document:
[Learn more](/api-reference/text/style-inheritance)
[Learn more](/api-reference/text/style-inheritance.md)

```csharp
document.Page(page =>
Expand All @@ -141,7 +141,7 @@ document.Page(page =>

QuestPDF supports both left-to-right (LTR) and right-to-left (RTL) layouts to accommodate languages with different reading directions.
This option applies a global content direction to the entire page set.
[Learn more](/api-reference/content-direction)
[Learn more](/api-reference/content-direction.md)

```csharp
document.Page(page =>
Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/row.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ the items will occupy sizes of 15 points, 75 points, and 10 points respectively.
|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **ConstantItem** | Adds a new item to the row element with a specified constant size. |
| **RelativeItem** | Adds a new item to the row element. This item occupies space proportionally to other relative items. |
| **AutoItem** | Adds a new item to the row element. It requests as much horizontal space as its content requires. **Warning**: It doesn't adjust its size based on other items and may frequently result in layout exceptions. It is recommended to use this API in conjunction with the [MaxWidth](/api-reference/width) element. |
| **AutoItem** | Adds a new item to the row element. It requests as much horizontal space as its content requires. **Warning**: It doesn't adjust its size based on other items and may frequently result in layout exceptions. It is recommended to use this API in conjunction with the [MaxWidth](/api-reference/width.md) element. |

For ConstantItem, you can optionally specify the unit value (default is `Unit.Point`).

Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/show-entire.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Ensure that the enclosed content fits within a single page to avoid errors.
:::

::: tip
Please consider using a less-strict alternative, [EnsureSpace](/api-reference/ensure-space), if you want to maintain visual consistency without enforcing a hard page constraint.
Please consider using a less-strict alternative, [EnsureSpace](/api-reference/ensure-space.md), if you want to maintain visual consistency without enforcing a hard page constraint.
:::


Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/stop-paging.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Renders the element exclusively on the first page.
Any portion of the element that doesn't fit is omitted.

::: tip
If your goal is to limit the content to a specific area, please consider using other approaches: [Text Clamp Lines](/api-reference/text/paragraph-style#clamp-line-with-ellipsis) and [Scale to Fit](/api-reference/scale-to-fit).
If your goal is to limit the content to a specific area, please consider using other approaches: [Text Clamp Lines](/api-reference/text/paragraph-style.md#clamp-line-with-ellipsis) and [Scale to Fit](/api-reference/scale-to-fit.md).
:::

## Example
Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/text/font-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Document.Create(document =>
});
```

Learn more in the [font fallback](/api-reference/text/text-style#font-fallback) section.
Learn more in the [font fallback](/api-reference/text/text-style.md#font-fallback) section.


## Missing font families
Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/text/page-numbers.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Document.Create(document =>
The following methods allow you to display page numbers relative to a specific section of the document.

::: tip
[Section](/api-reference/section) defines part of the document that can be further referenced by name, e.g. for page numbering or linking.
[Section](/api-reference/section.md) defines part of the document that can be further referenced by name, e.g. for page numbering or linking.
:::

#### Available methods
Expand Down
6 changes: 3 additions & 3 deletions docs/api-reference/text/text-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ It's worth noting that different fonts may render text with different visual siz

A font family is a collection of related fonts that share a consistent design style but may vary in weight, style, or width.

Examples of font families include Lato, Noto Serif and JetBrains Mono. Fonts other than the built-in Lato must be available to your application, see [font management](/api-reference/text/font-management).
Examples of font families include Lato, Noto Serif and JetBrains Mono. Fonts other than the built-in Lato must be available to your application, see [font management](/api-reference/text/font-management.md).

```csharp{8,11}
.Column(column =>
Expand Down Expand Up @@ -77,8 +77,8 @@ container
![example](/api-reference/text-font-fallback-emoji.webp)

::: tip
Rather than repeating the fallback list on every text element, configure it once in the [default text style](/api-reference/default-text-style) of the page or document.
Learn more in the [font management](/api-reference/text/font-management#covering-additional-languages) section.
Rather than repeating the fallback list on every text element, configure it once in the [default text style](/api-reference/default-text-style.md) of the page or document.
Learn more in the [font management](/api-reference/text/font-management.md#covering-additional-languages) section.
:::

## Font Color
Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/tip-color.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
::: tip
Learn more about supported color formats and predefined color palettes in the [Colors](/concepts/colors) section.
Learn more about supported color formats and predefined color palettes in the [Colors](/concepts/colors.md) section.
:::
2 changes: 1 addition & 1 deletion docs/api-reference/tip-debugging.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
::: tip
For enhanced development and debugging experience, please consider using [the QuestPDF Companion App](/companion/usage).
For enhanced development and debugging experience, please consider using [the QuestPDF Companion App](/companion/usage.md).
:::
2 changes: 1 addition & 1 deletion docs/api-reference/tip-unit.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
::: tip
Learn more about supported units in the [Lenght unit types](/concepts/length-unit-types) section.
Learn more about supported units in the [Length unit types](/concepts/length-unit-types.md) section.
:::
4 changes: 2 additions & 2 deletions docs/companion/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Get real-time results without the need of code recompilation. Save time and enjo
![Application screenshot](/companion/application-dark.webp){.companion-screenshot .dark-only}

:::info
Read more about features availble in the Companion App in the [Features](/companion/features) section.
Read more about features availble in the Companion App in the [Features](/companion/features.md) section.
:::


Expand All @@ -27,7 +27,7 @@ The Companion App is available for download on Windows, MacOS, and Linux.
| Linux Fedora | [Download](https://github.com/QuestPDF/QuestPDF.Companion/releases/download/2026.2.2/questpdf_companion-2026.2.2-linux.rpm) |

:::info
To access older versions of the Companion App, visit the [Download](/companion/download) section.
To access older versions of the Companion App, visit the [Download](/companion/download.md) section.
:::


Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/colors.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ You can also omit the hash sign (`#`) at the beginning of the color code.


::: warning
Please be aware that in some software the alpha channel is specified at the end of the color code, e.g. `#RRGGBBAA`. This includes the SVG renderer used by QuestPDF: in SVG markup, use `fill-opacity` instead (see [SVG Support](/api-reference/image/svg#limitations)).
Please be aware that in some software the alpha channel is specified at the end of the color code, e.g. `#RRGGBBAA`. This includes the SVG renderer used by QuestPDF: in SVG markup, use `fill-opacity` instead (see [SVG Support](/api-reference/image/svg.md#limitations)).
:::

## Examples
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/merging-documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Choose the one that best suits your needs.

::: warning
This feature can be used only while generating PDF documents.
To merge existing files, please use the [Document Operations](/concepts/document-operations) feature.
To merge existing files, please use the [Document Operations](/concepts/document-operations.md) feature.
:::


Expand Down
2 changes: 1 addition & 1 deletion docs/document-previewer.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Document previewer

::: danger LEGACY TOOL
The QuestPDF Previewer has been replaced by the [Companion App](/companion/usage), introduced in version 2024.10.
The QuestPDF Previewer has been replaced by the [Companion App](/companion/usage.md), introduced in version 2024.10.

This page is kept for users of older library versions. If you are using QuestPDF 2024.10 or newer, please use the Companion App instead — the Previewer is no longer maintained and does not support features added since 2024.10.

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/custom-header-on-first-page.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Customizing Header/Footer on the first page

A common requirement in document design is to create a distinct header for the first page, with all subsequent pages sharing a standard header format.
This can be easily accomplished using the [ShowOnce](/api-reference/show-once) and [SkipOnce](/api-reference/skip-once) elements in QuestPDF.
This can be easily accomplished using the [ShowOnce](/api-reference/show-once.md) and [SkipOnce](/api-reference/skip-once.md) elements in QuestPDF.

```csharp{10-15}
Document
Expand Down
2 changes: 1 addition & 1 deletion docs/invoice-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ By the end, you'll have a fully functional, paginated invoice generator that loo
![invoice](/getting-started/invoice.png)

::: tip INSTALLATION
Before starting this tutorial, please familiarize yourself with [the Quick Start tutorial](/quick-start).
Before starting this tutorial, please familiarize yourself with [the Quick Start tutorial](/quick-start.md).
It will guide you through the installation process and provide a basic understanding of the library's architecture.
:::

Expand Down
2 changes: 1 addition & 1 deletion docs/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ For learning and evaluation, you can use the QuestPDF Evaluation license type.

## Are you ready for more?

QuestPDF's Fluent API scales seamlessly with your document complexity. To explore its full potential, check out [the In-Depth Invoice Tutorial](/invoice-tutorial), where you'll learn to create a professional invoice in less than 200 lines of code.
QuestPDF's Fluent API scales seamlessly with your document complexity. To explore its full potential, check out [the In-Depth Invoice Tutorial](/invoice-tutorial.md), where you'll learn to create a professional invoice in less than 200 lines of code.

![invoice](/getting-started/invoice.png)
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"image-size": "^2.0.4",
"sass": "^1.105.2",
"vitepress": "^2.0.0-alpha.21",
"vitepress-plugin-llms": "^1.13.5",
"vitepress-plugin-llms": "^1.14.0",
"vue": "3.5.44"
},
"scripts": {
Expand Down
Loading