Browse Source

Minor documentation fixes

Marcin Ziąbek 2 years ago
parent
commit
f8659c3b32

+ 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);

+ 1 - 1
Source/QuestPDF/Fluent/ContentDirectionExtensions.cs

@@ -24,7 +24,7 @@ namespace QuestPDF.Fluent
         }
         
         /// <summary>
-        /// Sets the left-to-right (LTR) direction for its entire content.
+        /// 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"]/*' />

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

@@ -188,7 +188,7 @@ namespace QuestPDF.Fluent
         }
 
         /// <summary>
-        /// Inserts a break that pushes the inner content to start on a new page.
+        /// 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)
@@ -303,7 +303,7 @@ namespace QuestPDF.Fluent
         
         /// <summary>
         /// Renders its content in the most compact size achievable. 
-        /// Ideal for situations where the parent element provides more than necessary.
+        /// 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>
@@ -323,6 +323,7 @@ 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.
@@ -338,6 +339,7 @@ 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.

+ 3 - 3
Source/QuestPDF/Fluent/ExtendExtensions.cs

@@ -15,7 +15,7 @@ namespace QuestPDF.Fluent
         }
         
         /// <summary>
-        /// Forces its content to occupy the full available space, maximizing both width and height.
+        /// 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)
@@ -24,7 +24,7 @@ namespace QuestPDF.Fluent
         }
         
         /// <summary>
-        /// Forces its content to occupy the full available vertical space, maximizing height usage.
+        /// 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)
@@ -33,7 +33,7 @@ namespace QuestPDF.Fluent
         }
         
         /// <summary>
-        /// Expands its content to occupy the full available horizontal space, maximizing width usage.
+        /// 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)

+ 1 - 1
Source/QuestPDF/Fluent/GenerateExtensions.cs

@@ -102,7 +102,7 @@ namespace QuestPDF.Fluent
         /// <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 output images, such as resolution, compression ratio, and more.</param>
+        /// <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;

+ 3 - 3
Source/QuestPDF/Fluent/PageExtensions.cs

@@ -148,7 +148,7 @@ namespace QuestPDF.Fluent
         }
         
         /// <summary>
-        /// Applies a default text style to all &lt;see cref="TextExtensions.Text"&gt;Text&lt;/see&gt; elements within the page set.
+        /// 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.
@@ -170,7 +170,7 @@ namespace QuestPDF.Fluent
         }
         
         /// <summary>
-        /// Applies a left-to-right (LTR) content direction to all elements within the page set.
+        /// 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"]/*' />
@@ -277,7 +277,7 @@ namespace QuestPDF.Fluent
         /// 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.
+        /// 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>

+ 4 - 4
Source/QuestPDF/Fluent/RowExtensions.cs

@@ -67,9 +67,9 @@ namespace QuestPDF.Fluent
         /// Adds a new item to the row element. The size of this item adjusts based on its content.
         /// </summary>
         /// <remarks>
-        /// The AutoItem requests as much horizontal space as its content requires.
-        /// It doesn't adjust its size based on other items and may frequently result in a <see cref="DocumentLayoutException" />.
-        /// It's recommended to use this API in conjunction with the <c>MaxWidth</c> element.
+        /// <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()
@@ -88,7 +88,7 @@ namespace QuestPDF.Fluent
         /// </summary>
         /// <remarks>
         /// <para>Supports paging.</para>
-        /// <para>Depending on its content, the Row element may repeatedly draw certain items across multiple pages. Use the ShowOnce element to modify this behavior if it's not desired.</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)

+ 2 - 2
Source/QuestPDF/Helpers/Placeholders.cs

@@ -104,7 +104,7 @@ namespace QuestPDF.Helpers
         }
 
         /// <summary>
-        /// Generates random text ideal for single sentences, like product descriptions.
+        /// Generates random text ideal for single sentences, like product description.
         /// </summary>
         /// <example>
         /// Vero a id optio consequuntur dignissimos repellendus provident blanditiis.
@@ -126,7 +126,7 @@ namespace QuestPDF.Helpers
         }
 
         /// <summary>
-        /// Generates random text suited for paragraphs, like detailed product descriptions.
+        /// Generates random text suited for paragraphs, like detailed product description.
         /// </summary>
         public static string Paragraph()
         {

+ 3 - 3
Source/QuestPDF/Resources/Documentation.xml

@@ -24,7 +24,7 @@
     </doc>
     
     <doc for="scale.factorParam">
-        <param name="factor">The scaling factor. Values greater than 1 enlarge the content, while values less than 1 reduce it.</param>
+        <param name="factor">The scaling factor. Values greater than one enlarge the content, while values less than one reduce it.</param>
     </doc>
 
     <!-- IMAGE -->
@@ -308,14 +308,14 @@
 
     <doc for="text.position.subscript">
         <summary>
-            Sets the text style to subscript, making it smaller and positioning it below the baseline.
+            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.
+            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>