Browse Source

In code documentation (#644)

* Documentation: Padding

* Documentation: Alignment

* Documentation: Translate

* Documentation: Column

* Language adjustment

* Documentation: Row

* Documentation: Constrained

* Documentation: Content Direction

* Documentation: Border

* Documentation: Decoration

* Documentation: Unit

* Documentation adjustments

* Documentation: License Type

* Documentation: Placeholder

* Documentation: ShowOnce, SkipOnce, ShowIf

* Documentation: using shared XML + minor improvements

* Documentation: Scale

* Documentation: Debug

* Documentation: Rotate

* Documentation: Line

* Documentation: Layer

* Documentation: Extend

* Documentation: AspectRatio, Background, ShowEntire, EnsureSpace, PageBreak, Hyperlink, Section, SectionLink, Canvasm
Documentation: AspectRatio, Background, ShowEntire, EnsureSpace, PageBreak, Hyperlink, Section, SectionLink, Canvas, Unconstrained, DefaultTextStyle, StopPaging, ScaleToFit

* Documentation: AspectRatioOption enum

* Documentation: Minimal API

* Documentation: Merged Document

* Documentation: Generation

* Documentation: Element

* Adjustments

* API visibility adjustment

* Improvement: Content Direction

* Documentation: Container

* Documentation: Image

* Implementation fixes

* Missing shared documentation for images

* Improved documentation formatting

* Documentation: IDocument

* Documentation: Page

* Documentation: PageSize

* Documentation: PDF Fonts

* Documentation: Colors

* Documentation: Text Style

* Improved validation for table configuration

* Documentation: Table

* Documentation: Inlined

* Documentation: table

* Documentation: Text

* Adjustments

* Documentation: Placeholders

* Adjusted types visibility

* Documentation: Previewer

* Adjusted class visibility

* Documentation: Font Manager

* Documentation: IElement

* Documentation: IDocumentContainer

* Adjusted code visibility

* Documentation: Component

* Documentation: Dynamic Component

* Minor documentation fixes
Marcin Ziąbek 2 years ago
parent
commit
9c78864268
64 changed files with 2333 additions and 190 deletions
  1. 118 0
      Source/QuestPDF.Examples/PlaceholderExamples.cs
  2. 19 0
      Source/QuestPDF/Drawing/FontManager.cs
  3. 1 1
      Source/QuestPDF/Drawing/Proxy/DebugStackItem.cs
  4. 1 1
      Source/QuestPDF/Drawing/SkiaPictureCanvas.cs
  5. 1 1
      Source/QuestPDF/Drawing/SpacePlan.cs
  6. 1 1
      Source/QuestPDF/Drawing/SpacePlanType.cs
  7. 29 0
      Source/QuestPDF/Elements/Dynamic.cs
  8. 5 0
      Source/QuestPDF/Elements/DynamicImage.cs
  9. 2 3
      Source/QuestPDF/Elements/Page.cs
  10. 1 1
      Source/QuestPDF/Elements/Placeholder.cs
  11. 6 0
      Source/QuestPDF/Elements/Table/TableLayoutValidator.cs
  12. 24 0
      Source/QuestPDF/Fluent/AlignmentExtensions.cs
  13. 33 0
      Source/QuestPDF/Fluent/BorderExtensions.cs
  14. 15 0
      Source/QuestPDF/Fluent/ColumnExtensions.cs
  15. 3 0
      Source/QuestPDF/Fluent/ComponentExtentions.cs
  16. 30 0
      Source/QuestPDF/Fluent/ConstrainedExtensions.cs
  17. 10 0
      Source/QuestPDF/Fluent/ContentDirectionExtensions.cs
  18. 19 15
      Source/QuestPDF/Fluent/DebugExtensions.cs
  19. 47 0
      Source/QuestPDF/Fluent/DecorationExtensions.cs
  20. 15 0
      Source/QuestPDF/Fluent/DynamicComponentExtensions.cs
  21. 178 2
      Source/QuestPDF/Fluent/ElementExtensions.cs
  22. 12 0
      Source/QuestPDF/Fluent/ExtendExtensions.cs
  23. 46 17
      Source/QuestPDF/Fluent/GenerateExtensions.cs
  24. 86 28
      Source/QuestPDF/Fluent/ImageExtensions.cs
  25. 100 9
      Source/QuestPDF/Fluent/InlinedExtensions.cs
  26. 22 0
      Source/QuestPDF/Fluent/LayerExtensions.cs
  27. 23 3
      Source/QuestPDF/Fluent/LineExtensions.cs
  28. 29 0
      Source/QuestPDF/Fluent/MinimalApi.cs
  29. 43 1
      Source/QuestPDF/Fluent/PaddingExtensions.cs
  30. 119 2
      Source/QuestPDF/Fluent/PageExtensions.cs
  31. 19 1
      Source/QuestPDF/Fluent/RotateExtensions.cs
  32. 36 0
      Source/QuestPDF/Fluent/RowExtensions.cs
  33. 47 8
      Source/QuestPDF/Fluent/ScaleExtensions.cs
  34. 76 0
      Source/QuestPDF/Fluent/TableExtensions.cs
  35. 132 12
      Source/QuestPDF/Fluent/TextExtensions.cs
  36. 63 17
      Source/QuestPDF/Fluent/TextSpanDescriptorExtensions.cs
  37. 60 16
      Source/QuestPDF/Fluent/TextStyleExtensions.cs
  38. 15 1
      Source/QuestPDF/Fluent/TranslateExtensions.cs
  39. 16 0
      Source/QuestPDF/Helpers/Colors.cs
  40. 3 0
      Source/QuestPDF/Helpers/Fonts.cs
  41. 14 1
      Source/QuestPDF/Helpers/PageSizes.cs
  42. 179 13
      Source/QuestPDF/Helpers/Placeholders.cs
  43. 23 1
      Source/QuestPDF/Infrastructure/AspectRatioOption.cs
  44. 11 0
      Source/QuestPDF/Infrastructure/ContentDirection.cs
  45. 4 0
      Source/QuestPDF/Infrastructure/DocumentSettings.cs
  46. 1 1
      Source/QuestPDF/Infrastructure/ICacheable.cs
  47. 15 0
      Source/QuestPDF/Infrastructure/IComponent.cs
  48. 7 0
      Source/QuestPDF/Infrastructure/IContainer.cs
  49. 26 3
      Source/QuestPDF/Infrastructure/IDocument.cs
  50. 3 0
      Source/QuestPDF/Infrastructure/IDocumentContainer.cs
  51. 39 0
      Source/QuestPDF/Infrastructure/IDynamicComponent.cs
  52. 8 0
      Source/QuestPDF/Infrastructure/IElement.cs
  53. 11 9
      Source/QuestPDF/Infrastructure/IMergedDocument.cs
  54. 1 1
      Source/QuestPDF/Infrastructure/IRenderingCanvas.cs
  55. 24 0
      Source/QuestPDF/Infrastructure/Image.cs
  56. 6 6
      Source/QuestPDF/Infrastructure/ImageCompressionQuality.cs
  57. 5 1
      Source/QuestPDF/Infrastructure/ImageGenerationSettings.cs
  58. 8 4
      Source/QuestPDF/Infrastructure/LicenseType.cs
  59. 8 3
      Source/QuestPDF/Infrastructure/Unit.cs
  60. 2 2
      Source/QuestPDF/Previewer/ExceptionDocument.cs
  61. 1 1
      Source/QuestPDF/Previewer/HotReloadManager.cs
  62. 21 3
      Source/QuestPDF/Previewer/PreviewerExtensions.cs
  63. 410 0
      Source/QuestPDF/Resources/Documentation.xml
  64. 1 1
      Source/QuestPDF/Settings.cs

+ 118 - 0
Source/QuestPDF.Examples/PlaceholderExamples.cs

@@ -0,0 +1,118 @@
+using System;
+using System.Linq;
+using NUnit.Framework;
+using QuestPDF.Helpers;
+
+namespace QuestPDF.Examples;
+
+public class PlaceholderExamples
+{
+    private static void PrintRandomValues(Func<string> generator)
+    {
+        foreach (var i in Enumerable.Range(0, 3))
+            Console.WriteLine(generator());
+    }
+
+    [Test]
+    public void Label()
+    {
+        PrintRandomValues(Placeholders.Label);
+    }
+
+    [Test]
+    public void Sentence()
+    {
+        Console.WriteLine(Placeholders.Sentence());
+    }
+
+    [Test]
+    public void Question()
+    {
+        Console.WriteLine(Placeholders.Question());
+    }
+
+    [Test]
+    public void Paragraph()
+    {
+        Console.WriteLine(Placeholders.Paragraph());
+    }
+
+    [Test]
+    public void Paragraphs()
+    {
+        Console.WriteLine(Placeholders.Paragraphs());
+    }
+
+    [Test]
+    public void Email()
+    {
+        PrintRandomValues(Placeholders.Email);
+    }
+
+    [Test]
+    public void Name()
+    {
+        PrintRandomValues(Placeholders.Name);
+    }
+
+    [Test]
+    public void PhoneNumber()
+    {
+        PrintRandomValues(Placeholders.PhoneNumber);
+    }
+
+    [Test]
+    public void Time()
+    {
+        PrintRandomValues(Placeholders.Time);
+    }
+
+    [Test]
+    public void ShortDate()
+    {
+        PrintRandomValues(Placeholders.ShortDate);
+    }
+
+    [Test]
+    public void LongDate()
+    {
+        PrintRandomValues(Placeholders.LongDate);
+    }
+    
+    [Test]
+    public void DateTime()
+    {
+        PrintRandomValues(Placeholders.DateTime);
+    }
+    
+    [Test]
+    public void Integer()
+    {
+        PrintRandomValues(Placeholders.Integer);
+    }
+    
+    [Test]
+    public void Decimal()
+    {
+        PrintRandomValues(Placeholders.Decimal);
+    }
+    
+    [Test]
+    public void Percent()
+    {
+        PrintRandomValues(Placeholders.Percent);
+    }
+    
+    [Test]
+    public void BackgroundColor()
+    {
+        PrintRandomValues(Placeholders.BackgroundColor);
+    }
+    
+    [Test]
+    public void Color()
+    {
+        PrintRandomValues(Placeholders.Color);
+    }
+}
+    

+ 19 - 0
Source/QuestPDF/Drawing/FontManager.cs

@@ -12,6 +12,11 @@ using SkiaSharp.HarfBuzz;
 
 namespace QuestPDF.Drawing
 {
+    /// <summary>
+    /// <para>By default, the library searches all fonts available in the runtime environment.</para>
+    /// <para>This may work well on the development environment but may fail in the cloud where fonts are usually not installed.</para>
+    /// <para>It is safest deploy font files along with the application and then register them using this class.</para>
+    /// </summary>
     public static class FontManager
     {
         private static readonly ConcurrentDictionary<string, FontStyleSet> StyleSets = new();
@@ -49,6 +54,11 @@ namespace QuestPDF.Drawing
             RegisterFontWithCustomName(fontName, stream);
         }
         
+        /// <summary>
+        /// Registers a TrueType font from a stream under the provided custom <paramref name="fontName"/>.
+        /// Refer to this font by using the same name as a font family in the <see cref="TextStyle"/> API later on.
+        /// <a href="https://www.questpdf.com/going-production/font-management.html">Learn more</a>
+        /// </summary>
         public static void RegisterFontWithCustomName(string fontName, Stream stream)
         {
             using var fontData = SKData.Create(stream);
@@ -56,12 +66,21 @@ namespace QuestPDF.Drawing
             RegisterFontType(fontData, customName: fontName);
         }
 
+        /// <summary>
+        /// Registers a TrueType font from a stream. The font family name and all related attributes are detected automatically.
+        /// <a href="https://www.questpdf.com/going-production/font-management.html">Learn more</a>
+        /// </summary>
         public static void RegisterFont(Stream stream)
         {
             using var fontData = SKData.Create(stream);
             RegisterFontType(fontData);
         }
         
+        /// <summary>
+        /// Registers a TrueType font from an embedded resource. The font family name and all related attributes are detected automatically.
+        /// <a href="https://www.questpdf.com/going-production/font-management.html">Learn more</a>
+        /// </summary>
+        /// <param name="pathName">Path to the embedded resource (the case-sensitive name of the manifest resource being requested).</param>
         public static void RegisterFontFromEmbeddedResource(string pathName)
         {
             using var stream = Assembly.GetCallingAssembly().GetManifestResourceStream(pathName);

+ 1 - 1
Source/QuestPDF/Drawing/Proxy/DebugStackItem.cs

@@ -3,7 +3,7 @@ using QuestPDF.Infrastructure;
 
 namespace QuestPDF.Drawing.Proxy
 {
-    public class DebugStackItem
+    internal class DebugStackItem
     {
         public IElement Element { get; internal set; }
         public Size AvailableSpace { get; internal set; }

+ 1 - 1
Source/QuestPDF/Drawing/SkiaPictureCanvas.cs

@@ -7,7 +7,7 @@ using SkiaSharp;
 
 namespace QuestPDF.Drawing
 {
-    public class PreviewerPicture
+    internal class PreviewerPicture
     {
         public SKPicture Picture { get; set; }
         public Size Size { get; set; }

+ 1 - 1
Source/QuestPDF/Drawing/SpacePlan.cs

@@ -3,7 +3,7 @@ using QuestPDF.Infrastructure;
 
 namespace QuestPDF.Drawing
 {
-    public readonly struct SpacePlan
+    internal readonly struct SpacePlan
     {
         public readonly SpacePlanType Type;
         public readonly float Width;

+ 1 - 1
Source/QuestPDF/Drawing/SpacePlanType.cs

@@ -1,6 +1,6 @@
 namespace QuestPDF.Drawing
 {
-    public enum SpacePlanType
+    internal enum SpacePlanType
     {
         Wrap,
         PartialRender,

+ 29 - 0
Source/QuestPDF/Elements/Dynamic.cs

@@ -80,6 +80,9 @@ namespace QuestPDF.Elements
         }
     }
 
+    /// <summary>
+    /// Stores all contextual information available for the dynamic component.
+    /// </summary>
     public class DynamicContext
     {
         internal IPageContext PageContext { get; set; }
@@ -92,10 +95,30 @@ namespace QuestPDF.Elements
         internal ImageCompressionQuality ImageCompressionQuality { get; set; }
         internal bool UseOriginalImage { get; set; }
         
+        /// <summary>
+        /// Returns the number of the page being rendered at the moment.
+        /// </summary>
         public int PageNumber { get; internal set; }
+        
+        /// <summary>
+        /// Returns the total count of pages in the document.
+        /// </summary>
+        /// <remarks>
+        /// Document rendering occurs in two phases.
+        /// The value of this property might be imprecise during the initial rendering phase.
+        /// </remarks>
         public int TotalPages { get; internal set; }
+        
+        /// <summary>
+        /// Returns the vertical and horizontal space, in points, available to the dynamic component.
+        /// </summary>
         public Size AvailableSize { get; internal set; }
 
+        /// <summary>
+        /// Enables the creation of unattached layout structures and provides their size measurements.
+        /// </summary>
+        /// <param name="content">The handler responsible for constructing the new layout structure.</param>
+        /// <returns>A newly created content, with its physical size.</returns>
         public IDynamicElement CreateElement(Action<IContainer> content)
         {
             var container = new DynamicElement();
@@ -114,8 +137,14 @@ namespace QuestPDF.Elements
         }
     }
 
+    /// <summary>
+    /// Represents any unattached content element, created by the dynamic component.
+    /// </summary>
     public interface IDynamicElement : IElement
     {
+        /// <summary>
+        /// Specifies the vertical and horizontal size, measured in points, required by the element to be drawn completely, assuming infinite canvas.
+        /// </summary>
         Size Size { get; }
     }
 

+ 5 - 0
Source/QuestPDF/Elements/DynamicImage.cs

@@ -7,6 +7,11 @@ using SkiaSharp;
 
 namespace QuestPDF.Elements
 {
+    /// <summary>
+    /// Generates an image based on the given resolution.
+    /// </summary>
+    /// <param name="size">Desired resolution of the image in pixels.</param>
+    /// <returns>An image in PNG, JPEG, or WEBP image format returned as byte array.</returns>
     public delegate byte[] GenerateDynamicImageDelegate(ImageSize size);
     
     internal class DynamicImage : Element

+ 2 - 3
Source/QuestPDF/Elements/Page.cs

@@ -19,7 +19,7 @@ namespace QuestPDF.Elements
         public float MarginTop { get; set; }
         public float MarginBottom { get; set; }
 
-        public string BackgroundColor { get; set; } = Colors.Transparent;
+        public string BackgroundColor { get; set; } = Colors.White;
         
         public Element Background { get; set; } = Empty.Instance;
         public Element Foreground { get; set; } = Empty.Instance;
@@ -33,6 +33,7 @@ namespace QuestPDF.Elements
             container
                 .ContentDirection(ContentDirection)
                 .Background(BackgroundColor)
+                .DefaultTextStyle(DefaultTextStyle)
                 .Layers(layers =>
                 {
                     layers
@@ -53,8 +54,6 @@ namespace QuestPDF.Elements
                         .PaddingTop(MarginTop)
                         .PaddingBottom(MarginBottom)
                 
-                        .DefaultTextStyle(DefaultTextStyle)
-                
                         .Decoration(decoration =>
                         {
                             decoration

+ 1 - 1
Source/QuestPDF/Elements/Placeholder.cs

@@ -24,7 +24,7 @@ namespace QuestPDF.Elements
                 .Element(x =>
                 {
                     if (string.IsNullOrWhiteSpace(Text))
-                        x.MaxHeight(32).Image(ImageData, ImageScaling.FitArea);
+                        x.MaxHeight(32).Image(ImageData).FitArea();
                     
                     else
                         x.Text(Text).FontSize(14);

+ 6 - 0
Source/QuestPDF/Elements/Table/TableLayoutValidator.cs

@@ -25,6 +25,12 @@ namespace QuestPDF.Elements.Table
                 if (cell.Row < 1)
                     throw new DocumentComposeException($"{prefix} A cell row position should be greater or equal to 1. Got {cell.Row}.");
                 
+                if (cell.ColumnSpan < 1)
+                    throw new DocumentComposeException($"{prefix} A cell must span at least one column. Got {cell.ColumnSpan}.");
+                
+                if (cell.RowSpan < 1)
+                    throw new DocumentComposeException($"{prefix} A cell must span at least one row. Got {cell.RowSpan}.");
+                
                 if (cell.Column > columnsCount)
                     throw new DocumentComposeException($"{prefix} Cell starts at column that does not exist. Cell details: {GetCellDetails(cell)}.");
                 

+ 24 - 0
Source/QuestPDF/Fluent/AlignmentExtensions.cs

@@ -14,31 +14,55 @@ namespace QuestPDF.Fluent
             return element.Element(alignment);
         }
         
+        /// <summary>
+        /// Aligns content horizontally to the left side.
+        /// <a href="https://www.questpdf.com/api-reference/alignment.html">Learn more</a>
+        /// </summary>
         public static IContainer AlignLeft(this IContainer element)
         {
             return element.Alignment(x => x.Horizontal = HorizontalAlignment.Left);
         }
         
+        /// <summary>
+        /// Aligns content horizontally to the center, ensuring equal space on both left and right sides.
+        /// <a href="https://www.questpdf.com/api-reference/alignment.html">Learn more</a>
+        /// </summary>
         public static IContainer AlignCenter(this IContainer element)
         {
             return element.Alignment(x => x.Horizontal = HorizontalAlignment.Center);
         }
         
+        /// <summary>
+        /// Aligns its content horizontally to the right side.
+        /// <a href="https://www.questpdf.com/api-reference/alignment.html">Learn more</a>
+        /// </summary>
         public static IContainer AlignRight(this IContainer element)
         {
             return element.Alignment(x => x.Horizontal = HorizontalAlignment.Right);
         }
         
+        /// <summary>
+        /// Aligns content vertically to the upper side.
+        /// <a href="https://www.questpdf.com/api-reference/alignment.html">Learn more</a>
+        /// </summary>
         public static IContainer AlignTop(this IContainer element)
         {
             return element.Alignment(x => x.Vertical = VerticalAlignment.Top);
         }
         
+        /// <summary>
+        /// Aligns content vertically to the center, ensuring equal space above and below.
+        /// <a href="https://www.questpdf.com/api-reference/alignment.html">Learn more</a>
+        /// </summary>
         public static IContainer AlignMiddle(this IContainer element)
         {
             return element.Alignment(x => x.Vertical = VerticalAlignment.Middle);
         }
         
+        /// <summary>
+        /// Aligns content vertically to the bottom side.
+        /// <a href="https://www.questpdf.com/api-reference/alignment.html">Learn more</a>
+        /// </summary>
         public static IContainer AlignBottom(this IContainer element)
         {
             return element.Alignment(x => x.Vertical = VerticalAlignment.Bottom);

+ 33 - 0
Source/QuestPDF/Fluent/BorderExtensions.cs

@@ -15,6 +15,10 @@ namespace QuestPDF.Fluent
             return element.Element(border);
         }
         
+        /// <summary>
+        /// Sets a uniform border (all edges) for its content.
+        /// <a href="https://www.questpdf.com/api-reference/border.html">Learn more</a>
+        /// </summary>
         public static IContainer Border(this IContainer element, float value, Unit unit = Unit.Point)
         {
             return element
@@ -22,6 +26,10 @@ namespace QuestPDF.Fluent
                 .BorderVertical(value, unit);
         }
         
+        /// <summary>
+        /// Sets a vertical border (left and right) for its content.
+        /// <a href="https://www.questpdf.com/api-reference/border.html">Learn more</a>
+        /// </summary>
         public static IContainer BorderVertical(this IContainer element, float value, Unit unit = Unit.Point)
         {
             return element
@@ -29,6 +37,10 @@ namespace QuestPDF.Fluent
                 .BorderRight(value, unit);
         }
         
+        /// <summary>
+        /// Sets a horizontal border (top and bottom) for its content.
+        /// <a href="https://www.questpdf.com/api-reference/border.html">Learn more</a>
+        /// </summary>
         public static IContainer BorderHorizontal(this IContainer element, float value, Unit unit = Unit.Point)
         {
             return element
@@ -36,26 +48,47 @@ namespace QuestPDF.Fluent
                 .BorderBottom(value, unit);
         }
         
+        /// <summary>
+        /// Sets a border on the left side of its content.
+        /// <a href="https://www.questpdf.com/api-reference/border.html">Learn more</a>
+        /// </summary>
         public static IContainer BorderLeft(this IContainer element, float value, Unit unit = Unit.Point)
         {
             return element.Border(x => x.Left = value.ToPoints(unit));
         }
         
+        /// <summary>
+        /// Sets a border on the right side of its content.
+        /// <a href="https://www.questpdf.com/api-reference/border.html">Learn more</a>
+        /// </summary>
         public static IContainer BorderRight(this IContainer element, float value, Unit unit = Unit.Point)
         {
             return element.Border(x => x.Right = value.ToPoints(unit));
         }
         
+        /// <summary>
+        /// Sets a border on the top side of its content.
+        /// <a href="https://www.questpdf.com/api-reference/border.html">Learn more</a>
+        /// </summary>
         public static IContainer BorderTop(this IContainer element, float value, Unit unit = Unit.Point)
         {
             return element.Border(x => x.Top = value.ToPoints(unit));
         }
         
+        /// <summary>
+        /// Sets a border on the bottom side of its content.
+        /// <a href="https://www.questpdf.com/api-reference/border.html">Learn more</a>
+        /// </summary>        
         public static IContainer BorderBottom(this IContainer element, float value, Unit unit = Unit.Point)
         {
             return element.Border(x => x.Bottom = value.ToPoints(unit));
         }
         
+        /// <summary>
+        /// Adjusts color of the border element.
+        /// <a href="https://www.questpdf.com/api-reference/border.html">Learn more</a>
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="colorParam"]/*' />
         public static IContainer BorderColor(this IContainer element, string color)
         {
             ColorValidator.Validate(color);

+ 15 - 0
Source/QuestPDF/Fluent/ColumnExtensions.cs

@@ -8,11 +8,18 @@ namespace QuestPDF.Fluent
     {
         internal Column Column { get; } = new();
 
+        /// <summary>
+        /// Adjusts vertical spacing between items.
+        /// </summary>
         public void Spacing(float value, Unit unit = Unit.Point)
         {
             Column.Spacing = value.ToPoints(unit);
         }
         
+        /// <summary>
+        /// Adds a new item to the column element.
+        /// </summary>
+        /// <returns>The container of the newly created item.</returns>
         public IContainer Item()
         {
             var container = new Container();
@@ -34,6 +41,14 @@ namespace QuestPDF.Fluent
             element.Column(handler);
         }
         
+        /// <summary>
+        /// Draws a collection of elements vertically (from top to bottom).
+        /// <a href="https://www.questpdf.com/api-reference/column.html">Learn more</a>
+        /// </summary>
+        /// <remarks>
+        /// Supports paging.
+        /// </remarks>
+        /// <param name="handler">The action to configure the column's content.</param>
         public static void Column(this IContainer element, Action<ColumnDescriptor> handler)
         {
             var descriptor = new ColumnDescriptor();

+ 3 - 0
Source/QuestPDF/Fluent/ComponentExtentions.cs

@@ -41,11 +41,14 @@ namespace QuestPDF.Fluent
     
     public static class ComponentExtensions
     {
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="component"]/*' />
+        /// <param name="component">Instance of the class implementing the <see cref="IComponent"></see> interface.</param>
         public static void Component<T>(this IContainer element, T component) where T : IComponent
         {
             element.Component(component, null);
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="component"]/*' />
         public static void Component<T>(this IContainer element) where T : IComponent, new()
         {
             element.Component(new T(), null);

+ 30 - 0
Source/QuestPDF/Fluent/ConstrainedExtensions.cs

@@ -14,6 +14,11 @@ namespace QuestPDF.Fluent
             return element.Element(constrained);
         }
         
+        /// <summary>
+        /// Sets the exact width of its content.
+        /// <a href="https://www.questpdf.com/api-reference/width.html">Learn more</a>
+        /// </summary>
+        /// <returns>The container with the specified exact width.</returns>
         public static IContainer Width(this IContainer element, float value, Unit unit = Unit.Point)
         {
             return element
@@ -21,16 +26,31 @@ namespace QuestPDF.Fluent
                 .MaxWidth(value, unit);
         }
         
+        /// <summary>
+        /// Sets the minimum width of its content.
+        /// <a href="https://www.questpdf.com/api-reference/width.html">Learn more</a>
+        /// </summary>
+        /// <returns>The container with the specified minimum width.</returns>
         public static IContainer MinWidth(this IContainer element, float value, Unit unit = Unit.Point)
         {
             return element.Constrained(x => x.MinWidth = value.ToPoints(unit));
         }
         
+        /// <summary>
+        /// Sets the maximum width of its content.
+        /// <a href="https://www.questpdf.com/api-reference/width.html">Learn more</a>
+        /// </summary>
+        /// <returns>The container with the specified maximum width.</returns>
         public static IContainer MaxWidth(this IContainer element, float value, Unit unit = Unit.Point)
         {
             return element.Constrained(x => x.MaxWidth = value.ToPoints(unit));
         }
         
+        /// <summary>
+        /// Sets the exact height of its content.
+        /// <a href="https://www.questpdf.com/api-reference/height.html">Learn more</a>
+        /// </summary>
+        /// <returns>The container with the specified exact height.</returns>
         public static IContainer Height(this IContainer element, float value, Unit unit = Unit.Point)
         {
             return element
@@ -38,11 +58,21 @@ namespace QuestPDF.Fluent
                 .MaxHeight(value, unit);
         }
         
+        /// <summary>
+        /// Sets the minimum height of its content.
+        /// <a href="https://www.questpdf.com/api-reference/height.html">Learn more</a>
+        /// </summary>
+        /// <returns>The container with the specified minimum height.</returns>
         public static IContainer MinHeight(this IContainer element, float value, Unit unit = Unit.Point)
         {
             return element.Constrained(x => x.MinHeight = value.ToPoints(unit));
         }
         
+        /// <summary>
+        /// Sets the maximum height of its content.
+        /// <a href="https://www.questpdf.com/api-reference/height.html">Learn more</a>
+        /// </summary>
+        /// <returns>The container with the specified maximum height.</returns>
         public static IContainer MaxHeight(this IContainer element, float value, Unit unit = Unit.Point)
         {
             return element.Constrained(x => x.MaxHeight = value.ToPoints(unit));

+ 10 - 0
Source/QuestPDF/Fluent/ContentDirectionExtensions.cs

@@ -13,11 +13,21 @@ namespace QuestPDF.Fluent
             });
         }
         
+        /// <summary>
+        /// Sets the left-to-right (LTR) direction for its entire content.
+        /// <a href="https://www.questpdf.com/api-reference/content-direction.html">Learn more</a>
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="contentDirection.ltr.remarks"]/*' />
         public static IContainer ContentFromLeftToRight(this IContainer element)
         {
             return element.ContentDirection(Infrastructure.ContentDirection.LeftToRight);
         }
         
+        /// <summary>
+        /// Sets the right-to-left (RTL) direction for its entire content.
+        /// <a href="https://www.questpdf.com/api-reference/content-direction.html">Learn more</a>
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="contentDirection.rtl.remarks"]/*' />
         public static IContainer ContentFromRightToLeft(this IContainer element)
         {
             return element.ContentDirection(Infrastructure.ContentDirection.RightToLeft);

+ 19 - 15
Source/QuestPDF/Fluent/DebugExtensions.cs

@@ -1,4 +1,5 @@
-using QuestPDF.Elements;
+using QuestPDF.Drawing.Exceptions;
+using QuestPDF.Elements;
 using QuestPDF.Helpers;
 using QuestPDF.Infrastructure;
 
@@ -6,7 +7,15 @@ namespace QuestPDF.Fluent
 {
     public static class DebugExtensions
     {
-        public static IContainer DebugArea(this IContainer parent, string text, string color)
+        /// <summary>
+        /// Draws a labeled box around its inner content.
+        /// Useful for visual debugging and pinpointing output from specific code blocks.
+        /// <br />
+        /// <a href="https://www.questpdf.com/api-reference/debug-area.html">Learn more</a>
+        /// </summary>
+        /// <param name="text">Optional label displayed within the box.</param>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="colorParam"]/*' />
+        public static IContainer DebugArea(this IContainer parent, string? text = null, string color = Colors.Red.Medium)
         {
             ColorValidator.Validate(color);
             
@@ -15,27 +24,22 @@ namespace QuestPDF.Fluent
             parent.Component(new DebugArea
             {
                 Child = container,
-                Text = text,
+                Text = text ?? string.Empty,
                 Color = color
             });
 
             return container;
         }
-        
-        public static IContainer DebugArea(this IContainer parent, string text)
-        {
-            return parent.DebugArea(text, Colors.Red.Medium);
-        }
 
-        public static IContainer DebugArea(this IContainer parent)
-        {
-            return parent.DebugArea(string.Empty, Colors.Red.Medium);
-        }
-        
         /// <summary>
-        /// Creates a virtual element that is visible on the elements trace when the layout overflow exception is thrown.
-        /// This can be used to easily identify elements inside the elements trace tree and faster find issue root cause.
+        /// <para>Inserts a virtual debug element visible in the "element trace" provided along with the <see cref="DocumentLayoutException" />.</para>
+        /// <para>Helps with understanding and navigation of that "element trace" tree hierarchy.</para>
+        /// <a href="https://www.questpdf.com/api-reference/debug-pointer.html">Learn more</a>
         /// </summary>
+        /// <remarks>
+        /// This debug element does not appear in the final PDF output.
+        /// </remarks>
+        /// <param name="elementTraceText">Text visible somewhere in the "element trace" content identifying given document fragment.</param>
         public static IContainer DebugPointer(this IContainer parent, string elementTraceText)
         {
             return parent.DebugPointer(elementTraceText, true);

+ 47 - 0
Source/QuestPDF/Fluent/DecorationExtensions.cs

@@ -8,6 +8,12 @@ namespace QuestPDF.Fluent
     {
         internal Decoration Decoration { get; } = new Decoration();
         
+        /// <summary>
+        /// Returns a container for the section positioned before (above) the primary main content.
+        /// </summary>
+        /// <remarks>
+        /// This container is fully visible on each page and does not support paging.
+        /// </remarks>
         public IContainer Before()
         {
             var container = new Container();
@@ -15,11 +21,23 @@ namespace QuestPDF.Fluent
             return container;
         }
         
+        /// <summary>
+        /// Provides a handler to the section that appears before (above) the main content.
+        /// </summary>
+        /// <remarks>
+        /// This container is fully visible on each page and does not support paging.
+        /// </remarks>
         public void Before(Action<IContainer> handler)
         {
             handler?.Invoke(Before());
         }
         
+        /// <summary>
+        /// Returns a container for the main section.
+        /// </summary>
+        /// <remarks>
+        /// This container does support paging.
+        /// </remarks>
         public IContainer Content()
         {
             var container = new Container();
@@ -27,11 +45,23 @@ namespace QuestPDF.Fluent
             return container;
         }
         
+        /// <summary>
+        /// Provides a handler to define content of the main section.
+        /// </summary>
+        /// <remarks>
+        /// This container does support paging.
+        /// </remarks>
         public void Content(Action<IContainer> handler)
         {
             handler?.Invoke(Content());
         }
         
+        /// <summary>
+        /// Returns a container for the section positioned after (below) the main content.
+        /// </summary>
+        /// <remarks>
+        /// This container is fully visible on each page and does not support paging.
+        /// </remarks>
         public IContainer After()
         {
             var container = new Container();
@@ -39,6 +69,12 @@ namespace QuestPDF.Fluent
             return container;
         }
         
+        /// <summary>
+        /// Provides a handler to the section that appears after (below) the main content.
+        /// </summary>
+        /// <remarks>
+        /// This container is fully visible on each page and does not support paging.
+        /// </remarks>
         public void After(Action<IContainer> handler)
         {
             handler?.Invoke(After());
@@ -79,6 +115,17 @@ namespace QuestPDF.Fluent
     
     public static class DecorationExtensions
     {
+        /// <summary>
+        /// <para>Divides the container's space into three distinct sections: before, content, and after.</para>
+        /// <para>The "before" section is rendered above the main content, while the "after" section is rendered below it.</para>
+        /// <para>If the main "content" spans across multiple pages, both the "before" and "after" sections are consistently rendered on every page.</para>
+        /// <br />
+        /// <a href="https://www.questpdf.com/api-reference/decoration.html">Learn more</a>
+        /// </summary>
+        /// <example>
+        /// A typical use-case for this method is to render a table that spans multiple pages, with a consistent caption or header on each page.
+        /// </example>
+        /// <param name="handler">The action to configure the content.</param>
         public static void Decoration(this IContainer element, Action<DecorationDescriptor> handler)
         {
             var descriptor = new DecorationDescriptor();

+ 15 - 0
Source/QuestPDF/Fluent/DynamicComponentExtensions.cs

@@ -5,12 +5,27 @@ namespace QuestPDF.Fluent
 {
     public static class DynamicComponentExtensions
     {
+        /// <summary>
+        /// Represents a section of the document dynamically created based on its inner state.
+        /// Components are page-aware, understand their positioning, can dynamically construct other content elements, and assess their dimensions, enabling complex layout creations.
+        /// <a href="https://www.questpdf.com/concepts/dynamic-components.html">Learn more</a>
+        /// </summary>
+        /// <example>
+        /// <para>
+        /// Consider an invoice that presents all purchased items in a table format.
+        /// Instead of just showing the final total price under the table, the requirement is to display the cumulative prices on each separate page.
+        /// </para>
+        /// <para>Using the dynamic component, you can manually assemble the table, count how many items are visible on each page, calculate the price sum for items visible on each page, and then render the result under each sub-table.</para>
+        /// </example>
         public static void Dynamic<TState>(this IContainer element, IDynamicComponent<TState> dynamicElement) where TState : struct
         {
             var componentProxy = DynamicComponentProxy.CreateFrom(dynamicElement);
             element.Element(new DynamicHost(componentProxy));
         }
         
+        /// <summary>
+        /// Allows to inject the unattached content created by the <see cref="DynamicContext.CreateElement"/> method within the <see cref="DynamicComponentExtensions.Dynamic">Dynamic component</see>.
+        /// </summary>
         public static void Element(this IContainer element, IDynamicElement child)
         {
             ElementExtensions.Element(element, child);

+ 178 - 2
Source/QuestPDF/Fluent/ElementExtensions.cs

@@ -32,16 +32,44 @@ namespace QuestPDF.Fluent
             return child;
         }
         
-        public static void Element<TParent>(this TParent parent, Action<IContainer> handler) where TParent : IContainer
+        /// <summary>
+        /// Passes the Fluent API chain to the provided <paramref name="handler"/> method.
+        /// <a href="https://www.questpdf.com/api-reference/element.html">Learn more</a>
+        /// </summary>
+        /// <remarks>
+        /// <para>This method is particularly useful for code refactoring, improving its structure and readability.</para>
+        /// <para>Extracting implementation of certain layout structures into separate methods, allows you to accurately describe their purpose and reuse them code in various parts of the application.</para>
+        /// </remarks>
+        /// <param name="handler">A delegate that takes the current container and populates it with content.</param>
+        public static void Element(this IContainer parent, Action<IContainer> handler)
         {
             handler(parent.Container());
         }
         
-        public static IContainer Element<TParent>(this TParent parent, Func<IContainer, IContainer> handler) where TParent : IContainer
+        /// <summary>
+        /// Passes the Fluent API chain to the provided <paramref name="handler"/> method.
+        /// <a href="https://www.questpdf.com/api-reference/element.html">Learn more</a>
+        /// </summary>
+        /// <remarks>
+        /// <para>This method is particularly useful for code refactoring, improving its structure and readability.</para>
+        /// <para>Extracting implementation of certain layout structures into separate methods, allows you to accurately describe their purpose and reuse them code in various parts of the application.</para>
+        /// </remarks>
+        /// <param name="handler">A method that accepts the current container, optionally populates it with content, and returns a subsequent container to continue the Fluent API chain.</param>
+        /// <returns>The container returned by the <paramref name="handler"/> method.</returns>
+        public static IContainer Element(this IContainer parent, Func<IContainer, IContainer> handler)
         {
             return handler(parent.Container()).Container();
         }
         
+        /// <summary>
+        /// Constrains its content to maintain a given aspect ratio.
+        /// <a href="https://www.questpdf.com/api-reference/aspect-ratio.html">Learn more</a>
+        /// </summary>
+        /// <remarks>
+        /// This container enforces strict space constraints. The <see cref="DocumentLayoutException" /> may be thrown if these constraints can't be satisfied.
+        /// </remarks>
+        /// <param name="ratio">Represents the aspect ratio as a width-to-height division. For instance, a container with a width of 250 points and a height of 200 points has an aspect ratio of 1.25.</param>
+        /// <param name="option">Determines the approach the component should adopt when maintaining the specified aspect ratio.</param>
         public static IContainer AspectRatio(this IContainer element, float ratio, AspectRatioOption option = AspectRatioOption.FitWidth)
         {
             return element.Element(new AspectRatio
@@ -51,6 +79,11 @@ namespace QuestPDF.Fluent
             });
         }
 
+        /// <summary>
+        /// Sets a solid background color behind its content.
+        /// <a href="https://www.questpdf.com/api-reference/background.html">Learn more</a>
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="colorParam"]/*' />
         public static IContainer Background(this IContainer element, string color)
         {
             ColorValidator.Validate(color);
@@ -61,6 +94,19 @@ namespace QuestPDF.Fluent
             });
         }
 
+        /// <summary>
+        /// Draws a basic placeholder useful for prototyping.
+        /// <a href="https://www.questpdf.com/api-reference/placeholder.html">Learn more</a>
+        /// </summary>
+        /// <remarks>
+        /// You can control the size of the Placeholder by chaining other elements before its invocation, e.g.:
+        /// <code>
+        /// .Width(200)
+        /// .Height(100)
+        /// .Placeholder("Sample text");
+        /// </code>
+        /// </remarks>
+        /// <param name="text">When provided, the placeholder displays this text. If omitted, a simple image icon is shown instead.</param>
         public static void Placeholder(this IContainer element, string? text = null)
         {
             element.Component(new Placeholder
@@ -69,21 +115,70 @@ namespace QuestPDF.Fluent
             });
         }
 
+        /// <summary>
+        /// If the container spans multiple pages, its content appears only on the first one.
+        /// <a href="https://www.questpdf.com/api-reference/show-once.html">Learn more</a>
+        /// </summary>
+        /// <remarks>
+        /// <para>This element is useful if you wish to display a header on every page but want certain elements visible only on the first page.</para>
+        /// <para>Depending on the content, certain elements (such as Row or Table) may repeatedly draw their items across multiple pages. Use the ShowOnce element to modify this behavior if it's not desired.</para>
+        /// </remarks>
+        /// <example>
+        /// <para>Combine this element with SkipOnce to achieve more complex behaviors, e.g.:</para>
+        /// <para><c>.SkipOnce().ShowOnce()</c> ensures the child element is displayed only on the second page.</para>
+        /// <para><c>.SkipOnce().SkipOnce()</c> starts displaying the child element from the third page onwards.</para>
+        /// <para><c>.ShowOnce().SkipOnce()</c> draws nothing, as the order of invocation is important.</para>
+        /// </example>
         public static IContainer ShowOnce(this IContainer element)
         {
             return element.Element(new ShowOnce());
         }
 
+        /// <summary>
+        /// If the container spans multiple pages, its content is omitted on the first page and then displayed on the second and subsequent pages.
+        /// <a href="https://www.questpdf.com/api-reference/skip-once.html">Learn more</a>
+        /// </summary>
+        /// <remarks>
+        /// A common use-case for this element is when displaying a consistent header across pages but needing to conditionally show/hide specific fragments on the first page.
+        /// </remarks>
+        /// <example>
+        /// <para>Combine this element with ShowOnce to achieve more complex behaviors, e.g.:</para>
+        /// <para><c>.SkipOnce().ShowOnce()</c> ensures the child element is displayed only on the second page.</para>
+        /// <para><c>.SkipOnce().SkipOnce()</c> starts displaying the child element from the third page onwards.</para>
+        /// <para><c>.ShowOnce().SkipOnce()</c> draws nothing, as the order of invocation is important.</para>
+        /// </example>
         public static IContainer SkipOnce(this IContainer element)
         {
             return element.Element(new SkipOnce());
         }
 
+        /// <summary>
+        /// Ensures its content is displayed entirely on a single page by disabling the default paging capability.
+        /// <a href="https://www.questpdf.com/api-reference/show-entire.html">Learn more</a>
+        /// </summary>
+        /// <remarks>
+        /// <para>While many library elements inherently support paging, allowing content to span multiple pages, this element restricts that behavior.</para>
+        /// <para>Employ this when a single-page display is crucial.</para>
+        /// <para>Be cautious: its strict space constraints can trigger the <see cref="DocumentLayoutException" /> if content exceeds the page's capacity.</para>
+        /// </remarks>
         public static IContainer ShowEntire(this IContainer element)
         {
             return element.Element(new ShowEntire());
         }
 
+        /// <summary>
+        /// <para>Serves as a less-strict approach compared to the <see cref="ElementExtensions.ShowEntire">ShowEntire</see> element.</para>
+        /// <para>
+        /// It impacts only the very first page of its content's occurence.
+        /// If the element fits within its first page, it's rendered as usual.
+        /// However, if the element doesn't fit and the available space has less vertical space than required height, the content is entirely shifted to the next page.
+        /// </para>
+        /// <br />
+        /// <a href="https://www.questpdf.com/api-reference/ensure-space.html">Learn more</a>
+        /// </summary>
+        /// <remarks>
+        /// This is especially useful for elements like tables, where you'd want to display several rows together. By setting the minHeight, you can avoid scenarios where only a single row appears at the page's end, ensuring a more cohesive presentation.
+        /// </remarks>
         public static IContainer EnsureSpace(this IContainer element, float minHeight = Elements.EnsureSpace.DefaultMinHeight)
         {
             return element.Element(new EnsureSpace
@@ -92,11 +187,21 @@ namespace QuestPDF.Fluent
             });
         }
 
+        /// <summary>
+        /// Inserts a break that pushes the subsequent content to start on a new page.
+        /// <a href="https://www.questpdf.com/api-reference/page-break.html">Learn more</a>
+        /// </summary>
         public static void PageBreak(this IContainer element)
         {
             element.Element(new PageBreak());
         }
         
+        /// <summary>
+        /// A neutral layout structure that neither contributes to nor alters its content.
+        /// </summary>
+        /// <remarks>
+        /// By default, certain FluentAPI calls may be batched together for optimized performance. Introduce this element if you wish to separate and prevent such optimizations.
+        /// </remarks>
         public static IContainer Container(this IContainer element)
         {
             return element.Element(new Container());
@@ -108,6 +213,11 @@ namespace QuestPDF.Fluent
             return element.Hyperlink(url);
         }
         
+        /// <summary>
+        /// Creates a clickable area that redirects the user to a designated webpage.
+        /// <a href="https://www.questpdf.com/api-reference/hyperlink.html">Learn more</a>
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="param.url"]/*' />
         public static IContainer Hyperlink(this IContainer element, string url)
         {
             return element.Element(new Hyperlink
@@ -122,6 +232,16 @@ namespace QuestPDF.Fluent
             return element.Section(locationName);
         }
         
+        /// <summary>
+        /// Defines a named fragment of the document that can span multiple pages.
+        /// <a href="https://www.questpdf.com/api-reference/section.html">Learn more</a>
+        /// </summary>
+        /// <remarks>
+        /// <para>Several other elements interact with sections:</para>
+        /// <para>Use <see cref="ElementExtensions.SectionLink">SectionLink</see> to create a clickable area redirecting user to the first page of the associated section.</para>
+        /// <para>The <see cref="TextExtensions.Text(IContainer, Action&lt;TextDescriptor&gt;)">Text</see> element can display section properties, such as the starting page, ending page, and length.</para>
+        /// </remarks>
+        /// <param name="sectionName">An internal text key representing the section. It should be unique and won't appear in the final document.</param>
         public static IContainer Section(this IContainer element, string sectionName)
         {
             return element.Element(new Section
@@ -136,6 +256,11 @@ namespace QuestPDF.Fluent
             return element.SectionLink(locationName);
         }
         
+        /// <summary>
+        /// Creates a clickable area that navigates the user to a designated section.
+        /// <a href="https://www.questpdf.com/api-reference/section-link.html">Learn more</a>
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="param.sectionName"]/*' />
         public static IContainer SectionLink(this IContainer element, string sectionName)
         {
             return element.Element(new SectionLink
@@ -144,11 +269,24 @@ namespace QuestPDF.Fluent
             });
         }
         
+        /// <summary>
+        /// Conditionally draws or hides its content.
+        /// <a href="https://www.questpdf.com/api-reference/show-if.html">Learn more</a>
+        /// </summary>
+        /// <param name="condition">If the value is <see langword="true"/>, its content is visible. Otherwise, it's hidden.</param>
         public static IContainer ShowIf(this IContainer element, bool condition)
         {
             return condition ? element : new Container();
         }
         
+        /// <summary>
+        /// Provides direct access to the low-level SkiaSharp API.
+        /// <a href="https://www.questpdf.com/api-reference/canvas.html">Learn more</a>
+        /// </summary>
+        /// <example>
+        /// <para>Use this element when needing to render advanced shapes not directly available in the QuestPDF API.</para>
+        /// <para>It's also ideal for integrating with other SkiaSharp-based libraries, such as charting tools, to produce pixel-perfect vector graphics.</para>
+        /// </example>
         public static void Canvas(this IContainer element, DrawOnCanvas handler)
         {
             element.Element(new Canvas
@@ -163,16 +301,34 @@ namespace QuestPDF.Fluent
             return element.Element(new MinimalBox());
         }
         
+        /// <summary>
+        /// Renders its content in the most compact size achievable. 
+        /// Ideal for situations where the parent element provides more space than necessary.
+        /// <br />
+        /// <a href="https://www.questpdf.com/api-reference/minimal-box.html">Learn more</a>
+        /// </summary>
         public static IContainer MinimalBox(this IContainer element)
         {
             return element.Element(new MinimalBox());
         }
         
+        /// <summary>
+        /// Removes size constraints and grants its content virtually unlimited space.
+        /// <a href="https://www.questpdf.com/api-reference/unconstrained.html">Learn more</a>
+        /// </summary>
         public static IContainer Unconstrained(this IContainer element)
         {
             return element.Element(new Unconstrained());
         }
         
+        /// <summary>
+        /// Applies a default text style to all nested <see cref="TextExtensions.Text">Text</see> elements.
+        /// <a href="https://www.questpdf.com/api-reference/default-text-style.html">Learn more</a>
+        /// </summary>
+        /// <remarks>
+        /// If multiple text elements have a similar style, using this element can help simplify your code.
+        /// </remarks>
+        /// <param name="textStyle">A TextStyle object used to override specific properties.</param>
         public static IContainer DefaultTextStyle(this IContainer element, TextStyle textStyle)
         {
             return element.Element(new DefaultTextStyle
@@ -181,6 +337,14 @@ namespace QuestPDF.Fluent
             });
         }
         
+        /// <summary>
+        /// Applies a default text style to all nested <see cref="TextExtensions.Text">Text</see> elements.
+        /// <a href="https://www.questpdf.com/api-reference/default-text-style.html">Learn more</a>
+        /// </summary>
+        /// <remarks>
+        /// If multiple text elements have a similar style, using this element can help simplify your code.
+        /// </remarks>
+        /// <param name="handler">A handler to modify the default text style.</param>
         public static IContainer DefaultTextStyle(this IContainer element, Func<TextStyle, TextStyle> handler)
         {
             return element.Element(new DefaultTextStyle
@@ -189,11 +353,23 @@ namespace QuestPDF.Fluent
             });
         }
         
+        /// <summary>
+        /// Renders the element exclusively on the first page. Any portion of the element that doesn't fit is omitted.
+        /// <a href="https://www.questpdf.com/api-reference/stop-paging.html">Learn more</a>
+        /// </summary>
         public static IContainer StopPaging(this IContainer element)
         {
             return element.Element(new StopPaging());
         }
         
+        /// <summary>
+        /// Adjusts its content to fit within the available space by scaling it down proportionally if necessary.
+        /// <a href="https://www.questpdf.com/api-reference/scale-to-fit.html">Learn more</a>
+        /// </summary>
+        /// <remarks>
+        /// <para>This container determines the best scale value through multiple scaling operations. With complex content, this may impact performance.</para>
+        /// <para>Pairing with certain elements, such as <see cref="ElementExtensions.AspectRatio">AspectRatio</see>, might still lead to a <see cref="DocumentLayoutException" />.</para>
+        /// </remarks>
         public static IContainer ScaleToFit(this IContainer element)
         {
             return element.Element(new ScaleToFit());

+ 12 - 0
Source/QuestPDF/Fluent/ExtendExtensions.cs

@@ -14,16 +14,28 @@ namespace QuestPDF.Fluent
             return element.Element(extend);
         }
         
+        /// <summary>
+        /// Forces its content to occupy entire available space, maximizing both width and height.
+        /// <a href="https://www.questpdf.com/api-reference/extend.html">Learn more</a>
+        /// </summary>
         public static IContainer Extend(this IContainer element)
         {
             return element.ExtendVertical().ExtendHorizontal();
         }
         
+        /// <summary>
+        /// Forces its content to occupy entire available vertical space, maximizing height usage.
+        /// <a href="https://www.questpdf.com/api-reference/extend.html">Learn more</a>
+        /// </summary>
         public static IContainer ExtendVertical(this IContainer element)
         {
             return element.Extend(x => x.ExtendVertical = true);
         }
         
+        /// <summary>
+        /// Expands its content to occupy entire available horizontal space, maximizing width usage.
+        /// <a href="https://www.questpdf.com/api-reference/extend.html">Learn more</a>
+        /// </summary>
         public static IContainer ExtendHorizontal(this IContainer element)
         {
             return element.Extend(x => x.ExtendHorizontal = true);

+ 46 - 17
Source/QuestPDF/Fluent/GenerateExtensions.cs

@@ -11,6 +11,9 @@ namespace QuestPDF.Fluent
     {
         #region PDF
         
+        /// <summary>
+        /// Generates the document in PDF format and returns it as a byte array.
+        /// </summary>
         public static byte[] GeneratePdf(this IDocument document)
         {
             using var stream = new MemoryStream();
@@ -18,12 +21,18 @@ namespace QuestPDF.Fluent
             return stream.ToArray();
         }
         
+        /// <summary>
+        /// Generates the document in PDF format and saves it to the specified file path.
+        /// </summary>
         public static void GeneratePdf(this IDocument document, string filePath)
         {
             using var stream = new FileStream(filePath, FileMode.Create);
             document.GeneratePdf(stream);
         }
 
+        /// <summary>
+        /// Generates the document in PDF format and outputs it to a provided stream.
+        /// </summary>
         public static void GeneratePdf(this IDocument document, Stream stream)
         {
             DocumentGenerator.GeneratePdf(stream, document);
@@ -31,6 +40,9 @@ namespace QuestPDF.Fluent
         
         private static int GenerateAndShowCounter = 0;
         
+        /// <summary>
+        /// Generates the document in PDF format, saves it in temporary file, and then opens it with the default application.
+        /// </summary>
         public static void GeneratePdfAndShow(this IDocument document)
         {
             GenerateAndShowCounter++;
@@ -44,6 +56,9 @@ namespace QuestPDF.Fluent
 
         #region XPS
         
+        /// <summary>
+        /// Generates the document in XPS format and returns it as a byte array.
+        /// </summary>
         public static byte[] GenerateXps(this IDocument document)
         {
             using var stream = new MemoryStream();
@@ -51,20 +66,31 @@ namespace QuestPDF.Fluent
             return stream.ToArray();
         }
         
+        /// <summary>
+        /// Generates the document in XPS format and saves it to the specified file path.
+        /// </summary>
         public static void GenerateXps(this IDocument document, string filePath)
         {
             using var stream = new FileStream(filePath, FileMode.Create);
             document.GenerateXps(stream);
         }
 
+        /// <summary>
+        /// Generates the document in XPS format and outputs it to a provided stream.
+        /// </summary>
         public static void GenerateXps(this IDocument document, Stream stream)
         {
             DocumentGenerator.GenerateXps(stream, document);
         }
         
+        /// <summary>
+        /// Generates the document in XPS format, saves it in temporary file, and then opens it with the default application.
+        /// </summary>
         public static void GenerateXpsAndShow(this IDocument document)
         {
-            var filePath = Path.Combine(Path.GetTempPath(), $"QuestPDF Document.xps");
+            GenerateAndShowCounter++;
+            
+            var filePath = Path.Combine(Path.GetTempPath(), $"QuestPDF Document {GenerateAndShowCounter}.xps");
             document.GenerateXps(filePath);
             OpenFileUsingDefaultProgram(filePath);
         }
@@ -73,31 +99,34 @@ namespace QuestPDF.Fluent
 
         #region Images
 
-        public static IEnumerable<byte[]> GenerateImages(this IDocument document)
-        {
-            return document.GenerateImages(ImageGenerationSettings.Default);
-        }
-
-
-        public static IEnumerable<byte[]> GenerateImages(this IDocument document, ImageGenerationSettings settings)
+        /// <summary>
+        /// Generates the document as a series of images and returns them as a collection of byte arrays.
+        /// </summary>
+        /// <param name="settings">Optional settings to customize the generation process, such as image resolution, compression ratio, and more.</param>
+        public static IEnumerable<byte[]> GenerateImages(this IDocument document, ImageGenerationSettings? settings = null)
         {
+            settings ??= ImageGenerationSettings.Default;
             return DocumentGenerator.GenerateImages(document, settings);
         }
 
-        /// <param name="filePath">Method should return fileName for given index</param>
-        public static void GenerateImages(this IDocument document, Func<int, string> filePath)
-        {
-            document.GenerateImages(filePath, ImageGenerationSettings.Default);
-        }
-
-        /// <param name="filePath">Method should return fileName for given index</param>
-        public static void GenerateImages(this IDocument document, Func<int, string> filePath, ImageGenerationSettings settings)
+        /// <param name="imageIndex">Specifies the index of the generated image from the document, starting at 0.</param>
+        /// <returns>The file path where the image should be saved.</returns>
+        public delegate string GenerateDocumentImagePath(int imageIndex);
+        
+        /// <summary>
+        /// Generates the document as a sequence of images, saving them to paths determined by the <paramref name="imagePathSource"/> delegate.
+        /// </summary>
+        /// <param name="imagePathSource">A delegate that gets image index as an input, and returns file path where it should be saved.</param>
+        /// <param name="settings">Optional settings for fine-tuning the generated images, such as resolution, compression ratio, etc.</param>
+        public static void GenerateImages(this IDocument document, GenerateDocumentImagePath imagePathSource, ImageGenerationSettings? settings = null)
         {
+            settings ??= ImageGenerationSettings.Default;
+            
             var index = 0;
 
             foreach (var imageData in document.GenerateImages(settings))
             {
-                var path = filePath(index);
+                var path = imagePathSource(index);
 
                 if (File.Exists(path))
                     File.Delete(path);

+ 86 - 28
Source/QuestPDF/Fluent/ImageExtensions.cs

@@ -7,6 +7,37 @@ using SkiaSharp;
 
 namespace QuestPDF.Fluent
 {
+    public class DynamicImageDescriptor
+    {
+        private Elements.DynamicImage ImageElement { get; }
+        
+        internal DynamicImageDescriptor(Elements.DynamicImage imageElement)
+        {
+            ImageElement = imageElement;
+        }
+        
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="image.useOriginalImage"]/*' />
+        public DynamicImageDescriptor UseOriginalImage(bool value = true)
+        {
+            ImageElement.UseOriginalImage = value;
+            return this;
+        }
+        
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="image.rasterDPI"]/*' />
+        public DynamicImageDescriptor WithRasterDpi(int dpi)
+        {
+            ImageElement.TargetDpi = dpi;
+            return this;
+        }
+
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="image.compressionQuality"]/*' />
+        public DynamicImageDescriptor WithCompressionQuality(ImageCompressionQuality quality)
+        {
+            ImageElement.CompressionQuality = quality;
+            return this;
+        }
+    }
+    
     public class ImageDescriptor
     {
         private Elements.Image ImageElement { get; }
@@ -22,33 +53,21 @@ namespace QuestPDF.Fluent
             ImageAspectRatio = imageSize.Width / (float)imageSize.Height;
         }
         
-        /// <summary>
-        /// When enabled, the library will not attempt to resize the image to fit the target DPI, nor save it with target image quality.
-        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="image.useOriginalImage"]/*' />
         public ImageDescriptor UseOriginalImage(bool value = true)
         {
             ImageElement.UseOriginalImage = value;
             return this;
         }
         
-        /// <summary>
-        /// The DPI (pixels-per-inch) at which images and features without native PDF support will be rasterized.
-        /// A larger DPI would create a PDF that reflects the original intent with better fidelity, but it can make for larger PDF files too, which would use more memory while rendering, and it would be slower to be processed or sent online or to printer.
-        /// When generating images, this parameter also controls the resolution of the generated content.
-        /// Default value is 288.
-        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="image.rasterDPI"]/*' />
         public ImageDescriptor WithRasterDpi(int dpi)
         {
             ImageElement.TargetDpi = dpi;
             return this;
         }
 
-        /// <summary>
-        /// Encoding quality controls the trade-off between size and quality.
-        /// When the image is opaque, it will be encoded using the JPEG format with the selected quality setting.
-        /// When the image contains an alpha channel, it is always encoded using the PNG format and this option is ignored.
-        /// The default value is "high quality".
-        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="image.compressionQuality"]/*' />
         public ImageDescriptor WithCompressionQuality(ImageCompressionQuality quality)
         {
             ImageElement.CompressionQuality = quality;
@@ -58,7 +77,7 @@ namespace QuestPDF.Fluent
         #region Aspect Ratio
         
         /// <summary>
-        /// The image scales to take the entire available width. Default.
+        /// Scales the image to fill the full width of its container. This is the default behavior.
         /// </summary>
         public ImageDescriptor FitWidth()
         {
@@ -66,7 +85,8 @@ namespace QuestPDF.Fluent
         }
         
         /// <summary>
-        /// The images scales to take the entire available height. Good in conjunction with constraining elements.
+        /// <para>The image stretches vertically to fit the full available height.</para>
+        /// <para>Often used with height-constraining elements such as: <see cref="ConstrainedExtensions.Height">Height</see>, <see cref="ConstrainedExtensions.MaxHeight">MaxHeight</see>, etc.</para>
         /// </summary>
         public ImageDescriptor FitHeight()
         {
@@ -74,20 +94,21 @@ namespace QuestPDF.Fluent
         }
         
         /// <summary>
-        /// This is the combination of both of the FitWidth and the FitHeight options. 
-        /// The element scales to occupy the entire available area while preserving its aspect ratio.
-        /// This means that sometimes it occupies the entire width and sometimes the entire height.
-        /// This is the safest option.
+        /// Combines the FitWidth and FitHeight settings.
+        /// The image resizes itself to utilize all available space, preserving its aspect ratio.
+        /// It will either fill the width or height based on the container's dimensions.
         /// </summary>
+        /// <remarks>
+        /// An optimal and safe choice.
+        /// </remarks>
         public ImageDescriptor FitArea()
         {
             return SetAspectRatio(AspectRatioOption.FitArea);
         }
         
         /// <summary>
-        /// The image resizes itself to occupy the entire available space.
-        /// It does not preserve proportions.
-        /// The image may look incorrectly scaled, and is not desired in most of the cases.
+        /// The image adjusts to fill all the available space, disregarding its original proportions.
+        /// This can lead to distorted scaling and is generally not recommended for most scenarios.
         /// </summary>
         public ImageDescriptor FitUnproportionally()
         {
@@ -107,24 +128,48 @@ namespace QuestPDF.Fluent
     
     public static class ImageExtensions
     {
+        /// <summary>
+        /// Draws an image by decoding it from a provided byte array.
+        /// <a href="https://www.questpdf.com/api-reference/image.html">Learn more</a>
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="image.remarks"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="image.descriptor"]/*' />
         public static ImageDescriptor Image(this IContainer parent, byte[] imageData)
         {
             var image = Infrastructure.Image.FromBinaryData(imageData);
             return parent.Image(image);
         }
         
+        /// <summary>
+        /// Draws the image loaded from a file located at the provided path.
+        /// <a href="https://www.questpdf.com/api-reference/image.html">Learn more</a>
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="image.remarks"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="image.descriptor"]/*' />
         public static ImageDescriptor Image(this IContainer parent, string filePath)
         {
             var image = Infrastructure.Image.FromFile(filePath);
             return parent.Image(image);
         }
         
+        /// <summary>
+        /// Draws the image loaded from a stream.
+        /// <a href="https://www.questpdf.com/api-reference/image.html">Learn more</a>
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="image.remarks"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="image.descriptor"]/*' />
         public static ImageDescriptor Image(this IContainer parent, Stream fileStream)
         {
             var image = Infrastructure.Image.FromStream(fileStream);
             return parent.Image(image);
         }
         
+        /// <summary>
+        /// Draws the <see cref="Infrastructure.Image" /> object. Allows to optimize the generation process.
+        /// <a href="https://www.questpdf.com/api-reference/image.html">Learn more</a>
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="image.remarks"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="image.descriptor"]/*' />
         public static ImageDescriptor Image(this IContainer parent, Infrastructure.Image image)
         {
             if (image == null)
@@ -143,13 +188,26 @@ namespace QuestPDF.Fluent
             parent.Element(aspectRationElement);
             return new ImageDescriptor(imageElement, aspectRationElement).FitWidth();
         }
-
-        public static void Image(this IContainer element, GenerateDynamicImageDelegate dynamicImageSource)
+        
+        /// <summary>
+        /// Renders an image of dynamic size dictated by the document layout constraints.
+        /// </summary>
+        /// <remarks>
+        /// Ideal for generating pixel-perfect images that might lose quality upon scaling, such as maps or charts.
+        /// </remarks>
+        /// <param name="dynamicImageSource">
+        /// A delegate that requests an image of desired resolution calculated based on target physical image size and provided DPI.
+        /// </param>
+        /// <returns>A descriptor for adjusting image attributes like scaling behavior, compression quality, and resolution.</returns>
+        public static DynamicImageDescriptor Image(this IContainer element, GenerateDynamicImageDelegate dynamicImageSource)
         {
-            element.Element(new DynamicImage
+            var dynamicImage = new DynamicImage
             {
                 Source = dynamicImageSource
-            });
+            };
+            
+            element.Element(dynamicImage);
+            return new DynamicImageDescriptor(dynamicImage);
         }
         
         #region Obsolete

+ 100 - 9
Source/QuestPDF/Fluent/InlinedExtensions.cs

@@ -10,33 +10,116 @@ namespace QuestPDF.Fluent
     {
         internal Inlined Inlined { get; } = new Inlined();
         
+        #region Spacing
+        
+        /// <summary>
+        /// Sets the vertical and horizontal gaps between items.
+        /// </summary>
         public void Spacing(float value, Unit unit = Unit.Point)
         {
             VerticalSpacing(value, unit);
             HorizontalSpacing(value, unit);
         }
         
+        /// <summary>
+        /// Sets the vertical gaps between items.
+        /// </summary>
         public void VerticalSpacing(float value, Unit unit = Unit.Point)
         {
             Inlined.VerticalSpacing = value.ToPoints(unit);
         }
 
+        /// <summary>
+        /// Sets the horizontal gaps between items.
+        /// </summary>
         public void HorizontalSpacing(float value, Unit unit = Unit.Point)
         {
             Inlined.HorizontalSpacing = value.ToPoints(unit);
         }
+        
+        #endregion
+        
+        #region Baseline
+
+        /// <summary>
+        /// Positions items vertically such that their top edges align on a single line.
+        /// </summary>
+        public void BaselineTop()
+        {
+            Inlined.BaselineAlignment = VerticalAlignment.Top;
+        }
+
+        /// <summary>
+        /// Positions items to have their centers in a straight horizontal line.
+        /// </summary>
+        public void BaselineMiddle()
+        {
+            Inlined.BaselineAlignment = VerticalAlignment.Middle;
+        }
+
+        /// <summary>
+        /// Positions items vertically such that their bottom edges align on a single line.
+        /// </summary>
+        public void BaselineBottom()
+        {
+            Inlined.BaselineAlignment = VerticalAlignment.Bottom;
+        }
 
-        public void BaselineTop() => Inlined.BaselineAlignment = VerticalAlignment.Top;
-        public void BaselineMiddle() => Inlined.BaselineAlignment = VerticalAlignment.Middle;
-        public void BaselineBottom() => Inlined.BaselineAlignment = VerticalAlignment.Bottom;
+        #endregion
 
-        internal void Alignment(InlinedAlignment? alignment) => Inlined.ElementsAlignment = alignment;
-        public void AlignLeft() => Inlined.ElementsAlignment = InlinedAlignment.Left;
-        public void AlignCenter() => Inlined.ElementsAlignment = InlinedAlignment.Center;
-        public void AlignRight() => Inlined.ElementsAlignment = InlinedAlignment.Right;
-        public void AlignJustify() => Inlined.ElementsAlignment = InlinedAlignment.Justify;
-        public void AlignSpaceAround() => Inlined.ElementsAlignment = InlinedAlignment.SpaceAround;
+        #region Horizontal Alignment
         
+        internal void Alignment(InlinedAlignment? alignment)
+        {
+            Inlined.ElementsAlignment = alignment;
+        }
+
+        /// <summary>
+        /// Aligns items horizontally to the left side.
+        /// </summary>
+        public void AlignLeft()
+        {
+            Inlined.ElementsAlignment = InlinedAlignment.Left;
+        }
+
+        /// <summary>
+        /// Aligns items horizontally to the center.
+        /// </summary>
+        public void AlignCenter()
+        {
+            Inlined.ElementsAlignment = InlinedAlignment.Center;
+        }
+
+        /// <summary>
+        /// Aligns items horizontally to the left right.
+        /// </summary>
+        public void AlignRight()
+        {
+            Inlined.ElementsAlignment = InlinedAlignment.Right;
+        }
+
+        /// <summary>
+        /// Distributes items horizontally, ensuring even spacing from edge to edge of the container.
+        /// </summary>
+        public void AlignJustify()
+        {
+            Inlined.ElementsAlignment = InlinedAlignment.Justify;
+        }
+        
+        /// <summary>
+        /// Spaces items equally in a horizontal arrangement, both between items and at the ends.
+        /// </summary>
+        public void AlignSpaceAround()
+        {
+            Inlined.ElementsAlignment = InlinedAlignment.SpaceAround;
+        }
+
+        #endregion
+
+        /// <summary>
+        /// Adds a new item to the container.
+        /// </summary>
+        /// <returns>The container of the newly created item.</returns>
         public IContainer Item()
         {
             var container = new InlinedElement();
@@ -47,6 +130,14 @@ namespace QuestPDF.Fluent
     
     public static class InlinedExtensions
     {
+        /// <summary>
+        /// Arranges its items sequentially in a line, wrapping to the next line if necessary.
+        /// <a href="https://www.questpdf.com/api-reference/inlined.html">Learn more</a>
+        /// </summary>
+        /// <remarks>
+        /// Supports the paging functionality.
+        /// </remarks>
+        /// <param name="handler">Handler to configure content of this container, as well as spacing and items alignment.</param>
         public static void Inlined(this IContainer element, Action<InlinedDescriptor> handler)
         {
             var descriptor = new InlinedDescriptor();

+ 22 - 0
Source/QuestPDF/Fluent/LayerExtensions.cs

@@ -24,7 +24,22 @@ namespace QuestPDF.Fluent
             return container;
         }
 
+        /// <summary>
+        /// Specifies an additional layer for the container.
+        /// </summary>
+        /// <remarks>
+        /// <para>The order of code execution determines the drawing order:</para>
+        /// <para>If the layer is defined before the primary layer, it's drawn underneath the primary content (as a background).</para>
+        /// <para>If defined after the primary layer, it's drawn in front of the primary content (as a watermark).</para>
+        /// </remarks>
         public IContainer Layer() => Layer(false);
+        
+        /// <summary>
+        /// Sets the primary content for the container. 
+        /// </summary>
+        /// <remarks>
+        /// Exactly one primary layer should be defined.
+        /// </remarks>
         public IContainer PrimaryLayer() => Layer(true);
 
         internal void Validate()
@@ -41,6 +56,13 @@ namespace QuestPDF.Fluent
     
     public static class LayerExtensions
     {
+        /// <summary>
+        /// <para>Adds content either underneath (as a background) or on top of (as a watermark) the main content.</para>
+        /// <para>The main layer supports paging, can span multiple pages, and determines the container's target length.</para>
+        /// <para>Additional layers can also span multiple pages and are repeated on each one.</para>
+        /// <a href="https://www.questpdf.com/api-reference/layers.html">Learn more</a>
+        /// </summary>
+        /// <param name="handler">Handler for defining content of the container, including exactly one primary layer and any additional layers in a specified order.</param>
         public static void Layers(this IContainer element, Action<LayersDescriptor> handler)
         {
             var descriptor = new LayersDescriptor();

+ 23 - 3
Source/QuestPDF/Fluent/LineExtensions.cs

@@ -19,20 +19,40 @@ namespace QuestPDF.Fluent
             return line;
         }
         
+        /// <summary>
+        /// Renders a vertical line with a specified thickness.
+        /// <a href="https://www.questpdf.com/api-reference/line.html">Learn more</a>
+        /// </summary>
+        /// <remarks>
+        /// The line is not just a visual element; it occupies actual space within the document.
+        /// </remarks>
+        /// <returns>A descriptor to modify line attributes.</returns>
         public static ILine LineVertical(this IContainer element, float size, Unit unit = Unit.Point)
         {
             return element.Line(LineType.Vertical, size.ToPoints(unit));
         }
         
+        /// <summary>
+        /// Renders a horizontal line with a specified thickness.
+        /// <a href="https://www.questpdf.com/api-reference/line.html">Learn more</a>
+        /// </summary>
+        /// <remarks>
+        /// The line is not just a visual element; it occupies actual space within the document.
+        /// </remarks>
+        /// <returns>A descriptor to modify line attributes.</returns>
         public static ILine LineHorizontal(this IContainer element, float size, Unit unit = Unit.Point)
         {
             return element.Line(LineType.Horizontal, size.ToPoints(unit));
         }
         
-        public static void LineColor(this ILine descriptor, string value)
+        /// <summary>
+        /// Specifies the color for the line.
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="colorParam"]/*' />
+        public static void LineColor(this ILine descriptor, string color)
         {
-            ColorValidator.Validate(value);
-            (descriptor as Line).Color = value;
+            ColorValidator.Validate(color);
+            (descriptor as Line).Color = color;
         }
     }
 }

+ 29 - 0
Source/QuestPDF/Fluent/MinimalApi.cs

@@ -16,28 +16,46 @@ namespace QuestPDF.Fluent
             ContentSource = contentSource;
         }
         
+        /// <summary>
+        /// Creates a new empty document and provides handler to specify its content.
+        /// </summary>
+        /// <returns>A Document object with the specified content. This object allows to set metadata, configure generation parameters, and produce output files such as PDF, XPS, or images.</returns>
         public static Document Create(Action<IDocumentContainer> handler)
         {
             return new Document(handler);
         }
 
+        /// <summary>
+        /// Configures the metadata of the PDF document, such as title, author, keywords, etc.
+        /// </summary>
         public Document WithMetadata(DocumentMetadata metadata)
         {
             Metadata = metadata ?? Metadata;
             return this;
         }
         
+        /// <summary>
+        /// Enables fine-tuning of the document generation process, influencing attributes of the resulting PDF such as target DPI, image compression, compliance with the PDF/A standard, etc.
+        /// </summary>
         public Document WithSettings(DocumentSettings settings)
         {
             Settings = settings ?? Settings;
             return this;
         }
         
+        /// <summary>
+        /// Combines multiple documents together into a single one.
+        /// </summary>
+        /// <returns>A MergedDocument object that allows to set metadata, configure generation parameters, adjust merging strategy, and produce output files such as PDF, XPS, or images.</returns>
         public static MergedDocument Merge(IEnumerable<IDocument> documents)
         {
             return new MergedDocument(documents);
         }
 
+        /// <summary>
+        /// Combines multiple documents together into a single one.
+        /// </summary>
+        /// <returns>A MergedDocument object that allows to set metadata, configure generation parameters, adjust merging strategy, and produce output files such as PDF, XPS, or images.</returns>
         public static MergedDocument Merge(params IDocument[] documents)
         {
             return new MergedDocument(documents);
@@ -45,8 +63,19 @@ namespace QuestPDF.Fluent
         
         #region IDocument
 
+        /// <summary>
+        /// Implements the IDocument interface. Don't use within the Fluent API chain.
+        /// </summary>
         public DocumentMetadata GetMetadata() => Metadata;
+        
+        /// <summary>
+        /// Implements the IDocument interface. Don't use within the Fluent API chain.
+        /// </summary>
         public DocumentSettings GetSettings() => Settings;
+        
+        /// <summary>
+        /// Implements the IDocument interface. Don't use within the Fluent API chain.
+        /// </summary>
         public void Compose(IDocumentContainer container) => ContentSource(container);
 
         #endregion

+ 43 - 1
Source/QuestPDF/Fluent/PaddingExtensions.cs

@@ -14,6 +14,12 @@ namespace QuestPDF.Fluent
             return element.Element(padding);
         }
         
+        /// <summary>
+        /// <para>For positive values, adds empty space around its content.</para>
+        /// <para>For negative values, pushes its content beyond the edges, increasing available space, similarly to negative HTML margins.</para>
+        /// <br />
+        /// <a href="https://www.questpdf.com/api-reference/padding.html">Learn more</a>
+        /// </summary>
         public static IContainer Padding(this IContainer element, float value, Unit unit = Unit.Point)
         {
             return element
@@ -21,13 +27,25 @@ namespace QuestPDF.Fluent
                 .PaddingHorizontal(value, unit);
         }
         
+        /// <summary>
+        /// <para>For positive values, adds empty space horizontally (left and right) around its content.</para>
+        /// <para>For negative values, pushes its content beyond the horizontal edges, increasing available space, similarly to negative HTML margins.</para>
+        /// <br />
+        /// <a href="https://www.questpdf.com/api-reference/padding.html">Learn more</a>
+        /// </summary>
         public static IContainer PaddingHorizontal(this IContainer element, float value, Unit unit = Unit.Point)
         {
             return element
                 .PaddingLeft(value, unit)
                 .PaddingRight(value, unit);
         }
-        
+
+        /// <summary>
+        /// <para>For positive values, adds empty space vertically (top and bottom) around its content.</para>
+        /// <para>For negative values, pushes its content beyond the vertical edges, increasing available space, similarly to negative HTML margins.</para>
+        /// <br />
+        /// <a href="https://www.questpdf.com/api-reference/padding.html">Learn more</a>
+        /// </summary>
         public static IContainer PaddingVertical(this IContainer element, float value, Unit unit = Unit.Point)
         {
             return element
@@ -35,21 +53,45 @@ namespace QuestPDF.Fluent
                 .PaddingBottom(value, unit);
         }
         
+        /// <summary>
+        /// <para>For positive values, adds empty space above its content.</para>
+        /// <para>For negative values, pushes its content beyond the top edge, increasing available space, similarly to negative HTML margins.</para>
+        /// <br />
+        /// <a href="https://www.questpdf.com/api-reference/padding.html">Learn more</a>
+        /// </summary>
         public static IContainer PaddingTop(this IContainer element, float value, Unit unit = Unit.Point)
         {
             return element.Padding(x => x.Top += value.ToPoints(unit));
         }
         
+        /// <summary>
+        /// <para>For positive values, adds empty space below its content.</para>
+        /// <para>For negative values, pushes its content beyond the bottom edge, increasing available space, similarly to negative HTML margins.</para>
+        /// <br />
+        /// <a href="https://www.questpdf.com/api-reference/padding.html">Learn more</a>
+        /// </summary>
         public static IContainer PaddingBottom(this IContainer element, float value, Unit unit = Unit.Point)
         {
             return element.Padding(x => x.Bottom += value.ToPoints(unit));
         }
         
+        /// <summary>
+        /// <para>For positive values, adds empty space to the left of its content.</para>
+        /// <para>For negative values, pushes its content beyond the left edge, increasing available space, similarly to negative HTML margins.</para>
+        /// <br />
+        /// <a href="https://www.questpdf.com/api-reference/padding.html">Learn more</a>
+        /// </summary>
         public static IContainer PaddingLeft(this IContainer element, float value, Unit unit = Unit.Point)
         {
             return element.Padding(x => x.Left += value.ToPoints(unit));
         }
         
+        /// <summary>
+        /// <para>For positive values, adds empty space to the right of its content.</para>
+        /// <para>For negative values, pushes its content beyond the right edge, increasing available space, similarly to negative HTML margins.</para>
+        /// <br />
+        /// <a href="https://www.questpdf.com/api-reference/padding.html">Learn more</a>
+        /// </summary>
         public static IContainer PaddingRight(this IContainer element, float value, Unit unit = Unit.Point)
         {
             return element.Padding(x => x.Right += value.ToPoints(unit));

+ 119 - 2
Source/QuestPDF/Fluent/PageExtensions.cs

@@ -12,6 +12,9 @@ namespace QuestPDF.Fluent
 
         #region Size
         
+        /// <summary>
+        /// Configures the dimensions of every page within the set.
+        /// </summary>
         public void Size(float width, float height, Unit unit = Unit.Point)
         {
             var pageSize = new PageSize(width, height, unit);
@@ -20,23 +23,46 @@ namespace QuestPDF.Fluent
             MaxSize(pageSize);
         }
         
+        /// <summary>
+        /// Configures the dimensions of every page within the set.
+        /// </summary>
         public void Size(PageSize pageSize)
         {
             MinSize(pageSize);
             MaxSize(pageSize);
         }
         
+        /// <summary>
+        /// Enables the continuous page size mode, allowing the page's height to adjust according to content while retaining a constant specified <paramref name="width" />.
+        /// </summary>
+        /// <example>
+        /// This configuration is suitable for producing PDFs intended for printing on the paper roll.
+        /// </example>
         public void ContinuousSize(float width, Unit unit = Unit.Point)
         {
             MinSize(new PageSize(width.ToPoints(unit), 0));
             MaxSize(new PageSize(width.ToPoints(unit), Infrastructure.Size.Max.Height));
         }
 
+        /// <summary>
+        /// Enables the flexible page size mode, where the output page's dimensions can vary based on its content.
+        /// Specifies the smallest possible page size.
+        /// </summary>
+        /// <remarks>
+        /// Note that with this setting, individual pages within the document may have different sizes.
+        /// </remarks>
         public void MinSize(PageSize pageSize)
         {
             Page.MinSize = pageSize;
         }
         
+        /// <summary>
+        /// Enables the flexible page size mode, where the output page's dimensions can vary based on its content.
+        /// Specifies the largest possible page size.
+        /// </summary>
+        /// <remarks>
+        /// Note that with this setting, individual pages within the document may have different sizes.
+        /// </remarks>
         public void MaxSize(PageSize pageSize)
         {
             Page.MaxSize = pageSize;
@@ -46,38 +72,59 @@ namespace QuestPDF.Fluent
         
         #region Margin
 
+        /// <summary>
+        /// Adds empty space to the left of the primary layer (header + content + footer).
+        /// </summary>
         public void MarginLeft(float value, Unit unit = Unit.Point)
         {
             Page.MarginLeft = value.ToPoints(unit);
         }
         
+        /// <summary>
+        /// Adds empty space to the right of the primary layer (header + content + footer).
+        /// </summary>
         public void MarginRight(float value, Unit unit = Unit.Point)
         {
             Page.MarginRight = value.ToPoints(unit);
         }
         
+        /// <summary>
+        /// Adds empty space above the primary layer (header + content + footer).
+        /// </summary>
         public void MarginTop(float value, Unit unit = Unit.Point)
         {
             Page.MarginTop = value.ToPoints(unit);
         }
         
+        /// <summary>
+        /// Adds empty space below the primary layer (header + content + footer).
+        /// </summary>
         public void MarginBottom(float value, Unit unit = Unit.Point)
         {
             Page.MarginBottom = value.ToPoints(unit);
         }
         
+        /// <summary>
+        /// Adds empty space vertically (top and bottom) around the primary layer (header + content + footer).
+        /// </summary>
         public void MarginVertical(float value, Unit unit = Unit.Point)
         {
             MarginTop(value, unit);
             MarginBottom(value, unit);
         }
         
+        /// <summary>
+        /// Adds empty space horizontally (left and right) around the primary layer (header + content + footer).
+        /// </summary>
         public void MarginHorizontal(float value, Unit unit = Unit.Point)
         {
             MarginLeft(value, unit);
             MarginRight(value, unit);
         }
         
+        /// <summary>
+        /// Adds empty space around the primary layer (header + content + footer).
+        /// </summary>
         public void Margin(float value, Unit unit = Unit.Point)
         {
             MarginVertical(value, unit);
@@ -87,27 +134,58 @@ namespace QuestPDF.Fluent
         #endregion
         
         #region Properties
-        
+
+        /// <summary>
+        /// Applies a default text style to all <see cref="TextExtensions.Text">Text</see> elements within the page set.
+        /// </summary>
+        /// <remarks>
+        /// Use this method to achieve consistent text styling across entire document.
+        /// </remarks>
+        /// <param name="handler">A delegate to adjust the global text style attributes.</param>
         public void DefaultTextStyle(TextStyle textStyle)
         {
             Page.DefaultTextStyle = textStyle;
         }
         
+        /// <summary>
+        /// Applies a default text style to all <see cref="TextExtensions.Text">Text</see> elements within the page set.
+        /// </summary>
+        /// <remarks>
+        /// Use this method to achieve consistent text styling across entire document.
+        /// </remarks>
+        /// <param name="handler">A handler to adjust the global text style attributes.</param>
         public void DefaultTextStyle(Func<TextStyle, TextStyle> handler)
         {
             DefaultTextStyle(handler(TextStyle.Default));
         }
         
+        /// <summary>
+        /// Applies a left-to-right (LTR) content direction to all elements within the page set.
+        /// <a href="https://www.questpdf.com/api-reference/content-direction.html">Learn more</a>
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="contentDirection.ltr.remarks"]/*' />
         public void ContentFromLeftToRight()
         {
             Page.ContentDirection = ContentDirection.LeftToRight;
         }
         
+        /// <summary>
+        /// Applies a right-to-left (RTL) content direction to all elements within the page set.
+        /// <a href="https://www.questpdf.com/api-reference/content-direction.html">Learn more</a>
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="contentDirection.rtl.remarks"]/*' />
         public void ContentFromRightToLeft()
         {
             Page.ContentDirection = ContentDirection.RightToLeft;
         }
         
+        /// <summary>
+        /// Sets a background color of the page, which is white by default.
+        /// </summary>
+        /// <remarks>
+        /// When working with file formats that support the alpha channel, it is possible to set the color to <see cref="Colors.Transparent" /> if necessary.
+        /// </remarks>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="colorParam"]/*' />
         public void PageColor(string color)
         {
             ColorValidator.Validate(color);
@@ -124,6 +202,12 @@ namespace QuestPDF.Fluent
         
         #region Slots
         
+        /// <summary>
+        /// Represents a layer drawn behind the primary layer (header + content + footer), serving as a background.
+        /// </summary>
+        /// <remarks>
+        /// Unaffected by the Margin configuration, it always occupies entire page.
+        /// </remarks>
         public IContainer Background()
         {
             var container = new Container();
@@ -131,6 +215,12 @@ namespace QuestPDF.Fluent
             return container;
         }
         
+        /// <summary>
+        /// Represents a layer drawn in front of the primary layer (header + content + footer), serving as a watermark.
+        /// </summary>
+        /// <remarks>
+        /// Unaffected by the Margin configuration, it always occupies entire page.
+        /// </remarks>
         public IContainer Foreground()
         {
             var container = new Container();
@@ -138,6 +228,12 @@ namespace QuestPDF.Fluent
             return container;
         }
         
+        /// <summary>
+        /// Represents the segment at the very top of the page, just above the main content.
+        /// </summary>
+        /// <remarks>
+        /// This container does not support paging capability. It's expected to be fully displayed on every page.
+        /// </remarks>
         public IContainer Header()
         {
             var container = new Container();
@@ -145,13 +241,25 @@ namespace QuestPDF.Fluent
             return container;
         }
         
+        /// <summary>
+        /// Represents the primary content, located in-between the header and footer.
+        /// </summary>
+        /// <remarks>
+        /// This container does support paging capability and determines the final lenght of the document.
+        /// </remarks>
         public IContainer Content()
         {
             var container = new Container();
             Page.Content = container;
             return container;
         }
-
+        
+        /// <summary>
+        /// Represents the section at the very bottom of the page, just below the main content.
+        /// </summary>
+        /// <remarks>
+        /// This container does not support paging capability. It's expected to be fully displayed on every page.
+        /// </remarks>
         public IContainer Footer()
         {
             var container = new Container();
@@ -164,6 +272,15 @@ namespace QuestPDF.Fluent
     
     public static class PageExtensions
     {
+        /// <summary>
+        /// Creates a new page set with consistent attributes, such as margin, color, and watermark.
+        /// The length of each set depends on its content.
+        /// </summary>
+        /// <remarks>
+        /// By leveraging multiple page sets, you can produce documents containing pages of distinct sizes and characteristics.
+        /// </remarks>
+        /// <param name="handler">Delegate to define page content (layout and visual elements).</param>
+        /// <returns>Continuation of the Document API chain, permitting the definition of other page sets.</returns>
         public static IDocumentContainer Page(this IDocumentContainer document, Action<PageDescriptor> handler)
         {
             var descriptor = new PageDescriptor();

+ 19 - 1
Source/QuestPDF/Fluent/RotateExtensions.cs

@@ -14,17 +14,35 @@ namespace QuestPDF.Fluent
             return element.Element(scale);
         }
         
+        /// <summary>
+        /// Rotates its content 90 degrees counterclockwise.
+        /// <a href="https://www.questpdf.com/api-reference/rotate.html">Learn more</a>
+        /// </summary>
+        /// <remarks>
+        /// Note: Rotation can alter certain attributes; for example, 'width' might effectively become 'height'.
+        /// </remarks>
         public static IContainer RotateLeft(this IContainer element)
         {
             return element.SimpleRotate(x => x.TurnCount--);
         }
         
+        /// <summary>
+        /// Rotates its content 90 degrees clockwise.
+        /// <a href="https://www.questpdf.com/api-reference/rotate.html">Learn more</a>
+        /// </summary>
+        /// <remarks>
+        /// Note: Rotation can alter certain attributes; for example, 'width' might effectively become 'height'.
+        /// </remarks>
         public static IContainer RotateRight(this IContainer element)
         {
             return element.SimpleRotate(x => x.TurnCount++);
         }
         
-        /// <param name="angle">In degrees</param>
+        /// <summary>
+        /// Rotates its content clockwise by a given angle.
+        /// <a href="https://www.questpdf.com/api-reference/rotate.html">Learn more</a>
+        /// </summary>
+        /// <param name="angle">Rotation angle in degrees. A value of 360 degrees represents a full rotation.</param>
         public static IContainer Rotate(this IContainer element, float angle)
         {
             return element.Element(new Rotate

+ 36 - 0
Source/QuestPDF/Fluent/RowExtensions.cs

@@ -1,4 +1,5 @@
 using System;
+using QuestPDF.Drawing.Exceptions;
 using QuestPDF.Elements;
 using QuestPDF.Infrastructure;
 
@@ -8,6 +9,9 @@ namespace QuestPDF.Fluent
     {
         internal Row Row { get; } = new();
 
+        /// <summary>
+        /// Adjusts horizontal spacing between items.
+        /// </summary>
         public void Spacing(float value)
         {
             Row.Spacing = value;
@@ -37,16 +41,37 @@ namespace QuestPDF.Fluent
             return Item(RowItemType.Constant, size);
         }
 
+        /// <summary>
+        /// Adds a new item to the row element. This item occupies space proportionally to other relative items.
+        /// </summary>
+        /// <example>
+        /// For a row element with a width of 100 points that has three items (a relative item of size 1, a relative item of size 5, and a constant item of size 10 points),
+        /// the items will occupy sizes of 15 points, 75 points, and 10 points respectively.
+        /// </example>
+        /// <returns>The container of the newly added item.</returns>
         public IContainer RelativeItem(float size = 1)
         {
             return Item(RowItemType.Relative, size);
         }
         
+        /// <summary>
+        /// Adds a new item to the row element with a specified constant size.
+        /// </summary>
+        /// <returns>The container of the newly created item.</returns>
         public IContainer ConstantItem(float size, Unit unit = Unit.Point)
         {
             return Item(RowItemType.Constant, size.ToPoints(unit));
         }
 
+        /// <summary>
+        /// Adds a new item to the row element. The size of this item adjusts based on its content.
+        /// </summary>
+        /// <remarks>
+        /// <para>The AutoItem requests as much horizontal space as its content requires.</para>
+        /// <para>It doesn't adjust its size based on other items and may frequently result in a <see cref="DocumentLayoutException" />.</para>
+        /// <para>It's recommended to use this API in conjunction with the <see cref="ConstrainedExtensions.MaxWidth">MaxWidth</see> element.</para>
+        /// </remarks>
+        /// <returns>The container of the newly created item.</returns>
         public IContainer AutoItem()
         {
             return Item(RowItemType.Auto);
@@ -55,6 +80,17 @@ namespace QuestPDF.Fluent
     
     public static class RowExtensions
     {
+        /// <summary>
+        /// Draws a collection of elements horizontally.
+        /// Depending on the content direction mode, elements will be drawn from left to right, or from right to left.
+        /// <br />
+        /// <a href="https://www.questpdf.com/api-reference/row.html">Learn more</a>
+        /// </summary>
+        /// <remarks>
+        /// <para>Supports paging.</para>
+        /// <para>Depending on its content, the Row element may repeatedly draw certain items across multiple pages. Use the <see cref="ElementExtensions.ShowOnce">ShowOnce</see> element to modify this behavior if it's not desired.</para>
+        /// </remarks>
+        /// <param name="handler">The action to configure the row's content.</param>
         public static void Row(this IContainer element, Action<RowDescriptor> handler)
         {
             var descriptor = new RowDescriptor();

+ 47 - 8
Source/QuestPDF/Fluent/ScaleExtensions.cs

@@ -14,31 +14,70 @@ namespace QuestPDF.Fluent
             return element.Element(scale);
         }
         
-        public static IContainer Scale(this IContainer element, float value)
+        /// <summary>
+        /// Scales its inner content proportionally.
+        /// <a href="https://www.questpdf.com/api-reference/scale.html">Learn more</a>
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="scale.remarks"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="scale.factorParam"]/*' />
+        public static IContainer Scale(this IContainer element, float factor)
         {
-            return element.ScaleHorizontal(value).ScaleVertical(value);
+            return element.ScaleHorizontal(factor).ScaleVertical(factor);
         }
         
-        public static IContainer ScaleHorizontal(this IContainer element, float value)
+        /// <summary>
+        /// Scales the available horizontal space (along the X axis), causing content to appear expanded or squished, rather than simply larger or smaller.
+        /// <a href="https://www.questpdf.com/api-reference/scale.html">Learn more</a>
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="scale.remarks"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="scale.factorParam"]/*' />
+        public static IContainer ScaleHorizontal(this IContainer element, float factor)
         {
-            return element.Scale(x => x.ScaleX *= value);
+            return element.Scale(x => x.ScaleX *= factor);
         }
         
-        public static IContainer FlipHorizontal(this IContainer element)
+        /// <summary>
+        /// Scales the available vertical space (along the Y axis), causing content to appear expanded or squished, rather than simply larger or smaller.
+        /// <a href="https://www.questpdf.com/api-reference/scale.html">Learn more</a> 
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="scale.remarks"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="scale.factorParam"]/*' />
+        public static IContainer ScaleVertical(this IContainer element, float factor)
         {
-            return element.ScaleHorizontal(-1);
+            return element.Scale(x => x.ScaleY *= factor);
         }
         
-        public static IContainer ScaleVertical(this IContainer element, float value)
+        /// <summary>
+        /// Flips its content to create a mirror image along the Y axis, swapping elements from left to right.
+        /// <a href="https://www.questpdf.com/api-reference/flip.html">Learn more</a>
+        /// </summary>
+        /// <example>
+        /// Elements on the left will appear on the right.
+        /// </example>
+        public static IContainer FlipHorizontal(this IContainer element)
         {
-            return element.Scale(x => x.ScaleY *= value);
+            return element.ScaleHorizontal(-1);
         }
         
+        /// <summary>
+        /// Flips its content to create a mirror image along the X axis, moving elements from the top to the bottom.
+        /// <a href="https://www.questpdf.com/api-reference/flip.html">Learn more</a>
+        /// </summary>
+        /// <example>
+        /// Elements at the top will be positioned at the bottom.
+        /// </example>
         public static IContainer FlipVertical(this IContainer element)
         {
             return element.ScaleVertical(-1);
         }
         
+        /// <summary>
+        /// Creates a mirror image of its content across both axes.
+        /// <a href="https://www.questpdf.com/api-reference/flip.html">Learn more</a>
+        /// </summary>
+        /// <example>
+        /// Elements originally in the top-left corner will be positioned in the bottom-right corner.
+        /// </example>
         public static IContainer FlipOver(this IContainer element)
         {
             return element.FlipHorizontal().FlipVertical();

+ 76 - 0
Source/QuestPDF/Fluent/TableExtensions.cs

@@ -14,11 +14,23 @@ namespace QuestPDF.Fluent
     {
         internal List<TableColumnDefinition> Columns { get; } = new();
         
+        /// <summary>
+        /// Defines a column of constant size that occupies the specified horizontal space.
+        /// </summary>
+        /// <returns>The container of the newly created column.</returns>
         public void ConstantColumn(float width, Unit unit = Unit.Point)
         {
             ComplexColumn(constantWidth: width.ToPoints(unit));
         }
         
+        /// <summary>
+        /// Defines a column with a relative size that adjusts its width in relation to other relative columns.
+        /// <a href="https://www.questpdf.com/api-reference/table.html#column-definitions">Learn more</a>
+        /// </summary>
+        /// <example>
+        /// For a table 100 points wide with three columns: a relative size of 1, a relative size of 5, and a constant size of 10 points, they will span 15 points, 75 points, and 10 points respectively.
+        /// </example>
+        /// <returns>The container for the newly defined column.</returns>
         public void RelativeColumn(float width = 1)
         {
             ComplexColumn(relativeWidth: width);
@@ -40,6 +52,10 @@ namespace QuestPDF.Fluent
             Cells = cells;
         }
         
+        /// <summary>
+        /// Inserts a new item into the table element.
+        /// </summary>
+        /// <returns>The container for the newly inserted cell. Provides options to adjust the cell's position, size, and content.</returns>
         public ITableCellContainer Cell()
         {
             var cell = new TableCell();
@@ -56,6 +72,14 @@ namespace QuestPDF.Fluent
         private Table ContentTable { get; } = new();
         private Table FooterTable { get; } = new();
 
+        /// <summary>
+        /// Specifies the order and size of the table columns.
+        /// <a href="https://www.questpdf.com/api-reference/table.html#column-definitions">Learn more</a>
+        /// </summary>
+        /// <remarks>
+        /// This configuration affects both the main content as well as the header and footer sections.
+        /// </remarks>
+        /// <param name="handler">Handler to define columns of the table.</param>
         public void ColumnsDefinition(Action<TableColumnsDefinitionDescriptor> handler)
         {
             var descriptor = new TableColumnsDefinitionDescriptor();
@@ -66,23 +90,44 @@ namespace QuestPDF.Fluent
             FooterTable.Columns = descriptor.Columns;
         }
         
+        /// <summary>
+        /// Adjusts rendering algorithm to better handle complex table structures, especially those spanning multiple pages. 
+        /// This applies a unique rule to the final cells in each column, ensuring they stretch to fill the table's bottom edge.
+        /// Such an approach can enhance your table's visual appeal.
+        /// <a href="https://www.questpdf.com/api-reference/table.html#extend-last-cells-to-table-bottom">Learn more</a>
+        /// </summary>
         public void ExtendLastCellsToTableBottom()
         {
             ContentTable.ExtendLastCellsToTableBottom = true;
         }
         
+        /// <summary>
+        /// Specifies a table header that appears on each page, positioned above the main content.
+        /// The cell placement and dimensions in this header are distinct from those in the main content.
+        /// <a href="https://www.questpdf.com/api-reference/table.html#table-header-footer">Learn more</a>
+        /// </summary>
+        /// <param name="handler">Handler for configuring the header cells.</param>
         public void Header(Action<TableCellDescriptor> handler)
         {
             var descriptor = new TableCellDescriptor(HeaderTable.Cells);
             handler(descriptor);
         }
         
+        /// <summary>
+        /// Specifies a table footer that appears on each page, positioned below the main content.
+        /// The placement and dimensions of cells within this footer are distinct from the main content.
+        /// <a href="https://www.questpdf.com/api-reference/table.html#table-header-footer">Learn more</a>
+        /// </summary>
         public void Footer(Action<TableCellDescriptor> handler)
         {
             var descriptor = new TableCellDescriptor(FooterTable.Cells);
             handler(descriptor);
         }
         
+        /// <summary>
+        /// Inserts a new item into the table element.
+        /// </summary>
+        /// <returns>The container for the newly inserted cell, enabling customization of its position, size, and content.</returns>
         public ITableCellContainer Cell()
         {
             var cell = new TableCell();
@@ -121,6 +166,13 @@ namespace QuestPDF.Fluent
     
     public static class TableExtensions
     {
+        /// <summary>
+        /// <para>Renders a set of items utilizing the table layout algorithm.</para>
+        /// <para>
+        /// Items may be auto-placed based on the order they're called or can have assigned specific column and row positions. Cells can also span multiple columns and/or rows.
+        /// </para>
+        /// </summary>
+        /// <param name="handler">Handler to define the table content.</param>
         public static void Table(this IContainer element, Action<TableDescriptor> handler)
         {
             var descriptor = new TableDescriptor();
@@ -139,21 +191,45 @@ namespace QuestPDF.Fluent
             return element;
         }
         
+        /// <summary>
+        /// Specifies the column position (horizontal axis) of the cell.
+        /// <a href="https://www.questpdf.com/api-reference/table.html#basic-usage">Learn more</a>
+        /// </summary>
+        /// <param name="value">Columns are numbered starting with 1.</param>
         public static ITableCellContainer Column(this ITableCellContainer tableCellContainer, uint value)
         {
             return tableCellContainer.TableCell(x => x.Column = (int)value);
         }
         
+        /// <summary>
+        /// Defines the number of columns a cell spans in the horizontal axis.
+        /// <a href="https://www.questpdf.com/api-reference/table.html#row-spans-and-column-spans">Learn more</a>
+        /// </summary>
+        /// <remarks>
+        /// Useful when creating complex layouts.
+        /// </remarks>
         public static ITableCellContainer ColumnSpan(this ITableCellContainer tableCellContainer, uint value)
         {
             return tableCellContainer.TableCell(x => x.ColumnSpan = (int)value);
         }
         
+        /// <summary>
+        /// Specifies the row position (vertical axis) of the cell.
+        /// <a href="https://www.questpdf.com/api-reference/table.html#basic-usage">Learn more</a>
+        /// </summary>
+        /// <param name="value">Rows are numbered starting with 1.</param>
         public static ITableCellContainer Row(this ITableCellContainer tableCellContainer, uint value)
         {
             return tableCellContainer.TableCell(x => x.Row = (int)value);
         }
         
+        /// <summary>
+        /// Defines the number of rows a cell spans in the vertical axis.
+        /// <a href="https://www.questpdf.com/api-reference/table.html#row-spans-and-column-spans">Learn more</a>
+        /// </summary>
+        /// <remarks>
+        /// Useful when creating complex layouts.
+        /// </remarks>
         public static ITableCellContainer RowSpan(this ITableCellContainer tableCellContainer, uint value)
         {
             return tableCellContainer.TableCell(x => x.RowSpan = (int)value);

+ 132 - 12
Source/QuestPDF/Fluent/TextExtensions.cs

@@ -27,6 +27,12 @@ namespace QuestPDF.Fluent
         }
     }
 
+    /// <summary>
+    /// Transforms a page number into a custom text format (e.g., roman numerals).
+    /// </summary>
+    /// <remarks>
+    /// When <paramref name="pageNumber"/> is null, the delegate should return a default placeholder text of a typical length.
+    /// </remarks>
     public delegate string PageNumberFormatter(int? pageNumber);
     
     public class TextPageNumberDescriptor : TextSpanDescriptor
@@ -39,6 +45,11 @@ namespace QuestPDF.Fluent
             AssignFormatFunction(x => x?.ToString());
         }
 
+        /// <summary>
+        /// Provides the capability to render the page number in a custom text format (e.g., roman numerals).
+        /// <a href="https://www.questpdf.com/api-reference/text.html#page-numbers">Lear more</a>
+        /// </summary>
+        /// <param name="formatter">The function designated to modify the number into text. When given a null input, a typical-sized placeholder text must be produced.</param>
         public TextPageNumberDescriptor Format(PageNumberFormatter formatter)
         {
             AssignFormatFunction(formatter);
@@ -53,31 +64,51 @@ namespace QuestPDF.Fluent
         internal HorizontalAlignment? Alignment { get; set; }
         private float Spacing { get; set; } = 0f;
 
+        /// <summary>
+        /// Applies a consistent text style for the whole content within this <see cref="TextExtensions.Text">Text</see> element.
+        /// </summary>
+        /// <param name="style">The TextStyle object to override the default inherited text style.</param>
         public void DefaultTextStyle(TextStyle style)
         {
             DefaultStyle = style;
         }
         
+        /// <summary>
+        /// Applies a consistent text style for the whole content within this <see cref="TextExtensions.Text">Text</see> element.
+        /// </summary>
+        /// <param name="handler">Handler to modify the default inherited text style.</param>
         public void DefaultTextStyle(Func<TextStyle, TextStyle> style)
         {
             DefaultStyle = style(TextStyle.Default);
         }
   
+        /// <summary>
+        /// Aligns text horizontally to the left side.
+        /// </summary>
         public void AlignLeft()
         {
             Alignment = HorizontalAlignment.Left;
         }
         
+        /// <summary>
+        /// Aligns text horizontally to the center, ensuring equal space on both left and right sides.
+        /// </summary>
         public void AlignCenter()
         {
             Alignment = HorizontalAlignment.Center;
         }
         
+        /// <summary>
+        /// Aligns content horizontally to the right side.
+        /// </summary>
         public void AlignRight()
         {
             Alignment = HorizontalAlignment.Right;
         }
 
+        /// <summary>
+        /// Adjusts the gap between successive paragraphs (separated by line breaks).
+        /// </summary>
         public void ParagraphSpacing(float value, Unit unit = Unit.Point)
         {
             Spacing = value.ToPoints(unit);
@@ -109,6 +140,10 @@ namespace QuestPDF.Fluent
             Span(text).Style(style);
         }
         
+        /// <summary>
+        /// Appends the given text to the current paragraph.
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.returns.spanDescriptor"]/*' />
         public TextSpanDescriptor Span(string? text)
         {
             if (text == null)
@@ -137,12 +172,20 @@ namespace QuestPDF.Fluent
             return new TextSpanDescriptor(x => items.ForEach(y => y.Style = x));
         }
 
+        /// <summary>
+        /// Appends a line with the provided text followed by an environment-specific newline character.
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.returns.spanDescriptor"]/*' />
         public TextSpanDescriptor Line(string? text)
         {
             text ??= string.Empty;
             return Span(text + Environment.NewLine);
         }
 
+        /// <summary>
+        /// Appends a blank line.
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.returns.spanDescriptor"]/*' />
         public TextSpanDescriptor EmptyLine()
         {
             return Span(Environment.NewLine);
@@ -156,42 +199,81 @@ namespace QuestPDF.Fluent
             return new TextPageNumberDescriptor(x => textBlockItem.Style = x, x => textBlockItem.Source = context => x(pageNumber(context)));
         }
 
+        /// <summary>
+        /// Appends text showing the current page number.
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.returns.pageNumberDescriptor"]/*' />
         public TextPageNumberDescriptor CurrentPageNumber()
         {
             return PageNumber(x => x.CurrentPage);
         }
         
+        /// <summary>
+        /// Appends text showing the total number of pages in the document.
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.returns.pageNumberDescriptor"]/*' />
         public TextPageNumberDescriptor TotalPages()
         {
             return PageNumber(x => x.DocumentLength);
         }
 
         [Obsolete("This element has been renamed since version 2022.3. Please use the BeginPageNumberOfSection method.")]
-        public void PageNumberOfLocation(string locationName, TextStyle? style = null)
+        public void PageNumberOfLocation(string sectionName, TextStyle? style = null)
         {
-            BeginPageNumberOfSection(locationName).Style(style);
+            BeginPageNumberOfSection(sectionName).Style(style);
         }
         
-        public TextPageNumberDescriptor BeginPageNumberOfSection(string locationName)
+        /// <summary>
+        /// Appends text showing the number of the first page of the specified <see cref="ElementExtensions.Section">Section</see>.
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="param.sectionName"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.returns.pageNumberDescriptor"]/*' />
+        public TextPageNumberDescriptor BeginPageNumberOfSection(string sectionName)
         {
-            return PageNumber(x => x.GetLocation(locationName)?.PageStart);
+            return PageNumber(x => x.GetLocation(sectionName)?.PageStart);
         }
         
-        public TextPageNumberDescriptor EndPageNumberOfSection(string locationName)
+        /// <summary>
+        /// Appends text showing the number of the last page of the specified <see cref="ElementExtensions.Section">Section</see>.
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="param.sectionName"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.returns.pageNumberDescriptor"]/*' />
+        public TextPageNumberDescriptor EndPageNumberOfSection(string sectionName)
         {
-            return PageNumber(x => x.GetLocation(locationName)?.PageEnd);
+            return PageNumber(x => x.GetLocation(sectionName)?.PageEnd);
         }
         
-        public TextPageNumberDescriptor PageNumberWithinSection(string locationName)
-        {
-            return PageNumber(x => x.CurrentPage + 1 - x.GetLocation(locationName)?.PageStart);
+        /// <summary>
+        /// Appends text showing the page number relative to the beginning of the given <see cref="ElementExtensions.Section">Section</see>.
+        /// </summary>
+        /// <example>
+        /// For a section spanning pages 20 to 50, page 35 will show as 15.
+        /// </example>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="param.sectionName"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.returns.pageNumberDescriptor"]/*' />
+        public TextPageNumberDescriptor PageNumberWithinSection(string sectionName)
+        {
+            return PageNumber(x => x.CurrentPage + 1 - x.GetLocation(sectionName)?.PageStart);
         }
         
-        public TextPageNumberDescriptor TotalPagesWithinSection(string locationName)
-        {
-            return PageNumber(x => x.GetLocation(locationName)?.Length);
+        /// <summary>
+        /// Appends text showing the total number of pages within the given <see cref="ElementExtensions.Section">Section</see>.
+        /// </summary>
+        /// <example>
+        /// For a section spanning pages 20 to 50, the total is 30 pages.
+        /// </example>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="param.sectionName"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.returns.pageNumberDescriptor"]/*' />
+        public TextPageNumberDescriptor TotalPagesWithinSection(string sectionName)
+        {
+            return PageNumber(x => x.GetLocation(sectionName)?.Length);
         }
         
+        /// <summary>
+        /// Creates a clickable text that navigates the user to a specified <see cref="ElementExtensions.Section">Section</see>.
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="param.sectionName"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.returns.spanDescriptor"]/*' />
         public TextSpanDescriptor SectionLink(string? text, string sectionName)
         {
             if (IsNullOrEmpty(sectionName))
@@ -216,6 +298,11 @@ namespace QuestPDF.Fluent
             SectionLink(text, locationName).Style(style);
         }
         
+        /// <summary>
+        /// Creates a clickable text that redirects the user to a specific webpage.
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="param.url"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.returns.spanDescriptor"]/*' />
         public TextSpanDescriptor Hyperlink(string? text, string url)
         {
             if (IsNullOrEmpty(url))
@@ -240,6 +327,13 @@ namespace QuestPDF.Fluent
             Hyperlink(text, url).Style(style);
         }
         
+        /// <summary>
+        /// Embeds custom content within the text.
+        /// </summary>
+        /// <remarks>
+        /// The container must fit within one line and can not span multiple pages.
+        /// </remarks>
+        /// <returns>A container for the embedded content. Populate using the Fluent API.</returns>
         public IContainer Element()
         {
             var container = new Container();
@@ -252,6 +346,24 @@ namespace QuestPDF.Fluent
             return container.AlignBottom().MinimalBox();
         }
         
+        /// <summary>
+        /// Embeds custom content within the text.
+        /// </summary>
+        /// <remarks>
+        /// The container must fit within one line and can not span multiple pages.
+        /// </remarks>
+        /// <param name="handler">Delegate to populate the embedded container with custom content.</param>
+        public void Element(Action<IContainer> handler)
+        {
+            var container = new Container();
+            handler(container.AlignBottom().MinimalBox());
+                
+            AddItemToLastTextBlock(new TextBlockElement
+            {
+                Element = container
+            });
+        }
+        
         internal void Compose(IContainer container)
         {
             TextBlocks.ToList().ForEach(x => x.Alignment ??= Alignment);
@@ -277,6 +389,10 @@ namespace QuestPDF.Fluent
     
     public static class TextExtensions
     {
+        /// <summary>
+        /// Draws rich formatted text.
+        /// </summary>
+        /// <param name="content">Handler to define the content of the text elements (e.g.: paragraphs, spans, hyperlinks, page numbers).</param>
         public static void Text(this IContainer element, Action<TextDescriptor> content)
         {
             var descriptor = new TextDescriptor();
@@ -300,6 +416,10 @@ namespace QuestPDF.Fluent
             return element.Text(text?.ToString());
         }
 
+        /// <summary>
+        /// Draws the provided text on the page
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.returns.spanDescriptor"]/*' />
         public static TextSpanDescriptor Text(this IContainer element, string? text)
         {
             var descriptor = (TextSpanDescriptor) null!;

+ 63 - 17
Source/QuestPDF/Fluent/TextSpanDescriptorExtensions.cs

@@ -1,12 +1,13 @@
 using System;
-using System.Runtime.CompilerServices;
 using QuestPDF.Helpers;
+using QuestPDF.Drawing;
 using QuestPDF.Infrastructure;
 
 namespace QuestPDF.Fluent
 {
     public static class TextSpanDescriptorExtensions
     {
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.style"]/*' />
         public static T Style<T>(this T descriptor, TextStyle style) where T : TextSpanDescriptor
         {
             if (style == null)
@@ -16,78 +17,96 @@ namespace QuestPDF.Fluent
             return descriptor;
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.fontFallback"]/*' />
         public static T Fallback<T>(this T descriptor, TextStyle? value = null) where T : TextSpanDescriptor
         {
             descriptor.TextStyle.Fallback = value;
             return descriptor;
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.fontFallback"]/*' />
         public static T Fallback<T>(this T descriptor, Func<TextStyle, TextStyle> handler) where T : TextSpanDescriptor
         {
             return descriptor.Fallback(handler(TextStyle.Default));
         }
         
-        public static T FontColor<T>(this T descriptor, string value) where T : TextSpanDescriptor
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.fontColor"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="colorParam"]/*' />
+        public static T FontColor<T>(this T descriptor, string color) where T : TextSpanDescriptor
         {
-            ColorValidator.Validate(value);
-            descriptor.MutateTextStyle(x => x.FontColor(value));
+            ColorValidator.Validate(color);
+            descriptor.MutateTextStyle(x => x.FontColor(color));
             return descriptor;
         }
         
-        public static T BackgroundColor<T>(this T descriptor, string value) where T : TextSpanDescriptor
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.backgroundColor"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="colorParam"]/*' />
+        public static T BackgroundColor<T>(this T descriptor, string color) where T : TextSpanDescriptor
         {
-            ColorValidator.Validate(value);
-            descriptor.MutateTextStyle(x => x.BackgroundColor(value));
+            ColorValidator.Validate(color);
+            descriptor.MutateTextStyle(x => x.BackgroundColor(color));
             return descriptor;
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.fontFamily"]/*' />
         public static T FontFamily<T>(this T descriptor, string value) where T : TextSpanDescriptor
         {
             descriptor.MutateTextStyle(x => x.FontFamily(value));
             return descriptor;
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.fontSize"]/*' />
         public static T FontSize<T>(this T descriptor, float value) where T : TextSpanDescriptor
         {
+            if (value <= 0)
+                throw new ArgumentException("Font size must be greater than 0.");
+            
             descriptor.MutateTextStyle(x => x.FontSize(value));
             return descriptor;
         }
         
-        public static T LineHeight<T>(this T descriptor, float value) where T : TextSpanDescriptor
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.lineHeight"]/*' />
+        public static T LineHeight<T>(this T descriptor, float factor) where T : TextSpanDescriptor
         {
-            descriptor.MutateTextStyle(x => x.LineHeight(value));
+            if (factor <= 0)
+                throw new ArgumentException("Line height must be greater than 0.");
+            
+            descriptor.MutateTextStyle(x => x.LineHeight(factor));
             return descriptor;
         }
 
-        /// <summary>
-        /// Letter spacing controls space between characters. Value 0 corresponds to normal spacing defined by a font.
-        /// Positive values create additional space, whereas negative values reduce space between characters.
-        /// Added / reduced space is relative to the font size.
-        /// </summary>
-        public static T LetterSpacing<T>(this T descriptor, float value) where T : TextSpanDescriptor
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.letterSpacing"]/*' />
+        public static T LetterSpacing<T>(this T descriptor, float factor) where T : TextSpanDescriptor
         {
-            descriptor.MutateTextStyle(x => x.LetterSpacing(value));
+            if (factor <= 0)
+                throw new ArgumentException("Letter spacing must be greater than 0.");
+            
+            descriptor.MutateTextStyle(x => x.LetterSpacing(factor));
             return descriptor;
         }
-
+        
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.italic"]/*' />
         public static T Italic<T>(this T descriptor, bool value = true) where T : TextSpanDescriptor
         {
             descriptor.MutateTextStyle(x => x.Italic(value));
             return descriptor;
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.strikethrough"]/*' />
         public static T Strikethrough<T>(this T descriptor, bool value = true) where T : TextSpanDescriptor
         {
             descriptor.MutateTextStyle(x => x.Strikethrough(value));
             return descriptor;
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.underline"]/*' />
         public static T Underline<T>(this T descriptor, bool value = true) where T : TextSpanDescriptor
         {
             descriptor.MutateTextStyle(x => x.Underline(value));
             return descriptor;
         }
 
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.wrapAnywhere"]/*' />
         public static T WrapAnywhere<T>(this T descriptor, bool value = true) where T : TextSpanDescriptor
         {
             descriptor.MutateTextStyle(x => x.WrapAnywhere(value));
@@ -96,60 +115,80 @@ namespace QuestPDF.Fluent
 
         #region Weight
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.thin"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.remarks"]/*' />
         public static T Thin<T>(this T descriptor) where T : TextSpanDescriptor
         {
             descriptor.MutateTextStyle(x => x.Thin());
             return descriptor;
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.extraLight"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.remarks"]/*' />
         public static T ExtraLight<T>(this T descriptor) where T : TextSpanDescriptor
         {
             descriptor.MutateTextStyle(x => x.ExtraLight());
             return descriptor;
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.light"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.remarks"]/*' />
         public static T Light<T>(this T descriptor) where T : TextSpanDescriptor
         {
             descriptor.MutateTextStyle(x => x.Light());
             return descriptor;
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.normal"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.remarks"]/*' />
         public static T NormalWeight<T>(this T descriptor) where T : TextSpanDescriptor
         {
             descriptor.MutateTextStyle(x => x.NormalWeight());
             return descriptor;
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.medium"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.remarks"]/*' />
         public static T Medium<T>(this T descriptor) where T : TextSpanDescriptor
         {
             descriptor.MutateTextStyle(x => x.Medium());
             return descriptor;
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.semiBold"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.remarks"]/*' />
         public static T SemiBold<T>(this T descriptor) where T : TextSpanDescriptor
         {
             descriptor.MutateTextStyle(x => x.SemiBold());
             return descriptor;
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.bold"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.remarks"]/*' />
         public static T Bold<T>(this T descriptor) where T : TextSpanDescriptor
         {
             descriptor.MutateTextStyle(x => x.Bold());
             return descriptor;
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.extraBold"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.remarks"]/*' />
         public static T ExtraBold<T>(this T descriptor) where T : TextSpanDescriptor
         {
             descriptor.MutateTextStyle(x => x.ExtraBold());
             return descriptor;
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.black"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.remarks"]/*' />
         public static T Black<T>(this T descriptor) where T : TextSpanDescriptor
         {
             descriptor.MutateTextStyle(x => x.Black());
             return descriptor;
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.extraBlack"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.remarks"]/*' />
         public static T ExtraBlack<T>(this T descriptor) where T : TextSpanDescriptor
         {
             descriptor.MutateTextStyle(x => x.ExtraBlack());
@@ -159,18 +198,22 @@ namespace QuestPDF.Fluent
         #endregion
 
         #region Position
+        
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.position.normal"]/*' />
         public static T NormalPosition<T>(this T descriptor) where T : TextSpanDescriptor
         {
             descriptor.MutateTextStyle(x => x.NormalPosition());
             return descriptor;
         }
 
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.position.subscript"]/*' />
         public static T Subscript<T>(this T descriptor) where T : TextSpanDescriptor
         {
             descriptor.MutateTextStyle(x => x.Subscript());
             return descriptor;
         }
 
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.position.superscript"]/*' />
         public static T Superscript<T>(this T descriptor) where T : TextSpanDescriptor
         {
             descriptor.MutateTextStyle(x => x.Superscript());
@@ -181,18 +224,21 @@ namespace QuestPDF.Fluent
         
         #region Direction
 
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.direction.auto"]/*' />
         public static T DirectionAuto<T>(this T descriptor) where T : TextSpanDescriptor
         {
             descriptor.MutateTextStyle(x => x.DirectionAuto());
             return descriptor;
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.direction.ltr"]/*' />
         public static T DirectionFromLeftToRight<T>(this T descriptor) where T : TextSpanDescriptor
         {
             descriptor.MutateTextStyle(x => x.DirectionFromLeftToRight());
             return descriptor;
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.direction.rtl"]/*' />
         public static T DirectionFromRightToLeft<T>(this T descriptor) where T : TextSpanDescriptor
         {
             descriptor.MutateTextStyle(x => x.DirectionFromRightToLeft());

+ 60 - 16
Source/QuestPDF/Fluent/TextStyleExtensions.cs

@@ -13,16 +13,20 @@ namespace QuestPDF.Fluent
             return style.FontColor(value);
         }
         
-        public static TextStyle FontColor(this TextStyle style, string value)
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.fontColor"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="colorParam"]/*' />
+        public static TextStyle FontColor(this TextStyle style, string color)
         {
-            ColorValidator.Validate(value);
-            return style.Mutate(TextStyleProperty.Color, value);
+            ColorValidator.Validate(color);
+            return style.Mutate(TextStyleProperty.Color, color);
         }
         
-        public static TextStyle BackgroundColor(this TextStyle style, string value)
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.backgroundColor"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="colorParam"]/*' />
+        public static TextStyle BackgroundColor(this TextStyle style, string color)
         {
-            ColorValidator.Validate(value);
-            return style.Mutate(TextStyleProperty.BackgroundColor, value);
+            ColorValidator.Validate(color);
+            return style.Mutate(TextStyleProperty.BackgroundColor, color);
         }
         
         [Obsolete("This element has been renamed since version 2022.3. Please use the FontFamily method.")]
@@ -31,6 +35,7 @@ namespace QuestPDF.Fluent
             return style.FontFamily(value);
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.fontFamily"]/*' />
         public static TextStyle FontFamily(this TextStyle style, string value)
         {
             return style.Mutate(TextStyleProperty.FontFamily, value);
@@ -42,41 +47,52 @@ namespace QuestPDF.Fluent
             return style.FontSize(value);
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.fontSize"]/*' />
         public static TextStyle FontSize(this TextStyle style, float value)
         {
+            if (value <= 0)
+                throw new ArgumentException("Font size must be greater than 0.");
+            
             return style.Mutate(TextStyleProperty.Size, value);
         }
         
-        public static TextStyle LineHeight(this TextStyle style, float value)
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.lineHeight"]/*' />
+        public static TextStyle LineHeight(this TextStyle style, float factor = 1)
         {
-            return style.Mutate(TextStyleProperty.LineHeight, value);
+            if (factor <= 0)
+                throw new ArgumentException("Line height must be greater than 0.");
+            
+            return style.Mutate(TextStyleProperty.LineHeight, factor);
         }
 
-        /// <summary>
-        /// Letter spacing controls space between characters. Value 0 corresponds to normal spacing defined by a font.
-        /// Positive values create additional space, whereas negative values reduce space between characters.
-        /// Added / reduced space is relative to the font size.
-        /// </summary>
-        public static TextStyle LetterSpacing(this TextStyle style, float value)
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.letterSpacing"]/*' />
+        public static TextStyle LetterSpacing(this TextStyle style, float factor = 1)
         {
-            return style.Mutate(TextStyleProperty.LetterSpacing, value);
+            if (factor <= 0)
+                throw new ArgumentException("Letter spacing must be greater than 0.");
+            
+            return style.Mutate(TextStyleProperty.LetterSpacing, factor);
         }
 
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.italic"]/*' />
         public static TextStyle Italic(this TextStyle style, bool value = true)
         {
             return style.Mutate(TextStyleProperty.IsItalic, value);
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.strikethrough"]/*' />
         public static TextStyle Strikethrough(this TextStyle style, bool value = true)
         {
             return style.Mutate(TextStyleProperty.HasStrikethrough, value);
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.underline"]/*' />
         public static TextStyle Underline(this TextStyle style, bool value = true)
         {
             return style.Mutate(TextStyleProperty.HasUnderline, value);
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.wrapAnywhere"]/*' />
         public static TextStyle WrapAnywhere(this TextStyle style, bool value = true)
         {
             return style.Mutate(TextStyleProperty.WrapAnywhere, value);
@@ -89,51 +105,71 @@ namespace QuestPDF.Fluent
             return style.Mutate(TextStyleProperty.FontWeight, weight);
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.thin"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.remarks"]/*' />
         public static TextStyle Thin(this TextStyle style)
         {
             return style.Weight(FontWeight.Thin);
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.extraLight"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.remarks"]/*' />
         public static TextStyle ExtraLight(this TextStyle style)
         {
             return style.Weight(FontWeight.ExtraLight);
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.light"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.remarks"]/*' />
         public static TextStyle Light(this TextStyle style)
         {
             return style.Weight(FontWeight.Light);
         }
-        
+       
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.normal"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.remarks"]/*' />
         public static TextStyle NormalWeight(this TextStyle style)
         {
             return style.Weight(FontWeight.Normal);
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.medium"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.remarks"]/*' />
         public static TextStyle Medium(this TextStyle style)
         {
             return style.Weight(FontWeight.Medium);
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.semiBold"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.remarks"]/*' />
         public static TextStyle SemiBold(this TextStyle style)
         {
             return style.Weight(FontWeight.SemiBold);
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.bold"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.remarks"]/*' />
         public static TextStyle Bold(this TextStyle style)
         {
             return style.Weight(FontWeight.Bold);
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.extraBold"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.remarks"]/*' />
         public static TextStyle ExtraBold(this TextStyle style)
         {
             return style.Weight(FontWeight.ExtraBold);
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.black"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.remarks"]/*' />
         public static TextStyle Black(this TextStyle style)
         {
             return style.Weight(FontWeight.Black);
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.extraBlack"]/*' />
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.weight.remarks"]/*' />
         public static TextStyle ExtraBlack(this TextStyle style)
         {
             return style.Weight(FontWeight.ExtraBlack);
@@ -143,16 +179,19 @@ namespace QuestPDF.Fluent
 
         #region Position
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.position.normal"]/*' />
         public static TextStyle NormalPosition(this TextStyle style)
         {
             return style.Position(FontPosition.Normal);
         }
 
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.position.subscript"]/*' />
         public static TextStyle Subscript(this TextStyle style)
         {
             return style.Position(FontPosition.Subscript);
         }
 
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.position.superscript"]/*' />
         public static TextStyle Superscript(this TextStyle style)
         {
             return style.Position(FontPosition.Superscript);
@@ -167,11 +206,13 @@ namespace QuestPDF.Fluent
 
         #region Fallback
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.fontFallback"]/*' />
         public static TextStyle Fallback(this TextStyle style, TextStyle? value = null)
         {
             return style.Mutate(TextStyleProperty.Fallback, value);
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.fontFallback"]/*' />
         public static TextStyle Fallback(this TextStyle style, Func<TextStyle, TextStyle> handler)
         {
             return style.Fallback(handler(TextStyle.Default));
@@ -186,16 +227,19 @@ namespace QuestPDF.Fluent
             return style.Mutate(TextStyleProperty.Direction, textDirection);
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.direction.auto"]/*' />
         public static TextStyle DirectionAuto(this TextStyle style)
         {
             return style.TextDirection(Infrastructure.TextDirection.Auto);
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.direction.ltr"]/*' />
         public static TextStyle DirectionFromLeftToRight(this TextStyle style)
         {
             return style.TextDirection(Infrastructure.TextDirection.LeftToRight);
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="text.direction.rtl"]/*' />
         public static TextStyle DirectionFromRightToLeft(this TextStyle style)
         {
             return style.TextDirection(Infrastructure.TextDirection.RightToLeft);

+ 15 - 1
Source/QuestPDF/Fluent/TranslateExtensions.cs

@@ -14,11 +14,25 @@ namespace QuestPDF.Fluent
             return element.Element(translate);
         }
 
+        /// <summary>
+        /// Moves content along the horizontal axis.
+        /// A positive value moves content to the right; a negative value moves it to the left.
+        /// Does not alter the available space.
+        /// <br />
+        /// <a href="https://www.questpdf.com/api-reference/translate.html">Learn more</a>
+        /// </summary>
         public static IContainer TranslateX(this IContainer element, float value, Unit unit = Unit.Point)
         {
             return element.Translate(x => x.TranslateX += value.ToPoints(unit));
         }
-        
+   
+        /// <summary>
+        /// Moves content along the vertical axis.
+        /// A positive value moves content downwards, a negative value moves it upwards.
+        /// Does not alter the available space.
+        /// <br />
+        /// <a href="https://www.questpdf.com/api-reference/translate.html">Learn more</a>
+        /// </summary>
         public static IContainer TranslateY(this IContainer element, float value, Unit unit = Unit.Point)
         {
             return element.Translate(x => x.TranslateY += value.ToPoints(unit));

+ 16 - 0
Source/QuestPDF/Helpers/Colors.cs

@@ -1,5 +1,21 @@
 namespace QuestPDF.Helpers
 {
+    /// <summary>
+    /// Offers a palette of colors defined by the Google Material Design System guidelines.
+    /// Each primary color (like red, blue, green) has associated shades and accent variations.
+    /// <br />
+    /// <a href="https://m2.material.io/design/color/the-color-system.html#tools-for-picking-colors">Learn more</a>
+    /// </summary>
+    /// <example>
+    /// Access colors using the following pattern:
+    /// <code>
+    /// Colors.Black;
+    /// Colors.Red.Lighten5;
+    /// Colors.Blue.Medium; 
+    /// Colors.Green.Darken4; 
+    /// Colors.Yellow.Accent2; 
+    /// </code>
+    /// </example>
     public class Colors
     {
         public const string Black = "#000000";

+ 3 - 0
Source/QuestPDF/Helpers/Fonts.cs

@@ -1,5 +1,8 @@
 namespace QuestPDF.Helpers
 {
+    /// <summary>
+    /// Contains a collection of fonts defined by the PDF standard.
+    /// </summary>
     public class Fonts
     {
         public const string Arial = "Arial";

+ 14 - 1
Source/QuestPDF/Helpers/PageSizes.cs

@@ -3,6 +3,16 @@ using QuestPDF.Infrastructure;
 
 namespace QuestPDF.Helpers
 {
+    /// <summary>
+    /// Defines the physical dimensions (width and height) of a page.
+    /// </summary>
+    /// <remarks>
+    /// <para>Commonly used page sizes are available in the <see cref="PageSizes"/> class.</para>
+    /// <para>Change page orientation with the <see cref="PageSizeExtensions.Portrait">Portrait</see> and <see cref="PageSizeExtensions.Landscape">Landscape</see> extension methods.</para>
+    /// </remarks>
+    /// <example>
+    /// <c>PageSizes.A4.Landscape();</c>
+    /// </example>
     public class PageSize
     {
         public readonly float Width;
@@ -17,7 +27,10 @@ namespace QuestPDF.Helpers
         public static implicit operator Size(PageSize pageSize) => new Size(pageSize.Width, pageSize.Height);
     }
 
-    public struct PageSizes
+    /// <summary>
+    /// Contains a collection of predefined, common and standard page sizes, such as A4 with dimensions of 595.4 inches in width and 842 inches in height.
+    /// </summary>
+    public static class PageSizes
     {
         public const int PointsPerInch = 72;
 

+ 179 - 13
Source/QuestPDF/Helpers/Placeholders.cs

@@ -82,12 +82,52 @@ namespace QuestPDF.Helpers
             return string.Join(" ", words);
         }
 
-        public static string LoremIpsum() => CommonParagraph;
-        
-        public static string Label() => RandomWords(2, 3).FirstCharToUpper();
-        public static string Sentence() => RandomWords(6, 12).FirstCharToUpper() + ".";
-        public static string Question() => RandomWords(4, 8).FirstCharToUpper() + "?";
+        /// <summary>
+        /// Returns the commonly used 'Lorem ipsum dolor sit amet' placeholder text.
+        /// </summary>
+        public static string LoremIpsum()
+        {
+            return CommonParagraph;
+        }
+
+        /// <summary>
+        /// Generates a random text ideal for concise labels like product names.
+        /// </summary>
+        /// <example>
+        /// "Beatae dolor" <br />
+        /// "Rerum quibusdam perspiciatis" <br />
+        /// "Fugiat aperiam officiis"
+        /// </example>
+        public static string Label()
+        {
+            return RandomWords(2, 3).FirstCharToUpper();
+        }
+
+        /// <summary>
+        /// Generates random text ideal for single sentences, like product description.
+        /// </summary>
+        /// <example>
+        /// Vero a id optio consequuntur dignissimos repellendus provident blanditiis.
+        /// </example>
+        public static string Sentence()
+        {
+            return RandomWords(6, 12).FirstCharToUpper() + ".";
+        }
 
+        /// <summary>
+        /// Generates random text formatted as a question.
+        /// </summary>
+        /// <example>
+        /// Sequi enim voluptas quasi modi aspernatur dolorem?
+        /// </example>
+        public static string Question()
+        {
+            return RandomWords(4, 8).FirstCharToUpper() + "?";
+        }
+
+        /// <summary>
+        /// Generates random text suited for paragraphs, like detailed product description.
+        /// </summary>
         public static string Paragraph()
         {
             var length = Random.Next(3, 6);
@@ -99,6 +139,9 @@ namespace QuestPDF.Helpers
             return string.Join(" ", sentences);
         }
         
+        /// <summary>
+        /// Generates random text ideal for multiple paragraphs, resembling an article.
+        /// </summary>
         public static string Paragraphs()
         {
             var length = Random.Next(2, 5);
@@ -110,16 +153,36 @@ namespace QuestPDF.Helpers
             return string.Join("\n", sentences);
         }
         
+        /// <summary>
+        /// Generates random text in the format of an email address.
+        /// </summary>
+        /// <example>
+        /// [email protected]
+        /// </example>
         public static string Email()
         {
             return $"{LongRandomWord()}{Random.Next(10, 99)}@{LongRandomWord()}.com";
         }
 
+        /// <summary>
+        /// Generates random text looking like a two-word name, with capitalized initials.
+        /// </summary>
+        /// <example>
+        /// "Voluptates Inventore" <br />
+        /// "Praesentium Consectetur" <br />
+        /// "Voluptatibus Molestias" <br />
+        /// </example>
         public static string Name()
         {
             return LongRandomWord().FirstCharToUpper() + " " + LongRandomWord().FirstCharToUpper();
         }
         
+        /// <summary>
+        /// Generates random text in the format of a phone number.
+        /// </summary>
+        /// <example>
+        /// 180-204-1358
+        /// </example>
         public static string PhoneNumber()
         {
             return $"{Random.Next(100, 999)}-{Random.Next(100, 999)}-{Random.Next(1000, 9999)}";
@@ -134,20 +197,93 @@ namespace QuestPDF.Helpers
         
         #region Time
 
-        private static DateTime RandomDate() => System.DateTime.Now - TimeSpan.FromDays(Random.NextDouble());
+        private static DateTime RandomDate()
+        {
+            var dayOffset = (Random.NextDouble() - 0.5) * 1000;
+            return System.DateTime.Now - TimeSpan.FromDays(dayOffset);
+        }
 
-        public static string Time() => RandomDate().ToString("T");
-        public static string ShortDate() => RandomDate().ToString("d");
-        public static string LongDate() => RandomDate().ToString("D");
-        public static string DateTime() => RandomDate().ToString("G");
+        /// <summary>
+        /// Generates random text representation of a random time.
+        /// </summary>
+        /// <example>
+        /// 18:34:47
+        /// </example>
+        public static string Time()
+        {
+            return RandomDate().ToString("T");
+        }
+
+        /// <summary>
+        /// Generates random text that resembles a date value using short formatting.
+        /// </summary>
+        /// <example>
+        /// 04/09/2023
+        /// </example>
+        public static string ShortDate()
+        {
+            return RandomDate().ToString("d");
+        }
+
+        /// <summary>
+        /// Generates random text that resembles a full date value.
+        /// </summary>
+        /// <example>
+        /// Monday, 18 November 2024
+        /// </example>
+        public static string LongDate()
+        {
+            return RandomDate().ToString("D");
+        }
+
+        /// <summary>
+        /// Generates random text that resembles a datetime value.
+        /// </summary>
+        /// <example>
+        /// 04/03/2024 20:43:15
+        /// </example>
+        public static string DateTime()
+        {
+            return RandomDate().ToString("G");
+        }
 
         #endregion
 
         #region Numbers
 
-        public static string Integer() => Random.Next(0, 10_000).ToString();
-        public static string Decimal() => (Random.NextDouble() * Random.Next(0, 100)).ToString("N2");
-        public static string Percent() => (Random.NextDouble() * 100).ToString("N0") + "%";
+        /// <summary>
+        /// Generates random text mimicking an integer value, ranging from 0 to 10,000.
+        /// </summary>
+        public static string Integer()
+        {
+            return Random.Next(0, 10_000).ToString();
+        }
+
+        /// <summary>
+        /// Generates random text in the style of a local-formatted decimal, values from 0 to 100 with two decimal points precision.
+        /// </summary>
+        /// <example>
+        /// 1,28 <br />
+        /// 7,94 <br />
+        /// 67,30
+        /// </example>
+        public static string Decimal()
+        {
+            return (Random.NextDouble() * Random.Next(0, 100)).ToString("N2");
+        }
+
+        /// <summary>
+        /// Generates random text resembling a percentage value.
+        /// </summary>
+        /// <example>
+        /// 48% <br />
+        /// 14% <br />
+        /// 23%
+        /// </example>
+        public static string Percent()
+        {
+            return (Random.NextDouble() * 100).ToString("N0") + "%";
+        }
 
         #endregion
 
@@ -176,12 +312,28 @@ namespace QuestPDF.Helpers
             Colors.BlueGrey.Lighten3
         };
         
+        /// <summary>
+        /// Returns a random bright color from the Material Design palette.
+        /// </summary>
+        /// <example>
+        /// #ffab91 <br />
+        /// #bcaaa4 <br />
+        /// #ffab91
+        /// </example>
         public static string BackgroundColor()
         {
             var index = Random.Next(0, BackgroundColors.Length);
             return BackgroundColors[index];
         }
         
+        /// <summary>
+        /// Returns a random color from the Material Design palette.
+        /// </summary>
+        /// <example>
+        /// #9e9e9e <br />
+        /// #f44336 <br />
+        /// #9c27b0
+        /// </example>
         public static string Color()
         {
             var colors = new[]
@@ -211,11 +363,25 @@ namespace QuestPDF.Helpers
             return colors[index];
         }
 
+        /// <summary>
+        /// Generates a random image with a soft color gradient with provided <paramref name="width" /> and <paramref name="height" />.
+        /// </summary>
+        /// <remarks>
+        /// Caution: using this method may significantly reduce document generation performance. Please do not use it when performing benchmarks.
+        /// </remarks>
+        /// <returns>Random image encoded in the JPEG format.</returns>
         public static byte[] Image(int width, int height)
         {
             return Image(new ImageSize(width, height));
         }
         
+        /// <summary>
+        /// Generates a random image with a soft color gradient of the given <paramref name="size" />.
+        /// </summary>
+        /// <remarks>
+        /// Caution: using this method may significantly reduce document generation performance. Please do not use it when performing benchmarks.
+        /// </remarks>
+        /// <returns>Random image encoded in the JPEG format.</returns>
         public static byte[] Image(ImageSize size)
         {
             // shuffle corner positions

+ 23 - 1
Source/QuestPDF/Infrastructure/AspectRatioOption.cs

@@ -1,9 +1,31 @@
-namespace QuestPDF.Infrastructure
+using QuestPDF.Fluent;
+
+namespace QuestPDF.Infrastructure
 {
     public enum AspectRatioOption
     {
+        /// <summary>
+        /// Adjusts content to occupy the full width available.
+        /// </summary>
+        /// <remarks>
+        /// Used as the default setting in the library.
+        /// </remarks>
         FitWidth,
+        
+        /// <summary>
+        /// Adjusts content to fill the available height.
+        /// </summary>
+        /// <remarks>
+        /// Often used with height-constraining elements such as: <see cref="ConstrainedExtensions.Height">Height</see>, <see cref="ConstrainedExtensions.MaxHeight">MaxHeight</see>, etc.
+        /// </remarks>
         FitHeight,
+        
+        /// <summary>
+        /// Adjusts content to fill the available area while maintaining its aspect ratio. This may result in the content fully occupying either the width or height, depending on its dimensions.
+        /// </summary>
+        /// <remarks>
+        /// Often used with constraining elements such as: <see cref="ConstrainedExtensions.Width">Width</see>, <see cref="ConstrainedExtensions.MaxWidth">MaxWidth</see>, <see cref="ConstrainedExtensions.Height">Height</see>, <see cref="ConstrainedExtensions.MaxHeight">MaxHeight</see>, etc.
+        /// </remarks>
         FitArea
     }
 }

+ 11 - 0
Source/QuestPDF/Infrastructure/ContentDirection.cs

@@ -2,7 +2,18 @@
 {
     public enum ContentDirection
     {
+        /// <summary>
+        /// Sets the left-to-right (LTR) content direction.
+        /// <a href="https://www.questpdf.com/api-reference/content-direction.html">Learn more</a>
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="contentDirection.ltr.remarks"]/*' />
         LeftToRight,
+        
+        /// <summary>
+        /// Sets the right-to-left (RTL) content direction.
+        /// <a href="https://www.questpdf.com/api-reference/content-direction.html">Learn more</a>
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="contentDirection.rtl.remarks"]/*' />
         RightToLeft
     }
 }

+ 4 - 0
Source/QuestPDF/Infrastructure/DocumentSettings.cs

@@ -17,6 +17,10 @@
         /// When the image contains an alpha channel, it is always encoded using the PNG format and this option is ignored.
         /// The default value is "high quality".
         /// </summary>
+
+        /// <remarks>
+        /// This setting is taken into account only when the image is in the JPG format, otherwise it is ignored.
+        /// </remarks>
         public ImageCompressionQuality ImageCompressionQuality { get; set; } = ImageCompressionQuality.High;
 
         /// <summary>

+ 1 - 1
Source/QuestPDF/Infrastructure/ICacheable.cs

@@ -1,6 +1,6 @@
 namespace QuestPDF.Infrastructure
 {
-    public interface ICacheable
+    internal interface ICacheable
     {
         
     }

+ 15 - 0
Source/QuestPDF/Infrastructure/IComponent.cs

@@ -12,8 +12,23 @@ namespace QuestPDF.Infrastructure
         
     }
     
+    /// <summary>
+    /// <para>This interface represents a reusable document fragment.</para>
+    /// <para>
+    /// Components serve as modular building blocks for abstracting document layouts. 
+    /// They promote code reusability across multiple sections or types of documents. 
+    /// Using a component, you can generate content based on its internal state.
+    /// </para>
+    /// </summary>
+    /// <example>
+    /// Consider the scenario of a company-wide page header.
+    /// Instead of replicating the same header design across various documents, a single component can be created and referenced wherever needed.
+    /// </example>
     public interface IComponent
     {
+        /// <summary>
+        /// Method invoked by the library to compose document content. 
+        /// </summary>
         void Compose(IContainer container);
     }
 }

+ 7 - 0
Source/QuestPDF/Infrastructure/IContainer.cs

@@ -1,5 +1,12 @@
 namespace QuestPDF.Infrastructure
 {
+    /// <summary>
+    /// Represents a layout structure with exactly one child element.
+    /// </summary>
+    /// <remarks>
+    /// The main purpose of this interface is to facilitate the Fluent API's construction.
+    /// It's not intended to allow external creation of new container kinds or layout designs.
+    /// </remarks>
     public interface IContainer
     {
         IElement? Child { get; set; }

+ 26 - 3
Source/QuestPDF/Infrastructure/IDocument.cs

@@ -1,17 +1,40 @@
-using QuestPDF.Drawing;
-
-namespace QuestPDF.Infrastructure
+namespace QuestPDF.Infrastructure
 {
+    /// <summary>
+    /// Represents the document abstraction, including its content, metadata, and configuration settings.
+    /// <a href="https://www.questpdf.com/getting-started.html">Learn more</a>
+    /// </summary>
+    /// <remarks>
+    /// <para>Implement this interface to centralize your entire document's structure within a single class for easy management.</para>
+    /// <para>For a different approach, consider the <a href="https://www.questpdf.com/quick-start.html">Minimal API</a> pathway.</para>
+    /// </remarks>
     public interface IDocument
     {
 #if NETCOREAPP3_0_OR_GREATER
+        /// <summary>
+        /// Provides metadata values like author and keywords used in PDF creation.
+        /// </summary>
+        /// <remarks>
+        /// Override this method to customize document's metadata.
+        /// </remarks>
         public DocumentMetadata GetMetadata() => DocumentMetadata.Default; 
+
+        /// <summary>
+        /// Provides document generation settings, such as default image DPI and compression rate.
+        /// </summary>
+        /// <remarks>
+        /// Override this to customize default configurations.
+        /// </remarks>
         public DocumentSettings GetSettings() => DocumentSettings.Default;
 #else
         DocumentMetadata GetMetadata();
         DocumentSettings GetSettings();
 #endif
         
+        /// <summary>
+        /// Configures the document content by specifying its layout structure and visual element.
+        /// </summary>
+        /// <param name="container">The document container used for defining content via the FluentAPI.</param>
         void Compose(IDocumentContainer container);
     }
 }

+ 3 - 0
Source/QuestPDF/Infrastructure/IDocumentContainer.cs

@@ -1,5 +1,8 @@
 namespace QuestPDF.Infrastructure
 {
+    /// <summary>
+    /// Represents the primary container encapsulating the entire content of the document.
+    /// </summary>
     public interface IDocumentContainer
     {
                 

+ 39 - 0
Source/QuestPDF/Infrastructure/IDynamicComponent.cs

@@ -21,15 +21,54 @@ namespace QuestPDF.Infrastructure
         }
     }
 
+    /// <summary>
+    /// Represents the output from the DynamicComponent describing what should be rendered on the current page.
+    /// </summary>
     public class DynamicComponentComposeResult
     {
+        /// <summary>
+        /// Any content created with the <see cref="DynamicContext.CreateElement" /> method that should be drawn on the currently rendered page.
+        /// </summary>
         public IElement Content { get; set; }
+        
+        /// <summary>
+        /// Set to true if the dynamic component has additional content for the next page.
+        /// Set to false if all content from the dynamic component has been rendered.
+        /// </summary>
         public bool HasMoreContent { get; set; }
     }
     
+    /// <summary>
+    /// Represents a section of the document dynamically created based on its inner state.
+    /// Components are page-aware, understand their positioning, can dynamically construct other content elements, and assess their dimensions, enabling complex layout creations.
+    /// </summary>
+    /// <remarks>
+    /// Though dynamic components offer great flexibility, be cautious of potential performance impacts.
+    /// </remarks>
+    /// <typeparam name="TState">Structure type representing the internal state of the component.</typeparam>
     public interface IDynamicComponent<TState> where TState : struct
     {
+        /// <summary>
+        /// Represents the component's current state.
+        /// </summary>
+        /// <remarks>
+        /// <para>
+        /// The state should remain read-only.
+        /// Avoid direct state modifications.
+        /// For any alterations, generate a new struct instance and reassign the State property.
+        /// </para>
+        /// <para>Remember, the QuestPDF library can invoke the Compose method more than once for each page and might adjust the state internally.</para>
+        /// </remarks>
         TState State { get; set; }
+        
+        /// <summary>
+        /// Method invoked by the library to plan and create new content for each page. 
+        /// </summary>
+        /// <remarks>
+        /// Remember, the QuestPDF library can invoke the Compose method more than once for each page and might adjust the state internally.
+        /// </remarks>
+        /// <param name="context">Context offering additional information (like current page number, entire document size) and the capability to produce dynamic content elements.</param>
+        /// <returns>Representation of content that should be placed on the current page.</returns>
         DynamicComponentComposeResult Compose(DynamicContext context);
     }
 }

+ 8 - 0
Source/QuestPDF/Infrastructure/IElement.cs

@@ -1,5 +1,13 @@
 namespace QuestPDF.Infrastructure
 {
+    /// <summary>
+    /// Represents an element within the document content, for example: <br/>
+    /// - visual elements (text, image, canvas), <br/>
+    /// - positional elements (padding, aspect ratio), <br/>
+    /// - flow-control elements (page break, conditional displays), <br/>
+    /// - layout elements (table, column), <br/>
+    /// - and other element types (section, hyperlink, content direction). 
+    /// </summary>
     public interface IElement
     {
         

+ 11 - 9
Source/QuestPDF/Infrastructure/IMergedDocument.cs

@@ -42,12 +42,13 @@ namespace QuestPDF.Infrastructure
         }
 
         /// <summary>
-        /// Each document is considered as separate in terms of page numbering.
-        /// That means, all page number related APIs will return values based on original documents.
-        /// All documents will simply be merged together.
-        /// For example: let's suppose that two documents are merged, first with 2 pages and second with 3 pages.
-        /// The resulting document will have 5 pages, and page numbers will be: 1, 2, 1, 2, 3.
+        /// Documents maintain their own page numbers upon merging, without continuity between them.
+        /// As a result, APIs related to page numbers reflect individual documents, not the cumulative count.
+        /// All documents are simply be merged together.
         /// </summary>
+        /// <example>
+        /// Merging a two-page document with a three-page document results in a sequence: 1, 2, 1, 2, 3.
+        /// </example>
         public MergedDocument UseOriginalPageNumbers()
         {
             PageNumberStrategy = MergedDocumentPageNumberStrategy.Original;
@@ -55,11 +56,12 @@ namespace QuestPDF.Infrastructure
         }
 
         /// <summary>
-        /// Content from all documents will be merged together, and considered as one/single document.
-        /// That means, all page number related APIs will return continuous numbers.
-        /// For example: let's suppose that two documents are merged, first with 2 pages and second with 3 pages.
-        /// The resulting document will have 5 pages, and page numbers will be: 1, 2, 3, 4, 5.
+        /// Consolidates the content from every document, creating a continuous seamless one.
+        /// Page number APIs return a consecutive numbering for this unified document.
         /// </summary>
+        /// <example>
+        /// Merging a two-page document with a three-page document results in a sequence: 1, 2, 3, 4, 5.
+        /// </example>
         public MergedDocument UseContinuousPageNumbers()
         {
             PageNumberStrategy = MergedDocumentPageNumberStrategy.Continuous;

+ 1 - 1
Source/QuestPDF/Infrastructure/IRenderingCanvas.cs

@@ -1,6 +1,6 @@
 namespace QuestPDF.Infrastructure
 {
-    public interface IRenderingCanvas
+    internal interface IRenderingCanvas
     {
         void BeginDocument();
         void EndDocument();

+ 24 - 0
Source/QuestPDF/Infrastructure/Image.cs

@@ -14,6 +14,15 @@ namespace QuestPDF.Infrastructure
         internal ImageCompressionQuality CompressionQuality { get; set; }
     }
     
+    /// <summary>
+    /// <para>Caches the image in local memory for efficient reuse.</para>
+    /// <para>Optimizes the generation process, especially:</para>
+    /// <para>- For images repeated in a single document to enhance performance and reduce output file size (e.g., an image used as list bullet icon).</para>
+    /// <para>- When an image appears on multiple document types for increased generation performance (e.g., a company logo).</para>
+    /// </summary>
+    /// <remarks>
+    /// This class is thread safe.
+    /// </remarks>
     public class Image
     {
         internal SKImage SkImage { get; }
@@ -61,6 +70,11 @@ namespace QuestPDF.Infrastructure
             return new Image(image);
         }
 
+        /// <summary>
+        /// Loads the image from binary data.
+        /// <a href="https://www.questpdf.com/api-reference/image.html">Learn more</a>
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="image.remarks"]/*' />
         public static Image FromBinaryData(byte[] imageData)
         {
             var image = SKImage.FromEncodedData(imageData);
@@ -71,6 +85,11 @@ namespace QuestPDF.Infrastructure
             return new Image(image);
         }
 
+        /// <summary>
+        /// Loads the image from a file with specified path.
+        /// <a href="https://www.questpdf.com/api-reference/image.html">Learn more</a>
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="image.remarks"]/*' />
         public static Image FromFile(string filePath)
         {
             var image = SKImage.FromEncodedData(filePath);
@@ -85,6 +104,11 @@ namespace QuestPDF.Infrastructure
             return new Image(image);
         }
 
+        /// <summary>
+        /// Loads the image from a stream.
+        /// <a href="https://www.questpdf.com/api-reference/image.html">Learn more</a>
+        /// </summary>
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="image.remarks"]/*' />
         public static Image FromStream(Stream fileStream)
         {
             var image = SKImage.FromEncodedData(fileStream);

+ 6 - 6
Source/QuestPDF/Infrastructure/ImageCompressionQuality.cs

@@ -3,32 +3,32 @@
     public enum ImageCompressionQuality
     {
         /// <summary>
-        /// JPEG format with compression set to 100 out of 100
+        /// JPEG format with target quality set to 100 out of 100
         /// </summary>
         Best,
 
         /// <summary>
-        /// JPEG format with compression set to 90 out of 100
+        /// JPEG format with target quality set to 90 out of 100
         /// </summary>
         VeryHigh,
 
         /// <summary>
-        /// JPEG format with compression set to 75 out of 100
+        /// JPEG format with target quality set to 75 out of 100
         /// </summary>
         High,
 
         /// <summary>
-        /// JPEG format with compression set to 50 out of 100
+        /// JPEG format with target quality set to 50 out of 100
         /// </summary>
         Medium,
 
         /// <summary>
-        /// JPEG format with compression set to 25 out of 100
+        /// JPEG format with target quality set to 25 out of 100
         /// </summary>
         Low,
 
         /// <summary>
-        /// JPEG format with compression set to 10 out of 100
+        /// JPEG format with target quality set to 10 out of 100
         /// </summary>
         VeryLow
     }

+ 5 - 1
Source/QuestPDF/Infrastructure/ImageGenerationSettings.cs

@@ -11,14 +11,18 @@ namespace QuestPDF.Infrastructure
 
         /// <summary>
         /// Encoding quality controls the trade-off between size and quality.
-        /// The default value is "high quality".
+        /// The default value is "high".
         /// </summary>
         public ImageCompressionQuality ImageCompressionQuality { get; set; } = ImageCompressionQuality.High;
 
         /// <summary>
         /// The DPI (pixels-per-inch) at which the document will be rasterized. This parameter controls the resolution of produced images.
+        /// Higher DPI results in superior image quality but may increase the output file size.
         /// Default value is 288.
         /// </summary>
+        /// <example>
+        /// Consider a document of dimensions 3x4 inches. Using a DPI value of 300, the final image resolution translates to 900x1200 pixels.
+        /// </example>
         public int RasterDpi { get; set; } = DocumentSettings.DefaultRasterDpi * 4;
 
 

+ 8 - 4
Source/QuestPDF/Infrastructure/LicenseType.cs

@@ -1,22 +1,26 @@
 namespace QuestPDF.Infrastructure
 {
     /// <summary>
-    /// QuestPDF License and Pricing details webpage: http://www.questpdf.com/pricing.html
+    /// The QuestPDF library is available under a hybrid license favorable to both community and business users.
+    /// For a comprehensive overview, please visit the <a href="https://www.questpdf.com/license/">License and Pricing details webpage</a>.
     /// </summary>
     public enum LicenseType
     {
         /// <summary>
-        /// License link: https://www.questpdf.com/license-community.html
+        /// The QuestPDF Community MIT License is applicable mainly for companies and individuals with less than $1M USD annual gross revenue.
+        /// <a href="https://www.questpdf.com/license/summary/community.html">Learn more</a>
         /// </summary>
         Community,
         
         /// <summary>
-        /// License link: https://www.questpdf.com/license-commercial.html
+        /// The QuestPDF Professional License is applicable for individuals and companies with at most 10 software developers.
+        /// <a href="https://www.questpdf.com/license/summary/professional.html">Learn more</a>
         /// </summary>
         Professional,
         
         /// <summary>
-        /// License link: https://www.questpdf.com/license-commercial.html
+        /// The QuestPDF Enterprise License is applicable for individuals and companies with any number of software developers.
+        /// <a href="https://www.questpdf.com/license/summary/enterprise.html">Learn more</a>
         /// </summary>
         Enterprise
     }

+ 8 - 3
Source/QuestPDF/Infrastructure/Unit.cs

@@ -5,9 +5,14 @@ namespace QuestPDF.Infrastructure
 {
     public enum Unit
     {
+        /// <summary>
+        /// Point is a standard unit for all PDF documents.
+        /// 72 points equal 1 inch
+        /// </summary>
         Point,
-        
+            
         Meter,
+            
         Centimetre,
         Millimetre,
         
@@ -17,7 +22,7 @@ namespace QuestPDF.Infrastructure
         /// <summary>
         /// 1/1000th of inch
         /// </summary>
-        Mill
+        Mil
     }
 
     internal static class UnitExtensions
@@ -39,7 +44,7 @@ namespace QuestPDF.Infrastructure
                     Millimetre => 0.1f / InchToCentimetre * InchToPoints,
                     Feet => 12 * InchToPoints,
                     Inch => InchToPoints,
-                    Mill => InchToPoints / 1000f,
+                    Mil => InchToPoints / 1000f,
                     _ => throw new ArgumentOutOfRangeException(nameof(unit), unit, null)
                 };
             }

+ 2 - 2
Source/QuestPDF/Previewer/ExceptionDocument.cs

@@ -7,7 +7,7 @@ using SkiaSharp;
 
 namespace QuestPDF.Previewer
 {
-    public class ExceptionDocument : IDocument
+    internal class ExceptionDocument : IDocument
     {
         private Exception Exception { get; }
     
@@ -66,7 +66,7 @@ namespace QuestPDF.Previewer
                             .Column(column =>
                             {
                                 column.Item().Text("Exception").FontSize(36).FontColor(Colors.Red.Medium).Bold();
-                                column.Item().PaddingTop(-10).Text("Don't panic! Just analyze what's happened...").FontSize(18).FontColor(Colors.Red.Medium).Bold();
+                                column.Item().PaddingTop(-10).Text("Please refer to the details for further insight and troubleshooting.").FontSize(18).FontColor(Colors.Red.Medium).Bold();
                             }); 
                     });
 

+ 1 - 1
Source/QuestPDF/Previewer/HotReloadManager.cs

@@ -7,7 +7,7 @@ using System;
 namespace QuestPDF.Previewer
 {
     /// <summary>
-    /// Helper for subscribing to hot reload notifications.
+    /// Helper to subscribe to hot reload notifications.
     /// </summary>
     internal static class HotReloadManager
     {

+ 21 - 3
Source/QuestPDF/Previewer/PreviewerExtensions.cs

@@ -1,4 +1,4 @@
-#if NET6_0_OR_GREATER
+
 
 using System;
 using System.Collections.Generic;
@@ -11,11 +11,15 @@ namespace QuestPDF.Previewer
 {
     public static class Extensions
     {
+        #if NET6_0_OR_GREATER
+        
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="previewer.supported"]/*' />
         public static void ShowInPreviewer(this IDocument document, int port = 12500)
         {
             document.ShowInPreviewerAsync(port).ConfigureAwait(true).GetAwaiter().GetResult();
         }
         
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="previewer.supported"]/*' />
         public static async Task ShowInPreviewerAsync(this IDocument document, int port = 12500)
         {
             var previewerService = new PreviewerService(port);
@@ -60,7 +64,21 @@ namespace QuestPDF.Previewer
                 }
             }
         }
+        
+        #else
+
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="previewer.notSupported"]/*' />
+        public static void ShowInPreviewer(this IDocument document, int port = 12500)
+        {
+            throw new Exception("The hot-reload feature requires .NET 6 or later.");
+        }
+
+        /// <include file='../Resources/Documentation.xml' path='documentation/doc[@for="previewer.notSupported"]/*' />
+        public static async Task ShowInPreviewerAsync(this IDocument document, int port = 12500)
+        {
+            throw new Exception("The hot-reload feature requires .NET 6 or later.");
+        }
+
+        #endif
     }
 }
-
-#endif

+ 410 - 0
Source/QuestPDF/Resources/Documentation.xml

@@ -0,0 +1,410 @@
+<documentation>
+    <!-- SHARED -->
+    
+    <doc for="colorParam">
+        <param name="color">Color in a <a href="https://www.questpdf.com/concepts/colors.html">valid format</a> (like <c>#FF8800</c> for orange) or from the predefined <see cref="Colors"/> set (like <c>Colors.Red.Lighten1</c>).</param>
+    </doc>
+
+    <doc for="param.sectionName">
+        <param name="sectionName">The text key corresponding to the value used when defining the <see cref="ElementExtensions.Section">Section</see> element.</param>
+    </doc>
+
+    <doc for="param.url">
+        <param name="url">The URL of the webpage to which the user will be redirected.</param>
+    </doc>
+    
+    <!-- SCALE -->
+    
+    <doc for="scale.remarks">
+        <remarks>
+            <para>Although this adjustment modifies the space available to its inner content, some elements might use their own strategies to fill that space.</para>
+            <para>For example, an Image with the <see cref="Infrastructure.ImageScaling.FitWidth" /> setting may retain its size, but its quality could vary based on the DPI setting.</para>
+            <para>In contrast, text will not only appear smaller or bigger; but also a different number of words may fit each line.</para>
+        </remarks>
+    </doc>
+    
+    <doc for="scale.factorParam">
+        <param name="factor">The scaling factor. Values greater than one enlarge the content, while values less than one reduce it.</param>
+    </doc>
+
+    <!-- IMAGE -->
+    
+    <doc for="image.remarks">
+        <remarks>
+            <para>
+                Please note that there is a significant difference between image resolution (number of pixels vertically and horizontally) and its physical size described in points.
+                Therefore, the resolution of an image is not used for determining its physical size on the document.
+            </para>
+
+            <para>
+                Multiple strategies exist for the Image element to determine its final size. 
+                By default, the image fills all the available width. 
+                This behavior can be customized using options within the <see cref="Fluent.ImageDescriptor">descriptor</see> class.
+            </para>
+            
+            <para>
+                Images are automatically resized and compressed based on the descriptor's setup.
+                It defaults to <see cref="DocumentSettings">global document's settings</see>.
+            </para>
+            
+            <para>Supported formats: PNG, JPEG and WEBP.</para>
+        </remarks>
+    </doc>
+
+    <doc for="image.useOriginalImage">
+        <summary>
+            When enabled, the library does not resize the image to achieve the target DPI, nor compress it with target image quality.
+        </summary>
+    </doc>
+    
+    <doc for="image.rasterDPI">
+        <summary>
+            <para>Specifies the DPI (dots-per-inch) for rasterizing images.</para>
+            <para>The target resolution is computed by multiplying the DPI with the physical image size on the document.</para>
+            <para>Higher DPI results in superior image quality but may increase the output file size.</para>
+            <para>Default DPI value is 288 DPI.</para>
+        </summary>
+        
+        <remarks>
+            If the image has lower resolution that the one calculated from the DPI setting, it will NOT be rescaled.
+        </remarks>
+        
+        <example>
+            Consider an image of dimensions 3x4 inches. Using a DPI value of 300, the final resolution translates to 900x1200 pixels.
+        </example>
+    </doc>
+
+    <doc for="image.compressionQuality">
+        <summary>
+            <para>Controls the balance between encoding quality and file size.</para>
+            <para>Opaque images are JPEG-encoded based on this setting, while images with an alpha channel default to PNG format, disregarding this option.</para>
+            <para>Default is set to "high quality".</para>
+        </summary>
+    </doc>
+
+    <doc for="image.descriptor">
+        <returns>Descriptor allowing adjustments to image attributes, such as scaling behavior, compression quality, and target DPI.</returns>
+    </doc>
+
+    <!-- CONTENT DIRECTION -->
+    
+    <doc for="contentDirection.ltr.remarks">
+        <remarks>
+            <para>This writing system is used by most of modern languages.</para>
+            
+            <para>
+                The content direction affects various layout structures. In LTR mode, items are typically aligned to the left.
+                This mode also influences the direction of items in certain layouts. For instance, in a row element with LTR mode,
+                the first item is positioned on the left, while the last item is on the right.
+            </para>
+        </remarks>
+    </doc>
+
+    <doc for="contentDirection.rtl.remarks">
+        <remarks>
+            <para>This writing system is used by languages such as Hebrew, Arabic, and Persian.</para>
+            
+            <para>
+                The content direction affects various layout structures. In RTL mode, items are typically aligned to the right.
+                This mode also influences the direction of items in certain layouts. For instance, in a row element with RTL mode,
+                the first item is positioned on the right, while the last item is on the left.
+            </para>
+        </remarks>
+    </doc>
+    
+    <!-- TEXT ELEMENT -->
+
+    <doc for="text.returns.spanDescriptor">
+        <returns>Handler for adjusting the appearance of the text span, including attributes like color, size, and background.</returns>
+    </doc>
+
+    <doc for="text.returns.pageNumberDescriptor">
+        <returns>
+            <para>Handler for adjusting the appearance of the text span, including attributes like color, size, and background.</para>
+            <para>Additionally, it provides formatting options, like displaying the page number in custom text format (e.g. Roman numerals).</para>
+        </returns>
+    </doc>
+    
+    <!-- TEXT ATTRIBUTES -->
+
+    <doc for="text.fontColor">
+        <summary>
+            Sets the font color.
+        </summary>
+    </doc>
+
+    <doc for="text.backgroundColor">
+        <summary>
+            Sets a solid background color for the text.
+        </summary>
+    </doc>
+    
+    <doc for="text.fontFamily">
+        <summary>
+            <para>Sets the font family of the text.</para>
+        </summary>
+        
+        <remarks>
+            <para>By default, the library searches all fonts available in the runtime environment.</para>
+            <para>This may work well on the development environment but may fail in the cloud where fonts are usually not installed.</para>
+            <para>It is safest deploy font files along with the application and then register them using the <see cref="Drawing.FontManager">FontManager</see> class.</para>
+        </remarks>
+        
+        <param name="value">Actual font family (e.g. "Times New Roman", "Calibri", "Lato") or custom identifier used when invoking the <see cref="Drawing.FontManager.RegisterFontWithCustomName">FontManager</see> method.</param>
+    </doc>
+    
+    <doc for="text.fontSize">
+        <summary>
+            Sets font size for the text.
+        </summary>
+
+        <remarks>
+            The visual size of the text is determined by its font size. 
+            However, it's worth noting that different fonts may render text with distinct visual sizes, even when assigned the same numerical font size.
+        </remarks>
+    </doc>
+
+    <doc for="text.wrapAnywhere">
+        <summary>
+            Allows text to wrap at any character, not just spaces.
+        </summary>
+    </doc>
+    
+    <doc for="text.lineHeight">
+        <summary>
+            Adjusts the vertical spacing between text lines.
+            The added space is proportional to the text size. 
+            A <paramref name="factor"/> value of 1 retains the original spacing.
+            <a href="https://www.questpdf.com/api-reference/text.html#line-height">Learn more</a>
+        </summary>
+
+        <param name="factor">
+            <para>Sets the proportion of vertical spacing relative to the original.</para> 
+            <para>A value greater than 1 increases spacing, while a value less than 1 reduces it. Must be greater than 0.</para>
+        </param>
+    </doc>
+
+    <doc for="text.letterSpacing">
+        <summary>
+            Adjusts the horizontal spacing between characters in the text.
+            The adjustment is proportional to the text size, where a <paramref name="factor"/> value of 1 maintains the original spacing.
+            <a href="https://www.questpdf.com/api-reference/text.html#letter-spacing">Learn more</a>
+        </summary>
+
+        <param name="factor">
+            <para>Sets the proportion by which the horizontal space between characters is changed.</para>
+            <para>A factor greater than 1 spreads characters further apart, while a factor less than 1 (but more than 0) brings them closer together.</para> 
+            <para>Must be greater than 0.</para>
+        </param>
+    </doc>
+    
+    <!-- TEXT EFFECTS -->
+
+    <doc for="text.italic">
+        <summary>
+            Draws text with a italic effect, where letters are slightly slanted to the right.
+        </summary>
+    </doc>
+
+    <doc for="text.strikethrough">
+        <summary>
+            Draws a simple solid line through the middle of the text.
+        </summary>
+    </doc>
+
+    <doc for="text.underline">
+        <summary>
+            Draws a simple solid line under the text.
+        </summary>
+    </doc>
+    
+    <!-- TEXT WEIGHT -->
+    
+    <doc for="text.weight.thin">
+        <summary>
+            Sets the font weight to "thin" (equivalent to CSS 100).
+            <a href="https://www.questpdf.com/api-reference/text.html#font-weight">Learn more</a>
+        </summary>
+    </doc>
+
+    <doc for="text.weight.extraLight">
+        <summary>
+            Sets the font weight to "extra light" (equivalent to CSS 200).
+            <a href="https://www.questpdf.com/api-reference/text.html#font-weight">Learn more</a>
+        </summary>
+    </doc>
+
+    <doc for="text.weight.light">
+        <summary>
+            Sets the font weight to "light" (equivalent to CSS 300).
+            <a href="https://www.questpdf.com/api-reference/text.html#font-weight">Learn more</a>
+        </summary>
+    </doc>
+
+    <doc for="text.weight.normal">
+        <summary>
+            Sets the font weight to "normal" or "regular (equivalent to CSS 400).
+            <a href="https://www.questpdf.com/api-reference/text.html#font-weight">Learn more</a>
+        </summary>
+    </doc>
+
+    <doc for="text.weight.medium">
+        <summary>
+            Sets the font weight to "medium" (equivalent to CSS 500).
+            <a href="https://www.questpdf.com/api-reference/text.html#font-weight">Learn more</a>
+        </summary>
+    </doc>
+
+    <doc for="text.weight.semiBold">
+        <summary>
+            Sets the font weight to "semi bold" (equivalent to CSS 600).
+            <a href="https://www.questpdf.com/api-reference/text.html#font-weight">Learn more</a>
+        </summary>
+    </doc>
+
+    <doc for="text.weight.bold">
+        <summary>
+            Sets the font weight to "bold" (equivalent to CSS 700).
+            <a href="https://www.questpdf.com/api-reference/text.html#font-weight">Learn more</a>
+        </summary>
+    </doc>
+
+    <doc for="text.weight.extraBold">
+        <summary>
+            Sets the font weight to "extra bold" (equivalent to CSS 800).
+            <a href="https://www.questpdf.com/api-reference/text.html#font-weight">Learn more</a>
+        </summary>
+    </doc>
+
+    <doc for="text.weight.black">
+        <summary>
+            Sets the font weight to "black" (equivalent to CSS 900).
+            <a href="https://www.questpdf.com/api-reference/text.html#font-weight">Learn more</a>
+        </summary>
+    </doc>
+
+    <doc for="text.weight.extraBlack">
+        <summary>
+            Sets the font weight to "extra black" (equivalent to CSS 1000).
+            <a href="https://www.questpdf.com/api-reference/text.html#font-weight">Learn more</a>
+        </summary>
+    </doc>
+
+    <doc for="text.weight.remarks">
+        <remarks>
+            Not all fonts support every weight. 
+            If the specified weight isn't available, the library selects the closest available option.
+        </remarks>
+    </doc>
+    
+    <!-- TEXT POSITION -->
+    
+    <doc for="text.position.normal">
+        <summary>
+            Resets the text position and size to default, utilizing the full available line height.
+            <a href="https://www.questpdf.com/api-reference/text.html#subscript-and-superscript">Learn more</a>
+        </summary>
+    </doc>
+
+    <doc for="text.position.subscript">
+        <summary>
+            Sets the text style to subscript, making it smaller and positioning it below the baseline, e.g.: H₂0
+            <a href="https://www.questpdf.com/api-reference/text.html#subscript-and-superscript">Learn more</a>
+        </summary>
+    </doc>
+
+    <doc for="text.position.superscript">
+        <summary>
+            Sets the text style to subscript, making it smaller and positioning it above the baseline, e.g.: y² + x² = 1.
+            <a href="https://www.questpdf.com/api-reference/text.html#subscript-and-superscript">Learn more</a>
+        </summary>
+    </doc>
+    
+    <!-- TEXT DIRECTION -->
+
+    <doc for="text.direction.auto">
+        <summary>
+            Resets the text direction, enabling content to follow the automatically detected direction.
+            <a href="https://www.questpdf.com/api-reference/text.html#forcing-text-direction-rtl">Learn more</a>
+        </summary>
+    </doc>
+
+    <doc for="text.direction.ltr">
+        <summary>
+            Enforces a left-to-right text direction.
+            <a href="https://www.questpdf.com/api-reference/text.html#forcing-text-direction-rtl">Learn more</a>
+        </summary>
+    </doc>
+
+    <doc for="text.direction.rtl">
+        <summary>
+            Enforces a right-to-left text direction.
+            <a href="https://www.questpdf.com/api-reference/text.html#forcing-text-direction-rtl">Learn more</a>
+        </summary>
+    </doc>
+    
+    <!-- TEXT OTHERS -->
+    <doc for="text.style">
+        <summary>
+            Sets a font style using the typography pattern.
+            <a href="https://www.questpdf.com/api-reference/text.html#typography-pattern">Learn more</a>
+        </summary>
+        
+        <remarks>
+            This API reduces the garbage collector pressure and offers the best performance.
+        </remarks>
+    </doc>
+
+    <doc for="text.fontFallback">
+        <summary>
+            Specifies an alternative text style to be used when the primary font family does not support certain character glyphs.
+            <a href="https://www.questpdf.com/api-reference/text.html#font-fallback">Learn more</a>
+        </summary>
+        
+        <remarks>
+            The library supports nested font fallbacks, ensuring a series of alternative fonts. 
+            Individual properties can be adjusted for each level of fallback.
+        </remarks>
+    </doc>
+
+    <!-- PREVIEWER -->
+
+    <doc for="previewer.support">
+        <summary>
+            Connects to the QuestPDF Previewer application to automatically preview the document being currently implemented after every code modification,
+            without the need to recompile the code or restart the application.
+            <a href="https://www.questpdf.com/document-previewer.html">Learn more</a>
+        </summary>
+        
+        <remarks>
+            For details on the hot-reload functionality, please refer to the documentation of your preferred IDE.
+        </remarks>
+        
+        <param name="port">Specifies port for communication with the QuestPDF Previewer application. Default value is 12500.</param>
+    </doc>
+
+    <doc for="previewer.notSupported">
+        <summary>
+            The hot-reload feature and QuestPDF Previewer integration are available only in the .NET 6 environment or later.
+            Please consider updating your project.
+            <a href="https://www.questpdf.com/document-previewer.html">Learn more</a>
+        </summary>
+        
+        <param name="port">This parameter is ignored.</param>
+    </doc>
+    
+    <!-- COMPONENTS -->
+
+    <doc for="component">
+        <summary>
+            Components serve as modular building blocks for abstracting document layouts. 
+            They promote code reusability across multiple sections or types of documents. 
+            Using a component, you can generate content based on its internal state.
+            <a href="https://www.questpdf.com/concepts/components.html">Learn more</a>
+        </summary>
+        <example>
+            Consider the scenario of a company-wide page header. 
+            Instead of replicating the same header design across various documents, a single component can be created and referenced wherever needed.
+        </example>
+    </doc>
+</documentation>

+ 1 - 1
Source/QuestPDF/Settings.cs

@@ -6,7 +6,7 @@ namespace QuestPDF
     {
         /// <summary>
         /// <para>Please kindly select license type that applies to your usage of the QuestPDF library.</para>
-        /// <para>For more details, please check the QuestPDF License and Pricing webpage: https://www.questpdf.com/pricing.html</para>
+        /// <para>For more details, please check the <a href="https://www.questpdf.com/pricing.html">QuestPDF License and Pricing webpage</a></para>
         /// </summary>
         public static LicenseType? License { get; set; }