diff --git a/docs/api-reference/barcodes.md b/docs/api-reference/barcodes.md
index dd0f839..1d0b40e 100644
--- a/docs/api-reference/barcodes.md
+++ b/docs/api-reference/barcodes.md
@@ -121,7 +121,7 @@ using ZXing.Rendering;
var writer = new QRCodeWriter();
var qrCode = writer.encode(url, BarcodeFormat.QR_CODE, (int)size.Width, (int)size.Height);
var renderer = new SvgRenderer { FontName = "Lato" };
- return renderer.Render(qrCode, BarcodeFormat.EAN_13, null).Content;
+ return renderer.Render(qrCode, BarcodeFormat.QR_CODE, null).Content;
});
});
```
diff --git a/docs/api-reference/border.md b/docs/api-reference/border.md
index bc5fc1b..77cf5f9 100644
--- a/docs/api-reference/border.md
+++ b/docs/api-reference/border.md
@@ -31,11 +31,11 @@ container
| **BorderTop** | Sets a border on the top side of its content. |
| **BorderBottom** | Sets a border on the bottom side of its content. |
-Each method requires a thickness value as a parameter. Optionally, you can specify the unit value (default is `Unit.Points`).
+Each method requires a thickness value as a parameter. Optionally, you can specify the unit value (default is `Unit.Point`).
```csharp
container.Border(1);
-container.Border(1, Unit.Millimeters);
+container.Border(1, Unit.Millimetre);
```
diff --git a/docs/api-reference/column.md b/docs/api-reference/column.md
index 121acb8..1fc2144 100644
--- a/docs/api-reference/column.md
+++ b/docs/api-reference/column.md
@@ -53,10 +53,10 @@ container
-Optionally, you can specify the unit value (default is `Unit.Points`).
+Optionally, you can specify the unit value (default is `Unit.Point`).
```csharp
-column.Spacing(5, Unit.Millimeters);
+column.Spacing(5, Unit.Millimetre);
```
diff --git a/docs/api-reference/debug-area.md b/docs/api-reference/debug-area.md
index f6dd469..58dcd58 100644
--- a/docs/api-reference/debug-area.md
+++ b/docs/api-reference/debug-area.md
@@ -17,15 +17,15 @@ You can specify text and color to better distinguish between various debug eleme
```csharp{2}
container
- .Debug("Grid example", Colors.Blue.Medium)
+ .DebugArea("Grid example", Colors.Blue.Medium)
// content
```
It is also possible to skip the color (it is red by default), and even the label:
```csharp
-.Debug("Grid example")
-.Debug()
+.DebugArea("Grid example")
+.DebugArea()
```
@@ -38,14 +38,21 @@ container
.Height(250)
.Padding(25)
.DebugArea("Grid example", Colors.Blue.Medium)
- .Grid(grid =>
+ .Column(column =>
{
- grid.Columns(3);
- grid.Spacing(5);
-
- foreach (var _ in Enumerable.Range(0, 8))
- grid.Item().Height(50).Placeholder();
+ column.Spacing(5);
+
+ foreach (var _ in Enumerable.Range(0, 3))
+ {
+ column.Item().Row(row =>
+ {
+ row.Spacing(5);
+
+ foreach (var _ in Enumerable.Range(0, 3))
+ row.RelativeItem().Height(50).Placeholder();
+ });
+ }
});
```
-
\ No newline at end of file
+
diff --git a/docs/api-reference/image/basics.md b/docs/api-reference/image/basics.md
index 64bf6cb..153abf1 100644
--- a/docs/api-reference/image/basics.md
+++ b/docs/api-reference/image/basics.md
@@ -49,17 +49,25 @@ Therefore, the resolution of an image is not used for determining its physical s
#### Example
```csharp{8-11}
-.Grid(grid =>
+.Column(column =>
{
- grid.Columns(2);
- grid.Spacing(10);
-
- grid.Item(2).Text("My photo gallery:").Bold();
-
- grid.Item().Image("photo-gallery-1.jpg");
- grid.Item().Image("photo-gallery-2.jpg");
- grid.Item().Image("photo-gallery-3.jpg");
- grid.Item().Image("photo-gallery-4.jpg");
+ column.Spacing(10);
+
+ column.Item().Text("My photo gallery:").Bold();
+
+ column.Item().Row(row =>
+ {
+ row.Spacing(10);
+ row.RelativeItem().Image("photo-gallery-1.jpg");
+ row.RelativeItem().Image("photo-gallery-2.jpg");
+ });
+
+ column.Item().Row(row =>
+ {
+ row.Spacing(10);
+ row.RelativeItem().Image("photo-gallery-3.jpg");
+ row.RelativeItem().Image("photo-gallery-4.jpg");
+ });
});
```
diff --git a/docs/api-reference/image/svg.md b/docs/api-reference/image/svg.md
index 341604f..82bcef7 100644
--- a/docs/api-reference/image/svg.md
+++ b/docs/api-reference/image/svg.md
@@ -38,7 +38,7 @@ The same setting is also available via the GUI in your preferred IDE.
:::
:::tip
-SVG content supports the same scaling options as raster images. [Learn more](/api-reference/image/basics.html#image-scaling)
+SVG content supports the `FitWidth`, `FitHeight` and `FitArea` scaling options and always keeps its aspect ratio. `FitUnproportionally` is available only for raster images. [Learn more](/api-reference/image/basics.html#image-scaling)
For example:
```csharp{4}
@@ -111,3 +111,6 @@ If an SVG file does not render as expected after considering the following point
Learn more on [the Shopify page](https://shopify.github.io/react-native-skia/docs/images-svg/#svg-support).
+::: warning
+QuestPDF uses transparent colors written as `#AARRGGBB`, while SVG expects `#RRGGBBAA`.
+:::
diff --git a/docs/api-reference/layers.md b/docs/api-reference/layers.md
index eb77b72..eed48b1 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 and are repeated on each one.
+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).
| Method | Description |
|------------------|--------------------------------------------------|
diff --git a/docs/api-reference/page/settings.md b/docs/api-reference/page/settings.md
index 5fe6542..d4eab0f 100644
--- a/docs/api-reference/page/settings.md
+++ b/docs/api-reference/page/settings.md
@@ -36,7 +36,7 @@ document.Page(page =>
{
page.Size(595, 842); // in points
// or
- page.Size(21, 29.7f, Unit.Centimeter);
+ page.Size(21, 29.7f, Unit.Centimetre);
// or
page.Size(PageSizes.A4);
});
@@ -53,7 +53,7 @@ document.Page(page =>
{
page.ContinuousSize(215);
// or
- page.ContinuousSize(76, Unit.Millimeter);
+ page.ContinuousSize(76, Unit.Millimetre);
});
```
@@ -116,7 +116,7 @@ You can configure each side individually or use combined methods for convenience
document.Page(page =>
{
page.MarginVertical(32);
- page.MarginHorizontal(2, Unit.Centimeter);
+ page.MarginHorizontal(2, Unit.Centimetre);
});
```
@@ -173,7 +173,7 @@ Document
document.Page(page =>
{
page.Size(PageSizes.A5.Landscape());
- page.Margin(2f, Unit.Centimeter);
+ page.Margin(2f, Unit.Centimetre);
page.Content().AlignCenter().AlignMiddle().Text("A5 LANDSCAPE");
});
diff --git a/docs/api-reference/rotate.md b/docs/api-reference/rotate.md
index 0a8b38d..0b155d1 100644
--- a/docs/api-reference/rotate.md
+++ b/docs/api-reference/rotate.md
@@ -4,10 +4,10 @@
Constrained rotation enables you to rotate an element by exactly 90 degrees, either clockwise or counterclockwise, while maintaining the content within the same space and size constraints.
-| Method | Description |
-|----------------------------|--------------------------------------------------|
-| **RotateCounterclockwise** | Rotates its content 90 degrees counterclockwise. |
-| **RotateClockwise** | Rotates its content 90 degrees clockwise. |
+| Method | Description |
+|----------------------------------|--------------------------------------------------|
+| **RotateLayoutCounterclockwise** | Rotates its content 90 degrees counterclockwise. |
+| **RotateLayoutClockwise** | Rotates its content 90 degrees clockwise. |
::: warning
When applying rotation, be aware that it changes the dimensional behavior of your elements.
@@ -19,7 +19,7 @@ This affects how other properties like alignment and padding work on the rotated
container.Row(row =>
{
row.AutoItem()
- .RotateCounterclockwise()
+ .RotateLayoutCounterclockwise()
.AlignCenter()
.Text("Definition")
.Bold().FontColor(Colors.Blue.Darken2);
diff --git a/docs/api-reference/row.md b/docs/api-reference/row.md
index 8c81690..55d45f9 100644
--- a/docs/api-reference/row.md
+++ b/docs/api-reference/row.md
@@ -22,7 +22,7 @@ the items will occupy sizes of 15 points, 75 points, and 10 points respectively.
| **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. |
-For ConstantItem, you can optionally specify the unit value (default is `Unit.Points`).
+For ConstantItem, you can optionally specify the unit value (default is `Unit.Point`).
```csharp
row.ConstantItem(5, Unit.Centimetre);
@@ -85,10 +85,10 @@ container
-Optionally, you can specify the unit value (default is `Unit.Points`).
+Optionally, you can specify the unit value (default is `Unit.Point`).
```csharp
-row.Spacing(5, Unit.Millimeters);
+row.Spacing(5, Unit.Millimetre);
```
diff --git a/docs/api-reference/shadow.md b/docs/api-reference/shadow.md
index 3dad770..cbe4505 100644
--- a/docs/api-reference/shadow.md
+++ b/docs/api-reference/shadow.md
@@ -23,7 +23,7 @@ container
## Blur
-Gets or sets the blur radius of the shadow in pixels.
+Gets or sets the blur radius of the shadow in points.
Higher values produce a more diffused shadow with softer edges.
A value of 0 results in a sharp, unblurred shadow.
@@ -57,7 +57,7 @@ Use with caution, especially in large documents or when rendering complex shadow
## Spread
-Gets or sets the spread radius of the shadow in pixels.
+Gets or sets the spread radius of the shadow in points.
Positive values cause the shadow to expand, negative values cause it to contract.
@@ -86,7 +86,7 @@ Positive values cause the shadow to expand, negative values cause it to contract
## Offset X
-Gets or sets the horizontal offset of the shadow in pixels.
+Gets or sets the horizontal offset of the shadow in points.
Positive values move the shadow to the right, negative values move it to the left.
@@ -115,7 +115,7 @@ Positive values move the shadow to the right, negative values move it to the lef
## Offset Y
-Gets or sets the vertical offset of the shadow in pixels.
+Gets or sets the vertical offset of the shadow in points.
Positive values move the shadow downward, negative values move it upward.
diff --git a/docs/api-reference/table/basics.md b/docs/api-reference/table/basics.md
index 9646011..bbbaede 100644
--- a/docs/api-reference/table/basics.md
+++ b/docs/api-reference/table/basics.md
@@ -116,7 +116,7 @@ Here’s an example showcasing a confusion matrix layout where cells are placed
.Text("Predicted condition").Bold();
table.Cell().Row(3).Column(1).RowSpan(2)
- .Element(HeaderCellStyle).RotateLeft()
+ .Element(HeaderCellStyle).RotateLayoutCounterclockwise()
.Text("Actual\ncondition").Bold().AlignCenter();
table.Cell().Row(2).Column(3)
diff --git a/docs/api-reference/table/header-and-footer.md b/docs/api-reference/table/header-and-footer.md
index 2c171f9..b213f2c 100644
--- a/docs/api-reference/table/header-and-footer.md
+++ b/docs/api-reference/table/header-and-footer.md
@@ -21,7 +21,7 @@ const int inchesToPoints = 72;
container
.Padding(10)
- .MinimalBox()
+ .Shrink()
.Border(1)
.Table(table =>
{
@@ -72,12 +72,12 @@ container
table.Cell().Element(CellStyle).ExtendHorizontal().AlignLeft().Text(page.name);
// inches
- table.Cell().Element(CellStyle).Text(page.width);
- table.Cell().Element(CellStyle).Text(page.height);
+ table.Cell().Element(CellStyle).Text($"{page.width}");
+ table.Cell().Element(CellStyle).Text($"{page.height}");
// points
- table.Cell().Element(CellStyle).Text(page.width * inchesToPoints);
- table.Cell().Element(CellStyle).Text(page.height * inchesToPoints);
+ table.Cell().Element(CellStyle).Text($"{page.width * inchesToPoints}");
+ table.Cell().Element(CellStyle).Text($"{page.height * inchesToPoints}");
IContainer CellStyle(IContainer container) => DefaultCellStyle(container, Colors.White).ShowOnce();
}
diff --git a/docs/api-reference/text/basics.md b/docs/api-reference/text/basics.md
index 841a2df..ad4c0db 100644
--- a/docs/api-reference/text/basics.md
+++ b/docs/api-reference/text/basics.md
@@ -139,5 +139,5 @@ Hyperlink is a clickable text that redirects the user to a specific webpage.
```
diff --git a/docs/api-reference/text/style-inheritance.md b/docs/api-reference/text/style-inheritance.md
index c6f88a1..658209d 100644
--- a/docs/api-reference/text/style-inheritance.md
+++ b/docs/api-reference/text/style-inheritance.md
@@ -51,7 +51,7 @@ It reduces repetitive code, enhances maintainability, and provides flexibility t
table.Cell().Element(Style).Text(Placeholders.Sentence());
}
- IContainer Style(IContainer container) => container.container.Padding(5);
+ IContainer Style(IContainer container) => container.Padding(5);
});
});
```
diff --git a/docs/api-reference/text/text-style.md b/docs/api-reference/text/text-style.md
index 61faf10..be35fa1 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 Arial, Times New Roman, and Calibri.
+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).
```csharp{8,11}
.Column(column =>
@@ -41,11 +41,11 @@ Examples of font families include Arial, Times New Roman, and Calibri.
column.Item().Text("This is text with default font (Lato)");
- column.Item().Text("This is text with Times New Roman font")
- .FontFamily("Times New Roman");
+ column.Item().Text("This is text with Noto Serif font")
+ .FontFamily("Noto Serif");
- column.Item().Text("This is text with Courier New font")
- .FontFamily("Courier New");
+ column.Item().Text("This is text with JetBrains Mono font")
+ .FontFamily("JetBrains Mono");
});
```
@@ -470,7 +470,7 @@ Allows a line to break between any two characters, not only at word boundaries s
With this setting enabled, lines are filled as fully as possible, at the cost of splitting words at arbitrary positions without hyphenation.
-It is useful for content without natural break points, such as long URLs, identifiers, hashes, or file paths, especially in narrow columns. For regular prose, prefer the default behavior.
+Without this setting, a word longer than the line is still split where it overflows, so no text is cut off. `BreakAnywhere` changes where lines break: they are filled completely instead of breaking early at natural break points such as `/` or `-`. Use it when evenly filled lines matter more than readable breaks, e.g. hashes or identifiers in narrow columns; for prose and URLs the default is usually easier to read.
```csharp
.Column(column =>
diff --git a/docs/concepts/code-patterns/components.md b/docs/concepts/code-patterns/components.md
index bf8e0cb..2d9b1f4 100644
--- a/docs/concepts/code-patterns/components.md
+++ b/docs/concepts/code-patterns/components.md
@@ -157,7 +157,7 @@ public class SectionComponent : IComponent
public IContainer Custom(string label)
{
- var content = IContainer.Empty;
+ var content = EmptyContainer.Create();
Fields.Add((label, content));
return content;
}
@@ -187,7 +187,7 @@ Document
// more usages of the section component
});
});
- }
+ })
.GeneratePdf("report.pdf");
IComponent BuildSampleSection()
diff --git a/docs/concepts/code-patterns/document-structure.md b/docs/concepts/code-patterns/document-structure.md
index 0e3cd93..f35e948 100644
--- a/docs/concepts/code-patterns/document-structure.md
+++ b/docs/concepts/code-patterns/document-structure.md
@@ -52,52 +52,73 @@ public class MyReport
private void RedSection(IContainer container)
{
- container.Grid(grid =>
+ container.Column(column =>
{
- grid.Columns(3);
- grid.Spacing(15);
-
- grid.Item(3 ).Text("Red section")
+ column.Spacing(15);
+
+ column.Item().Text("Red section")
.FontColor(Colors.Red.Darken2).FontSize(32).Bold();
- grid.Item(3).Text(Placeholders.Paragraph()).Light();
+ column.Item().Text(Placeholders.Paragraph()).Light();
+
+ foreach (var rowNumber in Enumerable.Range(0, 2))
+ {
+ column.Item().Row(row =>
+ {
+ row.Spacing(15);
- foreach (var i in Enumerable.Range(0, 6))
- grid.Item().AspectRatio(4 / 3f).Background(Colors.Red.Lighten4);
+ foreach (var columnNumber in Enumerable.Range(0, 3))
+ row.RelativeItem().AspectRatio(4 / 3f).Background(Colors.Red.Lighten4);
+ });
+ }
});
}
private void GreenSection(IContainer container)
{
- container.Grid(grid =>
+ container.Column(column =>
{
- grid.Columns(3);
- grid.Spacing(15);
-
- grid.Item(3).Text("Green section")
+ column.Spacing(15);
+
+ column.Item().Text("Green section")
.FontColor(Colors.Green.Darken2).FontSize(32).Bold();
- grid.Item(3).Text(Placeholders.Paragraph()).Light();
+ column.Item().Text(Placeholders.Paragraph()).Light();
- foreach (var i in Enumerable.Range(0, 12))
- grid.Item().AspectRatio(4 / 3f).Background(Colors.Green.Lighten4);
+ foreach (var rowNumber in Enumerable.Range(0, 4))
+ {
+ column.Item().Row(row =>
+ {
+ row.Spacing(15);
+
+ foreach (var columnNumber in Enumerable.Range(0, 3))
+ row.RelativeItem().AspectRatio(4 / 3f).Background(Colors.Green.Lighten4);
+ });
+ }
});
}
private void BlueSection(IContainer container)
{
- container.Grid(grid =>
+ container.Column(column =>
{
- grid.Columns(3);
- grid.Spacing(15);
-
- grid.Item(3).Text("Blue section")
+ column.Spacing(15);
+
+ column.Item().Text("Blue section")
.FontColor(Colors.Blue.Darken2).FontSize(32).Bold();
- grid.Item(3).Text(Placeholders.Paragraph()).Light();
+ column.Item().Text(Placeholders.Paragraph()).Light();
- foreach (var i in Enumerable.Range(0, 18))
- grid.Item().AspectRatio(4 / 3f).Background(Colors.Blue.Lighten4);
+ foreach (var rowNumber in Enumerable.Range(0, 6))
+ {
+ column.Item().Row(row =>
+ {
+ row.Spacing(15);
+
+ foreach (var columnNumber in Enumerable.Range(0, 3))
+ row.RelativeItem().AspectRatio(4 / 3f).Background(Colors.Blue.Lighten4);
+ });
+ }
});
}
}
diff --git a/docs/concepts/code-patterns/dynamic-components.md b/docs/concepts/code-patterns/dynamic-components.md
index 0707a62..c0f0977 100644
--- a/docs/concepts/code-patterns/dynamic-components.md
+++ b/docs/concepts/code-patterns/dynamic-components.md
@@ -173,6 +173,9 @@ The following component implements a paging algorithm that:
6) Updates state to track progress
```csharp
+using System.Globalization;
+using QuestPDF.Elements;
+
public class OrdersTableWithPageSubtotalsComponent : IDynamicComponent
{
private ICollection Items { get; }
diff --git a/docs/concepts/colors.md b/docs/concepts/colors.md
index c789ecc..6d5de0e 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`.
+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#transparent-colors)).
:::
## Examples
diff --git a/docs/concepts/document-operations.md b/docs/concepts/document-operations.md
index 4c0c19b..cf4e9d5 100644
--- a/docs/concepts/document-operations.md
+++ b/docs/concepts/document-operations.md
@@ -121,7 +121,7 @@ A simple overlay example:
```csharp
DocumentOperation
.LoadFile("input.pdf")
- .OverlayFile(new LayerConfiguration
+ .OverlayFile(new DocumentOperation.LayerConfiguration
{
FilePath = "watermark.pdf"
})
@@ -133,7 +133,7 @@ More complex overlay example with specific page selections:
```csharp
DocumentOperation
.LoadFile("input.pdf")
- .OverlayFile(new LayerConfiguration
+ .OverlayFile(new DocumentOperation.LayerConfiguration
{
FilePath = "watermak.pdf",
TargetPages = "1-z", // Apply to all pages
@@ -171,7 +171,7 @@ Starting with the 2026.7.2 version, the `AllowModification` permission is also s
```csharp
DocumentOperation
.LoadFile("input.pdf")
- .Encrypt(new Encryption40Bit
+ .Encrypt(new DocumentOperation.Encryption40Bit
{
UserPassword = "user123",
OwnerPassword = "owner456",
@@ -188,7 +188,7 @@ DocumentOperation
```csharp
DocumentOperation
.LoadFile("input.pdf")
- .Encrypt(new Encryption128Bit
+ .Encrypt(new DocumentOperation.Encryption128Bit
{
UserPassword = "user123",
OwnerPassword = "owner456",
@@ -208,7 +208,7 @@ DocumentOperation
```csharp
DocumentOperation
.LoadFile("input.pdf")
- .Encrypt(new Encryption256Bit
+ .Encrypt(new DocumentOperation.Encryption256Bit
{
UserPassword = "user123",
OwnerPassword = "owner456",
@@ -245,7 +245,7 @@ A simple attachment example:
```csharp
DocumentOperation
.LoadFile("input.pdf")
- .AddAttachment(new DocumentAttachment
+ .AddAttachment(new DocumentOperation.DocumentAttachment
{
FilePath = "data.csv",
Description = "Supporting data table",
@@ -286,12 +286,12 @@ The PDF/A-3b standard requires that all attachments provide more information abo
```csharp
DocumentOperation
.LoadFile("input.pdf")
- .AddAttachment(new DocumentAttachment
+ .AddAttachment(new DocumentOperation.DocumentAttachment
{
FilePath = "invoice-data.xml",
Description = "Invoice XML data",
MimeType = "application/xml",
- Relationship = DocumentAttachmentRelationship.Alternative,
+ Relationship = DocumentOperation.DocumentAttachmentRelationship.Alternative,
CreationDate = DateTime.UtcNow,
ModificationDate = DateTime.UtcNow,
Replace = true
@@ -319,7 +319,7 @@ Document
page.Content().Text("Your invoice content");
});
})
- .WithSettings(new DocumentSettings() { PdfA = true }) // important
+ .WithSettings(new DocumentSettings() { PDFA_Conformance = PDFA_Conformance.PDFA_3B }) // important
.GeneratePdf(path);
// step 2: extend the metadata of the PDF document
@@ -342,17 +342,17 @@ DocumentOperation
.LoadFile("input.pdf")
.TakePages("1-10") // Select first 10 pages
.MergeFile("appendix.pdf", "1-z") // Append all pages from appendix
- .OverlayFile(new LayerConfiguration
+ .OverlayFile(new DocumentOperation.LayerConfiguration
{
FilePath = "watermark.pdf",
TargetPages = "1-z"
})
- .AddAttachment(new DocumentAttachment
+ .AddAttachment(new DocumentOperation.DocumentAttachment
{
FilePath = "metadata.xml",
- Relationship = DocumentAttachmentRelationship.Supplement
+ Relationship = DocumentOperation.DocumentAttachmentRelationship.Supplement
})
- .Encrypt(new Encryption256Bit
+ .Encrypt(new DocumentOperation.Encryption256Bit
{
OwnerPassword = "owner456",
AllowPrinting = true,
diff --git a/docs/concepts/generating-output.md b/docs/concepts/generating-output.md
index 5eb711b..19c4817 100644
--- a/docs/concepts/generating-output.md
+++ b/docs/concepts/generating-output.md
@@ -39,7 +39,7 @@ The library also supports generating SVG files.
Each page is represented as a separate SVG file.
```csharp
-ICollection svgFiles = document.GenerateSvgFiles();
+ICollection svgFiles = document.GenerateSvg();
```
diff --git a/docs/concepts/length-unit-types.md b/docs/concepts/length-unit-types.md
index fb4db44..fa12dd1 100644
--- a/docs/concepts/length-unit-types.md
+++ b/docs/concepts/length-unit-types.md
@@ -14,12 +14,14 @@ Most Fluent API methods accept an optional unit parameter for specifying alterna
| Unit | Size |
|---------------------|------------------|
| Unit.**Point** | 1/72 inch |
-| Unit.**Meter** | 100 centimeters |
-| Unit.**Inch** | 2.54 centimeters |
-| Unit.**Centimeter** | 10 millimeters |
+| Unit.**Inch** | 72 points |
| Unit.**Feet** | 12 inches |
| Unit.**Mil** | 1/1000 inch |
-| Unit.**Inch** | 72 points |
+| Unit.**Meter** | 100 centimeters |
+| Unit.**Centimetre** | 10 millimeters |
+| Unit.**Millimetre** | 1/1000 meter |
+
+Note the British spelling of the metric values: `Unit.Centimetre` and `Unit.Millimetre`.
## Example
@@ -33,5 +35,5 @@ using QuestPDF.Infrastructure;
.Padding(72)
.Padding(1, Unit.Inch)
.Padding(1/12f, Unit.Feet)
-.Padding(1000, Unit.Mill)
+.Padding(1000, Unit.Mil)
```
\ No newline at end of file
diff --git a/docs/concepts/prototyping.md b/docs/concepts/prototyping.md
index 063ffef..081996c 100644
--- a/docs/concepts/prototyping.md
+++ b/docs/concepts/prototyping.md
@@ -78,17 +78,24 @@ Placeholders.Color();
#### BackgroundColor example
```csharp{11}
-.Grid(grid =>
+.Column(column =>
{
- grid.Columns(5);
- grid.Spacing(5);
+ column.Spacing(5);
- foreach (var _ in Enumerable.Range(0, 25))
+ foreach (var rowNumber in Enumerable.Range(0, 5))
{
- grid.Item()
- .Height(50)
- .Width(50)
- .Background(Placeholders.BackgroundColor());
+ column.Item().Row(row =>
+ {
+ row.Spacing(5);
+
+ foreach (var columnNumber in Enumerable.Range(0, 5))
+ {
+ row.RelativeItem()
+ .Height(50)
+ .Width(50)
+ .Background(Placeholders.BackgroundColor());
+ }
+ });
}
});
```
diff --git a/docs/examples/zugferd.md b/docs/examples/zugferd.md
index ae50b29..9a7db5d 100644
--- a/docs/examples/zugferd.md
+++ b/docs/examples/zugferd.md
@@ -46,7 +46,7 @@ Document
Subject = "ZUGFeRD Test Document",
Language = "en-US"
})
- .WithSettings(new DocumentSettings { PdfA = true }) // PDF/A-3b
+ .WithSettings(new DocumentSettings { PDFA_Conformance = PDFA_Conformance.PDFA_3B }) // PDF/A-3b
.GeneratePdf("invoice-bbb.pdf");
DocumentOperation
diff --git a/docs/public/api-reference/text-font-family.webp b/docs/public/api-reference/text-font-family.webp
index 8ed9a9b..202de21 100644
Binary files a/docs/public/api-reference/text-font-family.webp and b/docs/public/api-reference/text-font-family.webp differ