diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 49eb26e..5203d1e 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -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) @@ -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: [ diff --git a/docs/.vitepress/llms-txt-template.md b/docs/.vitepress/llms-txt-template.md new file mode 100644 index 0000000..2e8e41e --- /dev/null +++ b/docs/.vitepress/llms-txt-template.md @@ -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} diff --git a/docs/api-reference/image/svg.md b/docs/api-reference/image/svg.md index 82bcef7..45e2511 100644 --- a/docs/api-reference/image/svg.md +++ b/docs/api-reference/image/svg.md @@ -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 diff --git a/docs/api-reference/layers.md b/docs/api-reference/layers.md index eed48b1..a7c32c0 100644 --- a/docs/api-reference/layers.md +++ b/docs/api-reference/layers.md @@ -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 | |------------------|--------------------------------------------------| diff --git a/docs/api-reference/page/settings.md b/docs/api-reference/page/settings.md index d4eab0f..cc98865 100644 --- a/docs/api-reference/page/settings.md +++ b/docs/api-reference/page/settings.md @@ -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 => @@ -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 => diff --git a/docs/api-reference/row.md b/docs/api-reference/row.md index 55d45f9..22795eb 100644 --- a/docs/api-reference/row.md +++ b/docs/api-reference/row.md @@ -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`). diff --git a/docs/api-reference/show-entire.md b/docs/api-reference/show-entire.md index b4309a4..b500e0f 100644 --- a/docs/api-reference/show-entire.md +++ b/docs/api-reference/show-entire.md @@ -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. ::: diff --git a/docs/api-reference/stop-paging.md b/docs/api-reference/stop-paging.md index b74a604..1b89081 100644 --- a/docs/api-reference/stop-paging.md +++ b/docs/api-reference/stop-paging.md @@ -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 diff --git a/docs/api-reference/text/font-management.md b/docs/api-reference/text/font-management.md index e6d0660..40a99d9 100644 --- a/docs/api-reference/text/font-management.md +++ b/docs/api-reference/text/font-management.md @@ -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 diff --git a/docs/api-reference/text/page-numbers.md b/docs/api-reference/text/page-numbers.md index d0eb6c8..9743feb 100644 --- a/docs/api-reference/text/page-numbers.md +++ b/docs/api-reference/text/page-numbers.md @@ -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 diff --git a/docs/api-reference/text/text-style.md b/docs/api-reference/text/text-style.md index be35fa1..a5285a7 100644 --- a/docs/api-reference/text/text-style.md +++ b/docs/api-reference/text/text-style.md @@ -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 => @@ -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 diff --git a/docs/api-reference/tip-color.md b/docs/api-reference/tip-color.md index a2e351c..837a73c 100644 --- a/docs/api-reference/tip-color.md +++ b/docs/api-reference/tip-color.md @@ -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. ::: diff --git a/docs/api-reference/tip-debugging.md b/docs/api-reference/tip-debugging.md index 3c2cd18..d87d213 100644 --- a/docs/api-reference/tip-debugging.md +++ b/docs/api-reference/tip-debugging.md @@ -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). ::: diff --git a/docs/api-reference/tip-unit.md b/docs/api-reference/tip-unit.md index 6ead398..c19e808 100644 --- a/docs/api-reference/tip-unit.md +++ b/docs/api-reference/tip-unit.md @@ -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. ::: diff --git a/docs/companion/usage.md b/docs/companion/usage.md index 094b620..388dd29 100644 --- a/docs/companion/usage.md +++ b/docs/companion/usage.md @@ -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. ::: @@ -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. ::: diff --git a/docs/concepts/colors.md b/docs/concepts/colors.md index 78bd0d7..e684a5e 100644 --- a/docs/concepts/colors.md +++ b/docs/concepts/colors.md @@ -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 diff --git a/docs/concepts/merging-documents.md b/docs/concepts/merging-documents.md index 3a393cb..21be457 100644 --- a/docs/concepts/merging-documents.md +++ b/docs/concepts/merging-documents.md @@ -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. ::: diff --git a/docs/document-previewer.md b/docs/document-previewer.md index 12ec490..d9e1eea 100644 --- a/docs/document-previewer.md +++ b/docs/document-previewer.md @@ -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. diff --git a/docs/examples/custom-header-on-first-page.md b/docs/examples/custom-header-on-first-page.md index e48c6ec..7e4b3ef 100644 --- a/docs/examples/custom-header-on-first-page.md +++ b/docs/examples/custom-header-on-first-page.md @@ -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 diff --git a/docs/invoice-tutorial.md b/docs/invoice-tutorial.md index 5713dd4..c1d7064 100644 --- a/docs/invoice-tutorial.md +++ b/docs/invoice-tutorial.md @@ -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. ::: diff --git a/docs/quick-start.md b/docs/quick-start.md index ab54240..c2880a5 100644 --- a/docs/quick-start.md +++ b/docs/quick-start.md @@ -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) diff --git a/package-lock.json b/package-lock.json index 14e2f67..1ebb720 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,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" }, "engines": { @@ -3572,9 +3572,9 @@ } }, "node_modules/vitepress-plugin-llms": { - "version": "1.13.5", - "resolved": "https://registry.npmjs.org/vitepress-plugin-llms/-/vitepress-plugin-llms-1.13.5.tgz", - "integrity": "sha512-CTiDkKRs0h64J5rdiICdHmXH4pM1gBu2S/MJ+OxSAm+vM72srBkHr86ZubzfMJbGJh4AMVKff4R3oCu8etI1ww==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/vitepress-plugin-llms/-/vitepress-plugin-llms-1.14.0.tgz", + "integrity": "sha512-Qb42p9pYoRlMRbv+Yvh3reS4GInyr+ToU3G1tEC1Euz+gyBNywXkZIQPV/AoltizaakAeuI89Bkhkd7Y0jaM/w==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index e3a9fca..f60bd2a 100644 --- a/package.json +++ b/package.json @@ -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": {