From 014ec15908ffa48809a86e556f070412abd03eb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Zi=C4=85bek?= Date: Sun, 7 Nov 2021 16:46:34 +0100 Subject: [PATCH 1/5] 2021.11.3 --- QuestPDF/QuestPDF.csproj | 4 +- QuestPDF/Resources/Description.md | 222 ++++++++++++++++++++++++++-- QuestPDF/Resources/ReleaseNotes.txt | 17 +++ 3 files changed, 227 insertions(+), 16 deletions(-) create mode 100644 QuestPDF/Resources/ReleaseNotes.txt diff --git a/QuestPDF/QuestPDF.csproj b/QuestPDF/QuestPDF.csproj index 9019a0c..665321d 100644 --- a/QuestPDF/QuestPDF.csproj +++ b/QuestPDF/QuestPDF.csproj @@ -4,9 +4,9 @@ MarcinZiabek CodeFlint QuestPDF - 2021.11.0-beta3 + 2021.11.3 QuestPDF is an open-source, modern and battle-tested library that can help you with generating PDF documents by offering friendly, discoverable and predictable C# fluent API. - Implemented new elements: SkipOnce and Inlined. Added possibility to define global, page-wide test style. Improved exception handling experience. + $([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/Resources/ReleaseNotes.txt")) 8 true Logo.png diff --git a/QuestPDF/Resources/Description.md b/QuestPDF/Resources/Description.md index 81d3c3e..d3f8432 100644 --- a/QuestPDF/Resources/Description.md +++ b/QuestPDF/Resources/Description.md @@ -1,27 +1,221 @@ -## Rely on solid fundamentals +## QuestPDF Overview -This library is created specifically for designing and arranging document layouts, with full paging support. Alternative solutions, such as HTML-based converters, are not designed for this purpose and therefore are often unpredictable and do not produce desired results. +QuestPDF is an open-source, modern and battle-tested library that can help you with generating PDF documents by offering friendly, discoverable and predictable C# fluent API. -## Work with organized self-explanatory code +## Features -The entire process of implementing PDF document, takes place in your code. Free yourself from slow visual designers and strange technological limitations. Follow simple yet highly effective approaches to create maintainable, high-quality code. +**Rely on solid fundamentals** - This library is created specifically for designing and arranging document layouts, with full paging support. Alternative solutions, such as HTML-based converters, are not designed for this purpose and therefore are often unpredictable and do not produce desired results. -## Compose simple components into complex documents +**Work with organized self-explanatory code** - The entire process of implementing PDF document, takes place in your code. Free yourself from slow visual designers and strange technological limitations. Follow simple yet highly effective approaches to create maintainable, high-quality code. -Do you remember the feeling when your code just works? When your ideas are becoming real without any effort? Working with simple, easy to understand, self-explanatory and highly composable layout elements is the key here! +**Compose simple components into complex documents** - Do you remember the feeling when your code just works? When your ideas are becoming real without any effort? Working with simple, easy to understand, self-explanatory and highly composable layout elements is the key here! -## Create and reuse components +**Create and reuse components** - Feel no fear of complex documents! Create custom, reusable components and divide the document's layout into easy to maintain pieces. Inject data to customize content and use slots to enhance composability. Decide how complex approaches your solution needs and follow the best path. -Feel no fear of complex documents! Create custom, reusable components and divide the document's layout into easy to maintain pieces. Inject data to customize content and use slots to enhance composability. Decide how complex approaches your solution needs and follow the best path. +**Prototype with ease** - We understand that document generation is often tricky and require multiple iterations. The library offers additional prototyping tools such as random text generator or image placeholder element. By following best practices, you can develop a document without having data. -## Prototype with ease +**Enjoy fast PDF generation** - QuestPDF is created upon SkiaSharp, a well-known graphical library, and converts your data into PDF documents. It offers a highly optimized layouting engine capable of generating over 1000 PDF files per minute per core. The entire process is thread-safe. -We understand that document generation is often tricky and require multiple iterations. The library offers additional prototyping tools such as random text generator or image placeholder element. By following best practices, you can develop a document without having data. +## Learning resources -## Enjoy fast PDF generation +**[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. -QuestPDF is created upon SkiaSharp, a well-known graphical library, and converts your data into PDF documents. It offers a highly optimized layouting engine capable of generating over 1000 PDF files per minute per core. The entire process is thread-safe. +**[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. -## Write less, achieve more +**[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. -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. [Learn more](https://www.questpdf.com/documentation/getting-started.html) \ No newline at end of file +**[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). + +![invoice](https://raw.githubusercontent.com/QuestPDF/example-invoice/main/images/invoice.png) + +Here you can find an example code showing how easy is to write and understand the fluent API. + + +**General document structure** with header, content and footer: + +```csharp +public void Compose(IDocumentContainer container) +{ + container + .Page(page => + { + page.Margin(50); + + page.Header().Element(ComposeHeader); + page.Content().Element(ComposeContent); + + page.Footer().AlignCenter().Text(x => + { + x.CurrentPageNumber(); + x.Span(" / "); + x.TotalPages(); + }); + }); +} +``` + + +**The header area** consists of basic invoice information along with a logo placeholder. + +```csharp +void ComposeHeader(IContainer container) +{ + var titleTextStyle = TextStyle.Default.Size(20).SemiBold().Color(Colors.Blue.Medium); + + container.Row(row => + { + { + stack.Item().Text($"Invoice #{Model.InvoiceNumber}", titleStyle); + + stack.Item().Text(text => + { + text.Span("Issue date: ", TextStyle.Default.SemiBold()); + text.Span($"{Model.IssueDate:d}"); + }); + + stack.Item().Text(text => + { + text.Span("Due date: ", TextStyle.Default.SemiBold()); + text.Span($"{Model.DueDate:d}"); + }); + }); + + row.ConstantColumn(100).Height(50).Placeholder(); + }); +} +``` + + +Implementation of **the content area** that contains seller and customer details, then listing of all bought products, then a comments section. + +```csharp +void ComposeContent(IContainer container) +{ + container.PaddingVertical(40).Stack(column => + { + column.Spacing(20); + + column.Item().Row(row => + { + row.RelativeColumn().Component(new AddressComponent("From", Model.SellerAddress)); + row.ConstantColumn(50); + row.RelativeColumn().Component(new AddressComponent("For", Model.CustomerAddress)); + }); + + column.Item().Element(ComposeTable); + + var totalPrice = Model.Items.Sum(x => x.Price * x.Quantity); + + column + .Item() + .PaddingRight(5) + .AlignRight() + .Text($"Grand total: {totalPrice}$", TextStyle.Default.SemiBold()); + + if (!string.IsNullOrWhiteSpace(Model.Comments)) + column.Item().PaddingTop(25).Element(ComposeComments); + }); +} +``` + + +**The table and comments** codes are extracted into separate methods to increase clarity: + +```csharp +void ComposeTable(IContainer container) +{ + var headerStyle = TextStyle.Default.SemiBold(); + + container.Decoration(decoration => + { + // header + decoration.Header().BorderBottom(1).Padding(5).Row(row => + { + row.ConstantColumn(25).Text("#", headerStyle); + row.RelativeColumn(3).Text("Product", headerStyle); + row.RelativeColumn().AlignRight().Text("Unit price", headerStyle); + row.RelativeColumn().AlignRight().Text("Quantity", headerStyle); + row.RelativeColumn().AlignRight().Text("Total", headerStyle); + }); + + // content + decoration + .Content() + .Stack(column => + { + foreach (var item in Model.Items) + { + column + .Item() + .ShowEntire() + .BorderBottom(1) + .BorderColor(Colors.Grey.Lighten2) + .Padding(5) + .Row(row => + { + row.ConstantColumn(25).Text(Model.Items.IndexOf(item) + 1); + row.RelativeColumn(3).Text(item.Name); + row.RelativeColumn().AlignRight().Text($"{item.Price}$"); + row.RelativeColumn().AlignRight().Text(item.Quantity); + row.RelativeColumn().AlignRight().Text($"{item.Price * item.Quantity}$"); + }); + } + }); + }); +} +``` + +```csharp +void ComposeComments(IContainer container) +{ + container.ShowEntire().Background(Colors.Grey.Lighten3).Padding(10).Stack(message => + { + message.Spacing(5); + message.Item().Text("Comments", TextStyle.Default.Size(14).SemiBold()); + message.Item().Text(Model.Comments); + }); +} +``` + + +**The address details section** is implemented using components. This way the code can be easily reused for both seller and customer: + +```csharp +public class AddressComponent : IComponent +{ + private string Title { get; } + private Address Address { get; } + + public AddressComponent(string title, Address address) + { + Title = title; + Address = address; + } + + public void Compose(IContainer container) + { + container.ShowEntire().Stack(column => + { + column.Spacing(5); + + column + .Item() + .BorderBottom(1) + .PaddingBottom(5) + .Text(Title, TextStyle.Default.SemiBold()); + + column.Item().Text(Address.CompanyName); + column.Item().Text(Address.Street); + column.Item().Text($"{Address.City}, {Address.State}"); + column.Item().Text(Address.Email); + column.Item().Text(Address.Phone); + }); + } +} +``` diff --git a/QuestPDF/Resources/ReleaseNotes.txt b/QuestPDF/Resources/ReleaseNotes.txt new file mode 100644 index 0000000..9ac18b7 --- /dev/null +++ b/QuestPDF/Resources/ReleaseNotes.txt @@ -0,0 +1,17 @@ +- Added new Inlined element - put block elements along a line with line-breaking and page-breaking support. This element also supports various element placement in the horizontal axis as well as the baseline. It will help me in future development, especially with text rendering optimization, + +- Introduced a new SkipOnce element - it can be used to hide content on the first occurrence of the parent. Useful in conjunction with the ShowOnce element. This change was proposed by jcl86, thank you! + +- Improved debugging experience by providing more detailed messages when the DocumentLayoutException is thrown. This improvement is based on the discussion started by preiius, thank you! + +- Now it is possible to specify global, document-specific text style. This improves text style management and simplifies the typography pattern. This feature was proposed by JonnyBooker, thank you! + +- Added two overloads to the Image element. Now, you can provide an image as a filePath or a Stream. This improvement was suggested by pha3z. Thank you! + +- Improved text rendering performance. + +- Improved documentation examples for the ShowOnce and the EnsureSpace elements. + +- Improved text element: it does not throw an exception when an argument is null. + +- All new releases of QuestPDF will contain symbol packages. Let's welcome simplified debugging experience 🎉 From 2419a25cbd94d25ce20bd23a209e026d99e91163 Mon Sep 17 00:00:00 2001 From: Don Murta <15962302+donmurta@users.noreply.github.com> Date: Tue, 9 Nov 2021 10:26:46 -0700 Subject: [PATCH 2/5] Add simple chart example --- QuestPDF.Examples/ChartExamples.cs | 62 ++++++++++++++++++++++ QuestPDF.Examples/QuestPDF.Examples.csproj | 1 + 2 files changed, 63 insertions(+) create mode 100644 QuestPDF.Examples/ChartExamples.cs diff --git a/QuestPDF.Examples/ChartExamples.cs b/QuestPDF.Examples/ChartExamples.cs new file mode 100644 index 0000000..240a672 --- /dev/null +++ b/QuestPDF.Examples/ChartExamples.cs @@ -0,0 +1,62 @@ +using NUnit.Framework; +using QuestPDF.Examples.Engine; +using QuestPDF.Fluent; +using QuestPDF.Helpers; +using QuestPDF.Infrastructure; +using Microcharts; +using SkiaSharp; + +namespace QuestPDF.Examples +{ + public class ChartExample + { + [Test] + public void MicrochartChart() + { + var entries = new[] + { + new ChartEntry(212) + { + Label = "UWP", + ValueLabel = "112", + Color = SKColor.Parse("#2c3e50") + }, + new ChartEntry(248) + { + Label = "Android", + ValueLabel = "648", + Color = SKColor.Parse("#77d065") + }, + new ChartEntry(128) + { + Label = "iOS", + ValueLabel = "428", + Color = SKColor.Parse("#b455b6") + }, + new ChartEntry(514) + { + Label = "Forms", + ValueLabel = "214", + Color = SKColor.Parse("#3498db") + } + }; + + RenderingTest + .Create() + .PageSize(300, 300) + .ShowResults() + .Render(container => + { + container.Extend().Canvas((canvas, size) => + { + var bar = new BarChart + { + Entries = entries, + IsAnimated = false, + }; + bar.Draw(canvas, (int)size.Width, (int)size.Height); + }); + }); + } + } +} \ No newline at end of file diff --git a/QuestPDF.Examples/QuestPDF.Examples.csproj b/QuestPDF.Examples/QuestPDF.Examples.csproj index a7a0014..12247a8 100644 --- a/QuestPDF.Examples/QuestPDF.Examples.csproj +++ b/QuestPDF.Examples/QuestPDF.Examples.csproj @@ -6,6 +6,7 @@ + From 63af7139359c799040b5704db2f674ba8a19e932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Zi=C4=85bek?= Date: Sun, 14 Nov 2021 23:03:22 +0100 Subject: [PATCH 3/5] 2021.11.4 - Fixed measuring the Inlined element --- QuestPDF.Examples/InlinedExamples.cs | 13 +++++++------ QuestPDF/Elements/Inlined.cs | 5 +++-- QuestPDF/QuestPDF.csproj | 2 +- QuestPDF/Resources/ReleaseNotes.txt | 2 ++ 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/QuestPDF.Examples/InlinedExamples.cs b/QuestPDF.Examples/InlinedExamples.cs index adf4e68..95c21ef 100644 --- a/QuestPDF.Examples/InlinedExamples.cs +++ b/QuestPDF.Examples/InlinedExamples.cs @@ -87,23 +87,24 @@ namespace QuestPDF.Examples { RenderingTest .Create() - .PageSize(400, 250) + .PageSize(800, 600) .ProduceImages() .ShowResults() .Render(container => { container .Padding(20) + .Box() .Border(1) - .Background(Colors.Grey.Lighten3) + .Background(Colors.Grey.Lighten4) .Inlined(inlined => { inlined.VerticalSpacing(50); - inlined.HorizontalSpacing(20); - inlined.AlignSpaceAround(); - inlined.BaselineTop(); + inlined.HorizontalSpacing(25); + inlined.AlignRight(); + inlined.BaselineMiddle(); - foreach (var _ in Enumerable.Range(0, 20)) + foreach (var _ in Enumerable.Range(0, 100)) inlined.Item().Element(RandomBlock); }); }); diff --git a/QuestPDF/Elements/Inlined.cs b/QuestPDF/Elements/Inlined.cs index 8f0cb0b..5ae35d3 100644 --- a/QuestPDF/Elements/Inlined.cs +++ b/QuestPDF/Elements/Inlined.cs @@ -64,8 +64,9 @@ namespace QuestPDF.Elements .Select(line => { var size = GetLineSize(line); - var heightWithSpacing = size.Height + (line.Count - 1) * HorizontalSpacing; - return new Size(size.Width, heightWithSpacing); + + var widthWithSpacing = size.Width + (line.Count - 1) * HorizontalSpacing; + return new Size(widthWithSpacing, size.Height); }) .ToList(); diff --git a/QuestPDF/QuestPDF.csproj b/QuestPDF/QuestPDF.csproj index 665321d..4179f2f 100644 --- a/QuestPDF/QuestPDF.csproj +++ b/QuestPDF/QuestPDF.csproj @@ -4,7 +4,7 @@ MarcinZiabek CodeFlint QuestPDF - 2021.11.3 + 2021.11.4 QuestPDF is an open-source, modern and battle-tested library that can help you with generating PDF documents by offering friendly, discoverable and predictable C# fluent API. $([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/Resources/ReleaseNotes.txt")) 8 diff --git a/QuestPDF/Resources/ReleaseNotes.txt b/QuestPDF/Resources/ReleaseNotes.txt index 9ac18b7..debea0f 100644 --- a/QuestPDF/Resources/ReleaseNotes.txt +++ b/QuestPDF/Resources/ReleaseNotes.txt @@ -15,3 +15,5 @@ - Improved text element: it does not throw an exception when an argument is null. - All new releases of QuestPDF will contain symbol packages. Let's welcome simplified debugging experience 🎉 + +- 2021.11.4 - Fixed the Inlined element not rendering properly in some cases. From 79cc5f1507dbd4335801a1803f74f8250d20d587 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Zi=C4=85bek?= Date: Fri, 19 Nov 2021 00:22:45 +0100 Subject: [PATCH 4/5] Added support for XPS rendering --- QuestPDF/Drawing/DocumentGenerator.cs | 7 ++++ QuestPDF/Drawing/PdfCanvas.cs | 36 ++--------------- QuestPDF/Drawing/SkiaDocumentCanvasBase.cs | 45 ++++++++++++++++++++++ QuestPDF/Drawing/XpsCanvas.cs | 15 ++++++++ QuestPDF/Fluent/GenerateExtensions.cs | 30 +++++++++++++++ 5 files changed, 100 insertions(+), 33 deletions(-) create mode 100644 QuestPDF/Drawing/SkiaDocumentCanvasBase.cs create mode 100644 QuestPDF/Drawing/XpsCanvas.cs diff --git a/QuestPDF/Drawing/DocumentGenerator.cs b/QuestPDF/Drawing/DocumentGenerator.cs index 3d33328..5c98388 100644 --- a/QuestPDF/Drawing/DocumentGenerator.cs +++ b/QuestPDF/Drawing/DocumentGenerator.cs @@ -20,6 +20,13 @@ namespace QuestPDF.Drawing RenderDocument(canvas, document); } + internal static void GenerateXps(Stream stream, IDocument document) + { + var metadata = document.GetMetadata(); + var canvas = new XpsCanvas(stream, metadata); + RenderDocument(canvas, document); + } + internal static ICollection GenerateImages(IDocument document) { var metadata = document.GetMetadata(); diff --git a/QuestPDF/Drawing/PdfCanvas.cs b/QuestPDF/Drawing/PdfCanvas.cs index c736eca..fd7b1df 100644 --- a/QuestPDF/Drawing/PdfCanvas.cs +++ b/QuestPDF/Drawing/PdfCanvas.cs @@ -4,43 +4,13 @@ using SkiaSharp; namespace QuestPDF.Drawing { - internal class PdfCanvas : SkiaCanvasBase + internal class PdfCanvas : SkiaDocumentCanvasBase { - private SKDocument Document { get; } - - public PdfCanvas(Stream stream, DocumentMetadata documentMetadata) - { - Document = SKDocument.CreatePdf(stream, MapMetadata(documentMetadata)); - } - - ~PdfCanvas() - { - Document.Dispose(); - } - - public override void BeginDocument() + public PdfCanvas(Stream stream, DocumentMetadata documentMetadata) + : base(SKDocument.CreatePdf(stream, MapMetadata(documentMetadata))) { } - - public override void EndDocument() - { - Canvas.Dispose(); - - Document.Close(); - Document.Dispose(); - } - - public override void BeginPage(Size size) - { - Canvas = Document.BeginPage(size.Width, size.Height); - } - - public override void EndPage() - { - Document.EndPage(); - Canvas.Dispose(); - } private static SKDocumentPdfMetadata MapMetadata(DocumentMetadata metadata) { diff --git a/QuestPDF/Drawing/SkiaDocumentCanvasBase.cs b/QuestPDF/Drawing/SkiaDocumentCanvasBase.cs new file mode 100644 index 0000000..16818c1 --- /dev/null +++ b/QuestPDF/Drawing/SkiaDocumentCanvasBase.cs @@ -0,0 +1,45 @@ +using System.IO; +using QuestPDF.Infrastructure; +using SkiaSharp; + +namespace QuestPDF.Drawing +{ + internal class SkiaDocumentCanvasBase : SkiaCanvasBase + { + private SKDocument Document { get; } + + public SkiaDocumentCanvasBase(SKDocument document) + { + Document = document; + } + + ~SkiaDocumentCanvasBase() + { + Document.Dispose(); + } + + public override void BeginDocument() + { + + } + + public override void EndDocument() + { + Canvas.Dispose(); + + Document.Close(); + Document.Dispose(); + } + + public override void BeginPage(Size size) + { + Canvas = Document.BeginPage(size.Width, size.Height); + } + + public override void EndPage() + { + Document.EndPage(); + Canvas.Dispose(); + } + } +} \ No newline at end of file diff --git a/QuestPDF/Drawing/XpsCanvas.cs b/QuestPDF/Drawing/XpsCanvas.cs new file mode 100644 index 0000000..c885ef8 --- /dev/null +++ b/QuestPDF/Drawing/XpsCanvas.cs @@ -0,0 +1,15 @@ +using System.IO; +using QuestPDF.Infrastructure; +using SkiaSharp; + +namespace QuestPDF.Drawing +{ + internal class XpsCanvas : SkiaDocumentCanvasBase + { + public XpsCanvas(Stream stream, DocumentMetadata documentMetadata) + : base(SKDocument.CreateXps(stream, documentMetadata.RasterDpi)) + { + + } + } +} \ No newline at end of file diff --git a/QuestPDF/Fluent/GenerateExtensions.cs b/QuestPDF/Fluent/GenerateExtensions.cs index 0027da0..ead590e 100644 --- a/QuestPDF/Fluent/GenerateExtensions.cs +++ b/QuestPDF/Fluent/GenerateExtensions.cs @@ -8,6 +8,8 @@ namespace QuestPDF.Fluent { public static class GenerateExtensions { + #region PDF + public static byte[] GeneratePdf(this IDocument document) { using var stream = new MemoryStream(); @@ -26,6 +28,32 @@ namespace QuestPDF.Fluent DocumentGenerator.GeneratePdf(stream, document); } + #endregion + + public static byte[] GenerateXps(this IDocument document) + { + using var stream = new MemoryStream(); + document.GenerateXps(stream); + return stream.ToArray(); + } + + public static void GenerateXps(this IDocument document, string filePath) + { + using var stream = new FileStream(filePath, FileMode.Create); + document.GenerateXps(stream); + } + + public static void GenerateXps(this IDocument document, Stream stream) + { + DocumentGenerator.GenerateXps(stream, document); + } + + #region XPS + + #endregion + + #region Images + public static IEnumerable GenerateImages(this IDocument document) { return DocumentGenerator.GenerateImages(document); @@ -47,5 +75,7 @@ namespace QuestPDF.Fluent index++; } } + + #endregion } } \ No newline at end of file From 4ce66878f2473c0f070a8eaeebc1d18f9a9b7ac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Zi=C4=85bek?= Date: Fri, 19 Nov 2021 00:24:32 +0100 Subject: [PATCH 5/5] 2021.12.0-alpha0 --- QuestPDF/QuestPDF.csproj | 2 +- QuestPDF/Resources/ReleaseNotes.txt | 20 +------------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/QuestPDF/QuestPDF.csproj b/QuestPDF/QuestPDF.csproj index 4179f2f..5fb415a 100644 --- a/QuestPDF/QuestPDF.csproj +++ b/QuestPDF/QuestPDF.csproj @@ -4,7 +4,7 @@ MarcinZiabek CodeFlint QuestPDF - 2021.11.4 + 2021.12.0-alpha0 QuestPDF is an open-source, modern and battle-tested library that can help you with generating PDF documents by offering friendly, discoverable and predictable C# fluent API. $([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/Resources/ReleaseNotes.txt")) 8 diff --git a/QuestPDF/Resources/ReleaseNotes.txt b/QuestPDF/Resources/ReleaseNotes.txt index debea0f..a6e470e 100644 --- a/QuestPDF/Resources/ReleaseNotes.txt +++ b/QuestPDF/Resources/ReleaseNotes.txt @@ -1,19 +1 @@ -- Added new Inlined element - put block elements along a line with line-breaking and page-breaking support. This element also supports various element placement in the horizontal axis as well as the baseline. It will help me in future development, especially with text rendering optimization, - -- Introduced a new SkipOnce element - it can be used to hide content on the first occurrence of the parent. Useful in conjunction with the ShowOnce element. This change was proposed by jcl86, thank you! - -- Improved debugging experience by providing more detailed messages when the DocumentLayoutException is thrown. This improvement is based on the discussion started by preiius, thank you! - -- Now it is possible to specify global, document-specific text style. This improves text style management and simplifies the typography pattern. This feature was proposed by JonnyBooker, thank you! - -- Added two overloads to the Image element. Now, you can provide an image as a filePath or a Stream. This improvement was suggested by pha3z. Thank you! - -- Improved text rendering performance. - -- Improved documentation examples for the ShowOnce and the EnsureSpace elements. - -- Improved text element: it does not throw an exception when an argument is null. - -- All new releases of QuestPDF will contain symbol packages. Let's welcome simplified debugging experience 🎉 - -- 2021.11.4 - Fixed the Inlined element not rendering properly in some cases. +- Added support for generating documents in the XPS file format.