|
|
@@ -9,86 +9,133 @@
|
|
|
[](https://github.com/QuestPDF/QuestPDF/stargazers)
|
|
|
[](https://www.nuget.org/packages/QuestPDF/)
|
|
|
[](https://www.nuget.org/packages/QuestPDF/)
|
|
|
-[](https://www.questpdf.com/pricing.html)
|
|
|
+[](https://www.questpdf.com/license/)
|
|
|
|
|
|
<br />
|
|
|
|
|
|
-
|
|
|
### QuestPDF is a modern open-source .NET library for PDF document generation. Offering comprehensive layout engine powered by concise and discoverable C# Fluent API.
|
|
|
|
|
|
-<img src="https://github.com/QuestPDF/QuestPDF-Documentation/blob/main/docs/public/previewer/animation.gif?raw=true" width="100%">
|
|
|
-
|
|
|
-<table>
|
|
|
-<tr>
|
|
|
- <td>👨💻</td>
|
|
|
- <td>Design PDF documents using C# and employ a code-only approach. Utilize your version control system to its fullest potential.</td>
|
|
|
-</tr>
|
|
|
-<tr>
|
|
|
- <td>🧱</td>
|
|
|
- <td>Compose PDF document with a range of powerful and predictable structural elements, such as text, image, border, table, and many more.</td>
|
|
|
-</tr>
|
|
|
-<tr>
|
|
|
- <td>⚙️</td>
|
|
|
- <td>Utilize a comprehensive layout engine, specifically designed for PDF document generation and paging support.</td>
|
|
|
-</tr>
|
|
|
-<tr>
|
|
|
- <td>📖</td>
|
|
|
- <td>Write code using concise and easy-to-understand C# Fluent API. Utilize IntelliSense to quickly discover available options.</td>
|
|
|
-</tr>
|
|
|
-<tr>
|
|
|
- <td>🔗</td>
|
|
|
- <td>Don't be limited to any proprietary scripting language or format. Follow your experience and leverage all modern C# features.</td>
|
|
|
-</tr>
|
|
|
-<tr>
|
|
|
- <td>⌛</td>
|
|
|
- <td>Save time thanks to a hot-reload capability, allowing real-time PDF document preview without code recompilation.</td>
|
|
|
-</tr>
|
|
|
-</table>
|
|
|
+https://github.com/user-attachments/assets/a674c413-34c4-47b5-b559-f279b1bf46c0
|
|
|
|
|
|
<br />
|
|
|
-
|
|
|
<br />
|
|
|
-
|
|
|
+<br />
|
|
|
|
|
|
## Please help by giving a star
|
|
|
|
|
|
-Choosing a project dependency could be difficult. We need to ensure stability and maintainability of our projects. Surveys show that GitHub stars count play an important factor when assessing library quality.
|
|
|
+GitHub stars guide developers toward great tools. If you find this project valuable, please give it a star – it helps the community and takes just a second! ⭐
|
|
|
|
|
|
-⭐ Please give this repository a star. It takes seconds and help thousands of developers! ⭐
|
|
|
-
|
|
|
-<img src="https://github.com/user-attachments/assets/9aa3bd4f-a061-42bd-9fe9-0a2ddc48ba1d" width="700" />
|
|
|
+<img src="https://github.com/user-attachments/assets/10aa9123-c395-4dc9-8977-aa9531e07227" width="700" />
|
|
|
|
|
|
+<br />
|
|
|
|
|
|
## QuestPDF Companion App
|
|
|
|
|
|
-The QuestPDF Companion application is a tool designed to simplify and speed up your development lifecycle. First, it shows a preview of your document. But the real magic starts with the hot-reload capability! It observes your code and updates the preview every time you change the implementation. Get real-time results without the need of code recompilation. Save time and enjoy the task!
|
|
|
+Accelerate your development with live document preview powered by the hot-reload capability, eliminating the need for code recompilation:
|
|
|
+- Explore document structure and hierarchy
|
|
|
+- Quickly magnify and measure content
|
|
|
+- Debug runtime exceptions with stack traces and code snippets
|
|
|
+- Identify, understand and solve layout errors
|
|
|
|
|
|
<picture>
|
|
|
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/7ab596d4-eebc-44e6-b36d-c358b16ed0ba">
|
|
|
<source media="(prefers-color-scheme: light)" srcset="https://github.com/user-attachments/assets/39d4c08c-6a78-4743-8837-208c0c1718fd">
|
|
|
- <img src="https://github.com/user-attachments/assets/ce394258-1f10-498d-b65f-26c9fbed2994">
|
|
|
+ <img src="https://github.com/user-attachments/assets/ce394258-1f10-498d-b65f-26c9fbed2994" width="600">
|
|
|
</picture>
|
|
|
|
|
|
[](https://www.questpdf.com/companion/features.html)
|
|
|
|
|
|
+<br />
|
|
|
|
|
|
-## Please share with the community
|
|
|
+## What you need is here
|
|
|
|
|
|
-As an open-source project without funding, I cannot afford advertising QuestPDF in a typical way. Instead, the library relies on community interactions. Please consider sharing a post about QuestPDF and the value it provides. It really does help!
|
|
|
+`Comprehensive Layout Engine` - A layout engine tailored for document generation, offering advanced paging and precise content control.
|
|
|
|
|
|
-[](https://reddit.com/submit?url=https://github.com/QuestPDF/QuestPDF&title=Check%20out%20QuestPDF%20%F0%9F%8E%8A%20a%20modern%20open-source%20.NET%20library%20%20for%20PDF%20document%20generation%20%F0%9F%9A%80)
|
|
|
-[](https://twitter.com/share?url=https://github.com/QuestPDF/QuestPDF&text=Check%20out%20QuestPDF%20%F0%9F%8E%8A%20a%20modern%20open-source%20.NET%20library%20%20for%20PDF%20document%20generation%20%F0%9F%9A%80%20%23dotnet%20%23csharp%20%23questpdf)
|
|
|
-[](https://news.ycombinator.com/submitlink?u=https://github.com/QuestPDF/QuestPDF&t=QuestPDF%20-%20a%20modern%20open-source%20.NET%20library%20%20for%20PDF%20document%20generation)
|
|
|
-[](https://www.facebook.com/sharer/sharer.php?u=https://github.com/QuestPDF/QuestPDF)
|
|
|
+`Rich Toolkit` - Craft documents with intuitive, reusable components and over 50 layout elements for complex designs.
|
|
|
+
|
|
|
+`High Performance` - Generate thousands of pages per second with minimal CPU and memory usage.
|
|
|
+
|
|
|
+`Advanced Language Support` - Seamlessly create multilingual documents with support for RTL, text shaping, and bi-directional content.
|
|
|
|
|
|
<br />
|
|
|
|
|
|
+## Code-Focused Paradigm
|
|
|
|
|
|
-## Let's get started
|
|
|
+Using C# to design PDF documents leverages powerful control structures like if-statements, for-loops, and methods, enabling dynamic and highly customizable content generation.
|
|
|
+
|
|
|
+It promotes best practices such as modular design and reusability while seamlessly integrating with source control systems for collaboration and versioning.
|
|
|
+
|
|
|
+```csharp
|
|
|
+.Column(column =>
|
|
|
+{
|
|
|
+ if (Model.Comments != null)
|
|
|
+ column.Item().Text(Model.Comments);
|
|
|
+
|
|
|
+ foreach(var item in Model.Items)
|
|
|
+ column.Item().Element(c => CreateItem(c, item);
|
|
|
+});
|
|
|
+```
|
|
|
|
|
|
-Begin exploring the QuestPDF library today. You are 250 lines of C# code away from creating a fully functional PDF invoice implementation.
|
|
|
+```diff
|
|
|
+void CreateItem(IContainer container, Item item)
|
|
|
+{
|
|
|
+ container
|
|
|
+- .Background(Colors.Grey.Lighten2)
|
|
|
++ .Background(item.Color)
|
|
|
+ .Padding(10)
|
|
|
+ .Text(item.Text);
|
|
|
+}
|
|
|
+```
|
|
|
|
|
|
-Read the Getting Started tutorial to familiarize yourself with general library architecture, important layout structures as well as to better understand helpful patterns and practices. Easily start designing your PDF documents, reports, invoices and even more.
|
|
|
+<br />
|
|
|
+
|
|
|
+## Multiplatform
|
|
|
+
|
|
|
+The library supports all major operating systems, integrates seamlessly with leading IDEs as well as popular cloud platforms and technologies to ensure maximum flexibility.
|
|
|
+
|
|
|
+- `Technologies`: modern dotnet, legacy .NET Framework, Docker
|
|
|
+- `Operating systems`: Windows, Linux, MacOS
|
|
|
+- `Cloud providers`: Azure, AWS, Google Cloud
|
|
|
+- `IDE`: Visual Studio, Visual Code, JetBrains Rider, others
|
|
|
+
|
|
|
+<br />
|
|
|
+
|
|
|
+## Perform common PDF operations
|
|
|
+
|
|
|
+- Merge documents
|
|
|
+- Attach files
|
|
|
+- Extract pages
|
|
|
+- Encrypt / decrypt
|
|
|
+- Extend metadata
|
|
|
+- Limit access
|
|
|
+- Optimize for Web
|
|
|
+- Overlay / underlay
|
|
|
+
|
|
|
+```csharp
|
|
|
+DocumentOperation
|
|
|
+ .LoadFile("input.pdf")
|
|
|
+ .TakePages("1-10")
|
|
|
+ .MergeFile("appendix.pdf", "1-z") // all pages
|
|
|
+ .AddAttachment(new DocumentAttachment
|
|
|
+ {
|
|
|
+ FilePath = "metadata.xml"
|
|
|
+ })
|
|
|
+ .Encrypt(new Encryption256Bit
|
|
|
+ {
|
|
|
+ OwnerPassword = "mypassword",
|
|
|
+ AllowPrinting = true,
|
|
|
+ AllowContentExtraction = false
|
|
|
+ })
|
|
|
+ .Save("final-document.pdf");
|
|
|
+```
|
|
|
+
|
|
|
+[](https://www.questpdf.com/concepts/document-operations.html)
|
|
|
+
|
|
|
+<br />
|
|
|
+
|
|
|
+## Let's get started
|
|
|
+
|
|
|
+Follow our detailed tutorial, and see how easy it is to produce a fully functional invoice with fewer than 250 lines of C# code.
|
|
|
|
|
|
[](https://www.questpdf.com/getting-started.html)
|
|
|
|
|
|
@@ -97,13 +144,12 @@ Read the Getting Started tutorial to familiarize yourself with general library a
|
|
|
<br />
|
|
|
|
|
|
|
|
|
-## Library License
|
|
|
-
|
|
|
-We identify the importance of the library in your projects, so we want to ensure you can safely and confidently continue the development.
|
|
|
+## Sustainable and Fair License
|
|
|
|
|
|
-Being a healthy and growing community is the primary goal that motivates us to pursue professionalism.
|
|
|
+By offering free access to most users and premium licenses for larger organizations, the project maintains its commitment to excellence while ensuring sustainable, long-term development for all.
|
|
|
|
|
|
-The library is available for free to the vast majority of users. However, please look at the QuestPDF License and Pricing webpage for more details:
|
|
|
+> [!WARNING]
|
|
|
+> The library is free to use for any individual or business with less than 1 million USD annual gross revenue, or operates as a non-profit organization, or is a FOSS project.
|
|
|
|
|
|
[](https://www.questpdf.com/license/)
|
|
|
|