diff --git a/readme.md b/readme.md index 90c8aaf..a5d46e2 100644 --- a/readme.md +++ b/readme.md @@ -26,12 +26,53 @@ The library is available as a nuget package. You can install it as any other nug -## Write less, achieve more +## Documentation + +1. [Release notes and roadmap](https://www.questpdf.com/documentation/releases.html) - everything that is planned for future library iterations, description of new features and information about potential breaking changes. +2. [Getting started tutorial](https://www.questpdf.com/documentation/getting-started.html) - a short and easy to follow tutorial showing how to design an invoice document under 200 lines of code. +3. [API Reference](https://www.questpdf.com/documentation/api-reference.html) - a detailed description of behavior of all available components and how to use them with C# Fluent API. +4. [Patterns and practices](https://www.questpdf.com/documentation/patterns-and-practices.html#document-metadata) - everything that may help you designing great reports and reusable code that is easy to maintain. + +## Example invoice Do you believe that creating a complete invoice document can take less than 200 lines of code? We have prepared for you a step-by-step instruction that shows every detail of this implementation and describes the best patterns and practices. For tutorial, documentation and API reference, please visit [the QuestPDF documentation](https://www.questpdf.com/documentation/getting-started.html). -This repository contains sample implementation of the full, page-aware invoice similar to the one below. Let's get started! + + + - +Here you can find an example code showing how easy is to write and understand the fluent API: + +```csharp +public void Compose(IContainer container) +{ + container + .PaddingHorizontal(50) + .PaddingVertical(50) + .Page(page => + { + page.Header(ComposeHeader); + page.Content(ComposeContent); + page.Footer().AlignCenter().PageNumber("Page {number}"); + }); +} + +void ComposeHeader(IContainer container) +{ + container.Row(row => + { + row.RelativeColumn().Stack(column => + { + column.Element().Text($"Invoice #{Model.InvoiceNumber}", TextStyle.Default.Size(20).Bold()); + column.Element().Text($"Issue date: {Model.IssueDate:d}"); + column.Element().Text($"Due date: {Model.DueDate:d}"); + }); + + row.ConstantColumn(100).Height(50).Placeholder(); + }); +} + +// code describing content +```