{"name":"QuestPDF: Modern C# Library for Fluent PDF Document Generation","description":"QuestPDF is a modern C# library for generating PDF documents with a fluent and readable API. It enables developers to design complex layouts using a flexible, component-based approach, avoiding common HTML-to-PDF conversion issues. Ideal for reports, invoices, and exports, QuestPDF offers extensive features and enterprise-grade foundations.","github":"https://github.com/QuestPDF/QuestPDF","url":"https://osrepos.com/repo/questpdf-questpdf","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/questpdf-questpdf","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/questpdf-questpdf.md","json":"https://osrepos.com/repo/questpdf-questpdf.json","topics":["c-sharp","pdf-generation","dotnet","library","reporting","invoice","document-automation","nuget"],"keywords":["c-sharp","pdf-generation","dotnet","library","reporting","invoice","document-automation","nuget"],"stars":null,"summary":"QuestPDF is a modern C# library for generating PDF documents with a fluent and readable API. It enables developers to design complex layouts using a flexible, component-based approach, avoiding common HTML-to-PDF conversion issues. Ideal for reports, invoices, and exports, QuestPDF offers extensive features and enterprise-grade foundations.","content":"## Introduction\n\nQuestPDF is a powerful and modern C# library that simplifies the process of generating PDF documents. Designed with a fluent API, it allows developers to create complex layouts and pixel-perfect reports, invoices, and exports using clean, maintainable C# code. This approach eliminates the common challenges associated with HTML-to-PDF conversions, providing a robust and predictable way to build documents. With over 14,000 stars on GitHub, QuestPDF is a highly regarded solution in the .NET ecosystem.\n\nExplore the project on [GitHub](https://github.com/QuestPDF/QuestPDF \"QuestPDF GitHub Repository\" target=\"_blank\").\n\n## Installation\n\nGetting started with QuestPDF is straightforward, as it's available as a NuGet package. You can install it using your preferred IDE or via the .NET CLI.\n\nTo install using the .NET CLI, run the following command in your terminal:\n\nbash\ndotnet add package QuestPDF\n\n\nFor detailed installation guides for Visual Studio, VS Code, or JetBrains Rider, please refer to the [official documentation](https://www.questpdf.com/quick-start.html \"QuestPDF Quick Start Guide\" target=\"_blank\").\n\n## Examples\n\nQuestPDF's fluent API makes document design intuitive. Here's a quick example demonstrating how to create a basic PDF document:\n\ncsharp\nusing QuestPDF.Fluent;\nusing QuestPDF.Helpers;\nusing QuestPDF.Infrastructure;\n\n// set your license here:\n// QuestPDF.Settings.License = LicenseType.Community;\n\nDocument.Create(container =>\n{\n    container.Page(page =>\n    {\n        page.Size(PageSizes.A4);\n        page.Margin(2, Unit.Centimetre);\n        page.PageColor(Colors.White);\n        page.DefaultTextStyle(x => x.FontSize(20));\n        \n        page.Header()\n            .Text(\"Hello PDF!\")\n            .SemiBold().FontSize(36).FontColor(Colors.Blue.Medium);\n        \n        page.Content()\n            .PaddingVertical(1, Unit.Centimetre)\n            .Column(x =>\n            {\n                x.Spacing(20);\n                \n                x.Item().Text(Placeholders.LoremIpsum());\n                x.Item().Image(Placeholders.Image(200, 100));\n            });\n        \n        page.Footer()\n            .AlignCenter()\n            .Text(x =>\n            {\n                x.Span(\"Page \");\n                x.CurrentPageNumber();\n            });\n    });\n})\n.GeneratePdf(\"hello.pdf\");\n\n\nThis code snippet generates a simple PDF document with a header, content, and footer. For a more in-depth guide, check out the [Quick Start tutorial](https://www.questpdf.com/quick-start.html \"QuestPDF Quick Start Tutorial\" target=\"_blank\").\n\n## Why Use QuestPDF?\n\nQuestPDF offers a compelling solution for PDF generation due to its comprehensive feature set and developer-friendly approach:\n\n*   **Fluent C# API**: Design documents using familiar C# patterns, leveraging IntelliSense and robust refactoring capabilities.\n*   **Rich Layout and Styling**: Access a wide array of visual elements, layout controls (tables, lists, columns), and positional adjustments to create any document complexity.\n*   **Enterprise-Grade Foundations**: Benefit from predictable development, source-available code, complete data privacy, high performance, and optimized file sizes.\n*   **Advanced PDF Operations**: Easily merge documents, attach files, extract pages, encrypt/decrypt, and extend metadata using a powerful Fluent API.\n*   **Cross-Platform Compatibility**: Deploy your applications on Windows, Linux, macOS, and integrate seamlessly with .NET 6+, .NET Framework 4.6.2+, and various cloud platforms and containers.\n*   **Industry-Standard Compliance**: Generate PDFs that meet strict archival (PDF/A) and accessibility (PDF/UA) requirements, validated using open-source tools.\n*   **Sustainable Licensing**: A fair model that offers a free tier for individuals, non-profits, and FOSS projects, alongside commercial options for businesses.\n*   **Companion App**: Accelerate development with a live document preview and hot-reload capability, aiding in debugging and layout adjustments.\n\nQuestPDF is built to provide full control over document structure and precise content positioning, making it a reliable choice for any PDF generation need.\n\n## Links\n\n*   [Official Website](https://www.questpdf.com \"QuestPDF Official Website\" target=\"_blank\")\n*   [GitHub Repository](https://github.com/QuestPDF/QuestPDF \"QuestPDF GitHub Repository\" target=\"_blank\")\n*   [Quick Start Guide](https://www.questpdf.com/quick-start.html \"QuestPDF Quick Start Guide\" target=\"_blank\")\n*   [Features Overview](https://www.questpdf.com/features-overview.html \"QuestPDF Features Overview\" target=\"_blank\")\n*   [Invoice Tutorial](https://www.questpdf.com/invoice-tutorial.html \"QuestPDF Invoice Tutorial\" target=\"_blank\")\n*   [NuGet Package](https://www.nuget.org/packages/QuestPDF \"QuestPDF NuGet Package\" target=\"_blank\")\n*   [Licensing Information](https://www.questpdf.com/license/ \"QuestPDF Licensing Information\" target=\"_blank\")","metrics":{"detailViews":2,"githubClicks":0},"dates":{"published":null,"modified":"2026-06-19T08:18:04.000Z"}}