Browse Source

Adjustments

Marcin Ziąbek 2 years ago
parent
commit
21d1332b68

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

@@ -217,7 +217,7 @@ namespace QuestPDF.Fluent
         /// 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>
-        /// <param name="url">The URL of the webpage to which the user will be redirected.</param>
+        /// <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
@@ -260,7 +260,7 @@ namespace QuestPDF.Fluent
         /// 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>
-        /// <param name="sectionName">The text key corresponding to the value used when defining the <see cref="ElementExtensions.Section">Section</see> element.</param>
+        /// <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

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

@@ -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();
                             }); 
                     });
 

+ 16 - 8
Source/QuestPDF/Resources/Documentation.xml

@@ -1,8 +1,20 @@
 <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>
@@ -15,6 +27,8 @@
         <param name="factor">The scaling factor. Values greater than 1 enlarge the content, while values less than 1 reduce it.</param>
     </doc>
 
+    <!-- IMAGE -->
+    
     <doc for="image.remarks">
         <remarks>
             <para>
@@ -72,6 +86,8 @@
         <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>
@@ -108,14 +124,6 @@
             <para>Additionally, it provides formatting options, like displaying the page number in custom text format (e.g. Roman numerals).</para>
         </returns>
     </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>
     
     <!-- TEXT ATTRIBUTES -->