Skip to content
Closed
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
31 changes: 30 additions & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@ import imageSizePlugin from "./markdownit-imagesize-plugin";

const isProd = process.env.NODE_ENV === 'production';

const llmsTxtHeader = `# QuestPDF

> C# library for generating PDF documents with a fluent, code-first API.
> Layout engine with automatic paging: tables, headers and footers, page numbers, images, SVG, barcodes.

## About

- Install: \`dotnet add package QuestPDF\`. Select a license at application startup: \`QuestPDF.Settings.License = LicenseType.Community;\`
- License: free for individuals, non-profits, all FOSS projects, and organizations under $1M in annual revenue; otherwise Professional or Enterprise.
Details: [Pricing](https://www.questpdf.com/pricing.html), [License Selection Guide](https://www.questpdf.com/license/guide.html), [Community License](https://www.questpdf.com/license/community.html), [Professional / Enterprise License](https://www.questpdf.com/license/professional-enterprise.html).
Binding terms: [LICENSE.md](https://github.com/QuestPDF/QuestPDF/blob/main/LICENSE.md)
- What QuestPDF can do: [Features Overview](https://www.questpdf.com/features-overview.html)
- Policies: [Security](https://www.questpdf.com/security-policy.html), [Privacy](https://www.questpdf.com/privacy-policy.html), [Terms of Service](https://www.questpdf.com/terms-of-service.html)
- Start here: [Quick start](/quick-start.md), then [In-Depth Invoice Tutorial](/invoice-tutorial.md)
- Everything in one file: [llms-full.txt](/llms-full.txt)

## Table of Contents

{toc}`;

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

vite: {
plugins: [llmstxt()]
plugins: [llmstxt({
customLLMsTxtTemplate: llmsTxtHeader,
ignoreFilesPerOutput: {
llmsTxt: [
'api-reference/tip-*.md',
'license.md', 'license/community.md', 'license/guide.md', 'license/professional-enterprise.md', 'license/purchase-success.md',
'pricing.md', 'features-overview.md', 'contact.md', 'privacy-policy.md', 'security-policy.md', 'terms-of-service.md',
],
},
})]
},

head: [
Expand Down
4 changes: 4 additions & 0 deletions docs/acknowledgements.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Third-party libraries QuestPDF builds on and their licenses."
---

# Acknowledgements

::: details Six Labors
Expand Down
1 change: 1 addition & 0 deletions docs/api-reference/alignment.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
outline: false
description: "Position content in the available space: `AlignLeft`, `AlignCenter`, `AlignRight` and `AlignTop`, `AlignMiddle`, `AlignBottom`."
---


Expand Down
1 change: 1 addition & 0 deletions docs/api-reference/aspect-ratio.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
outline: false
description: "`AspectRatio`: keep a width-to-height ratio, fitting the available width by default (or height, or area)."
---


Expand Down
1 change: 1 addition & 0 deletions docs/api-reference/background.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
outline: false
description: "Solid color or linear gradient behind content (`Background`, `BackgroundLinearGradient`); combines with rounded corners."
---

# Background
Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/barcodes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Barcodes and QR codes are not built in: generate them with a barcode library and embed the result as SVG via `Svg(size => ...)`; examples use ZXing.Net."
---

# Barcodes

QuestPDF provides robust support for generating various types of barcodes in your PDF documents through integration with the ZXing.Net library.
Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/border.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Borders on all or selected sides: thickness, color, gradient, alignment (inside, middle, outside); combines with rounded corners."
---

# Border

You can use borders to create visual separation between elements in your document.
Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/charts.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Charts are not built in: draw them with a charting library and embed the result as SVG via `Svg(size => ...)`; examples use ScottPlot (pie and bar)."
---

# Charts

QuestPDF integrates seamlessly with the ScottPlot library to provide powerful charting capabilities in your PDF documents.
Expand Down
1 change: 1 addition & 0 deletions docs/api-reference/column.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
outline: false
description: "`Column`: stack items vertically with optional `Spacing`; items flow onto the next page when needed."
---


Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/complex-graphics.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Custom shapes beyond built-in elements (rounded gradient rectangle, dotted line) drawn as SVG sized to the available space."
---

# Complex Graphics

QuestPDF supports various built-in drawing capabilities, but there may be times when you need to include more sophisticated or custom graphics in your PDF.
Expand Down
1 change: 1 addition & 0 deletions docs/api-reference/content-direction.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
outline: false
description: "`ContentFromLeftToRight` (default) and `ContentFromRightToLeft` for RTL languages; affects text alignment, wrapping, and the order of items in rows and tables."
---


Expand Down
1 change: 1 addition & 0 deletions docs/api-reference/debug-area.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
outline: false
description: "`DebugArea(label, color)` draws a labeled box around content to inspect spacing and alignment during development."
---


Expand Down
1 change: 1 addition & 0 deletions docs/api-reference/debug-pointer.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
outline: false
description: "`DebugPointer(label)` adds a named marker visible only in the Companion App hierarchy and in layout exception traces, not in the PDF."
---


Expand Down
1 change: 1 addition & 0 deletions docs/api-reference/decoration.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
outline: false
description: "`Decoration`: content with a `Before` and `After` section that repeat on every page the content spans, e.g. a table caption on each page."
---


Expand Down
1 change: 1 addition & 0 deletions docs/api-reference/default-text-style.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
outline: false
description: "`DefaultTextStyle` applies a text style to all nested text; it extends existing styles, and later calls can override it."
---


Expand Down
1 change: 1 addition & 0 deletions docs/api-reference/ensure-space.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
outline: false
description: "`EnsureSpace(minHeight)` (default 150 points): move content to the next page unless at least that much fits on the current one; applies only to its first page. Wrap a heading together with the start of what follows to keep them together."
---


Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/extend.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "`Extend`, `ExtendVertical`, `ExtendHorizontal`: make content fill all available space."
---

# Extend

| Method | Description |
Expand Down
1 change: 1 addition & 0 deletions docs/api-reference/flip.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
outline: false
description: "`FlipHorizontal`, `FlipVertical`, `FlipOver`: mirror content along one or both axes."
---


Expand Down
1 change: 1 addition & 0 deletions docs/api-reference/height.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
outline: false
description: "`Height`, `MinHeight`, `MaxHeight`: constrain the vertical size of content; impossible constraints (e.g. taller than the available space) throw a layout exception."
---


Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/hyperlink.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "`Hyperlink(url)` makes any content clickable (text, images, other elements); also usable inside text."
---

# Hyperlink

The Hyperlink element creates a clickable area that redirects the user to a designated webpage.
Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/image/basics.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Embed JPEG, PNG, BMP or WEBP images; the aspect ratio is kept by default; scaling with `FitWidth`, `FitHeight`, `FitArea`, `FitUnproportionally`. Files loaded by relative path must be copied to the output directory."
---

# Image

Use this element to embed images into your document. By default, it preserves the image's original aspect ratio, ensuring that your visuals remain undistorted.
Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/image/dynamic.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Generate an image at the exact size of its slot: a delegate receives the available space and returns image bytes; useful for charts and maps."
---

# Dynamic Images

QuestPDF provides flexible layouts, which means the optimal image resolution cannot always be determined in advance.
Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/image/optimization.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Reduce PDF size with `WithCompressionQuality` and `WithRasterDpi`, per image or globally in `DocumentSettings`, or keep the source with `UseOriginalImage`."
---

# Optimization

Images can be a significant factor in the file size of your PDF documents.
Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/image/shared.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Load an image once with `Image.FromFile` and reuse it across many placements; since 2025.4.0 images loaded by file path are also cached automatically."
---

# Shared Images

When generating a PDF with multiple items that use the same image, processing the image repeatedly can negatively affect both performance and the final file size.
Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/image/svg.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Draw SVG from a file path or markup, or preload it with `SvgImage.FromFile`; SVG always keeps its aspect ratio; text in SVG uses fonts available to QuestPDF, and a missing font or glyph there does not throw."
---

# SVG Support

QuestPDF supports SVG images, allowing you to integrate scalable vector graphics just as you would with raster images.
Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/inlined.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "`Inlined`: items in a line that wraps to the next line when full (tags, chips), with spacing and horizontal and baseline alignment."
---

# Inlined

The Inlined component arranges elements sequentially in a line, automatically wrapping to the next line when needed.
Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/layers.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "`Layers`: content under or over the main layer, with exactly one `PrimaryLayer`; layers defined before it are drawn underneath, after it on top. Extra layers are not repeated on every page; for a watermark or background on every page, use `page.Foreground()` or `page.Background()`."
---

# Layers

The Layers element adds content either underneath (as a background) or on top of (as a watermark) the main content.
Expand Down
1 change: 1 addition & 0 deletions docs/api-reference/lazy.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
outline: false
description: "`Lazy` and `LazyWithCache` build content only when it is rendered, to cut memory use in documents with thousands of pages (`LazyWithCache` is faster but uses more native memory)."
---


Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/line.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Horizontal and vertical lines (`LineHorizontal`, `LineVertical`) with thickness, color, gradient and dash pattern (the pattern array length must be even)."
---

# Line

The Line component allows you to render simple yet customizable vertical and horizontal lines within your layout.
Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/lists.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "There is no list element: build bullet, numbered and nested lists from `Column` and `Row`."
---

# Ordered and bullet lists

Lists are an essential part of structured documents, helping to present information in an organized and easy-to-read format.
Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/maps.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Embed static maps from the Mapbox Static Maps API (paid service with a free tier) as images; use your own access token and fetch the map before generating the document, not during it."
---

# Maps

QuestPDF provides seamless integration with Mapbox Static Maps API, allowing you to embed high-quality, customizable maps into your PDF documents.
Expand Down
1 change: 1 addition & 0 deletions docs/api-reference/multi-column.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
outline: false
description: "`MultiColumn`: newspaper-style columns; content fills columns left to right, then continues on the next page; `BalanceHeight` evens out the last page; costly to compute."
---


Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/offset.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "`OffsetX`, `OffsetY`: move content visually without changing its layout size (replaces the obsolete `TranslateX`, `TranslateY`)."
---

# Offset

This container allows you to precisely position content by moving it horizontally and vertically relative to its original position, independent of layout constraints.
Expand Down
1 change: 1 addition & 0 deletions docs/api-reference/padding.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
outline: false
description: "`Padding` and per-side variants (`PaddingHorizontal`, `PaddingTop`, …) add space around content; negative values push content beyond its edges."
---


Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/page-break.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "`PageBreak()`: start the following content on a new page, e.g. one section per page."
---

# Page break

The Page Break feature allows you to control the layout of your document by forcing content to start on a new page.
Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/page/basics.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "A minimal page with margins, header, content and footer; the starting point for every document."
---

# Page

This container allows you to define your page layout by configuring margins, watermarks, and different content sections such as header, footer, and the main content area.
Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/page/settings.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Page size (presets such as `PageSizes.A4.Landscape()`, custom, continuous or flexible height), margins, page color, default text style, content direction, and several page setups in one document."
---

# Page Settings

This section describes how to configure the page settings in your document.
Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/page/slots.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "`Header` and `Footer` appear on every page and must fit on it; `Content` flows across pages and sets the page count; `Background` and `Foreground` cover the whole page behind or in front of them, ignoring margins (e.g. a watermark)."
---

# Page Slots

The Page container is a multi-child container that allows you to define the layout of the page.
Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/placeholder.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "`Placeholder()`: a box with an icon or label for sketching a layout before content exists."
---

# Placeholder

The Placeholder element is a simple utility for prototyping and layout visualization.
Expand Down
1 change: 1 addition & 0 deletions docs/api-reference/prevent-page-break.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
outline: false
description: "`PreventPageBreak`: if the content doesn't fit in the rest of the page, move it to the next one; if it is taller than a page, it still splits there. On table cells it tears rows apart: to keep a row together, use `ShowEntire` on every cell."
---


Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/repeat.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "`Repeat`: draw the content again on every page its container spans (e.g. a term label next to a long definition)."
---

# Repeat

When designing a document, you may need certain elements—such as headers, footers, labels, or key terms—to be visible on every page where applicable.
Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/rotate.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "`RotateLayoutClockwise` and `RotateLayoutCounterclockwise` turn content by 90° and swap width and height; `Rotate(angle)` turns it freely around its center."
---

# Rotate

## Constrained
Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/rounded-corners.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "`CornerRadius` for all corners or each corner separately; it also clips the content, e.g. a photo inside a card."
---

# Rounded Corners

Rounded corners can be applied to containers to create visually appealing designs.
Expand Down
1 change: 1 addition & 0 deletions docs/api-reference/row.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
outline: false
description: "`Row`: place items side by side as `RelativeItem`, `ConstantItem` or `AutoItem`, with spacing; for items that should wrap to the next line, use `Inlined`."
---


Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/scale-to-fit.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "`ScaleToFit`: shrink content proportionally until it fits the available space; costly for complex content and can still fail with fixed sizes or aspect ratios."
---

# Scale to fit

This container dynamically adjusts its content to fit within the available space by proportionally scaling it down if necessary.
Expand Down
1 change: 1 addition & 0 deletions docs/api-reference/scale.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
outline: false
description: "`Scale`, `ScaleHorizontal`, `ScaleVertical`: enlarge or shrink content by a factor (squeeze or stretch on one axis)."
---


Expand Down
4 changes: 4 additions & 0 deletions docs/api-reference/section.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "`Section(\"name\")` marks a part of the document; `SectionLink(\"name\")` jumps to it, and section page numbers build a table of contents."
---

# Section

A **Section** defines a named fragment of a document that can span multiple pages.
Expand Down
Loading
Loading