This is a paragraph.
");
+ });
+ });
+ });
+}).GeneratePdf("output.pdf");
+```
+
+### Handling Images
+
+By default, images are downloaded using `WebClient`. For better performance and async support, override the image receiving function:
+
+```csharp
+using System.Net.Http;
+using System.Threading.Tasks;
+
+// Define a custom image loader
+private static async Task GetImgBySrc(string src)
+{
+ using var client = new HttpClient();
+ try
+ {
+ var response = await client.GetAsync(src);
+ if (response.IsSuccessStatusCode)
+ {
+ return await response.Content.ReadAsByteArrayAsync();
+ }
+ }
+ catch
+ {
+ // Handle errors
+ }
+ return null;
+}
+
+// Use in HTML handler
+col.Item().HTML(handler =>
+{
+ handler.OverloadImgReceivingFunc(src => Task.Run(() => GetImgBySrc(src)).Result);
+ handler.SetHtml(htmlWithImages);
+});
+```
+
+## Customizing Styles
+
+### Text Styles
+
+Customize text appearance for specific HTML elements:
+
+```csharp
+handler.SetTextStyleForHtmlElement("h1", TextStyle.Default.FontSize(32).Bold().FontColor(Colors.Blue.Medium));
+handler.SetTextStyleForHtmlElement("p", TextStyle.Default.FontSize(12).LineHeight(1.5f));
+handler.SetTextStyleForHtmlElement("strong", TextStyle.Default.Bold());
+```
+
+### Container Styles
+
+Apply layout styles to container elements:
+
+```csharp
+handler.SetContainerStyleForHtmlElement("div", c => c.Padding(10).Background(Colors.Grey.Lighten3));
+handler.SetContainerStyleForHtmlElement("ul", c => c.PaddingLeft(20));
+handler.SetContainerStyleForHtmlElement("table", c => c.Border(1).BorderColor(Colors.Black));
+```
+
+### List Vertical Padding
+
+Set padding between list items (does not apply to nested lists):
+
+```csharp
+handler.SetListVerticalPadding(15); // Default is 0
+```
+
+## Supported HTML Elements
+
+### Block Elements
+- `p`, `div`, `h1`-`h6`: Paragraphs and headings
+- `ul`, `ol`, `li`: Lists (unordered and ordered)
+- `table`, `tr`, `td`, `th`: Tables
+- `br`: Line breaks
+
+### Inline Elements
+- `b`, `strong`: Bold text
+- `i`, `em`: Italic text
+- `u`: Underlined text
+- `strike`, `del`, `s`: Strikethrough text
+- `small`: Smaller text
+- `sup`, `sub`: Superscript and subscript
+- `a`: Links (rendered as underlined text)
+- `img`: Images
+
+### Notes on Support
+- CSS classes and IDs are ignored; styling is based on tag names only.
+- Complex layouts (flexbox, grid) are not supported.
+- `pre` and `code` elements do not preserve whitespace or use monospace fonts.
+- `hr` elements are not rendered.
+- Form elements (`input`, `button`, etc.) are ignored.
+- JavaScript and CSS are stripped during parsing.
+
+## Examples
+
+### Complete Example with Styling
+
+```csharp
+using QuestPDF.Fluent;
+using QuestPDF.Helpers;
+using QuestPDF.Infrastructure;
+using HTMLToQPDF.Components;
+
+string html = @"
+My Document
+This is a bold paragraph with a link.
+
+ - Item 1
+ - Item 2
+
+ - Subitem 1
+ - Subitem 2
+
+
+
+
+ | Name | Age |
+ | John | 30 |
+ | Jane | 25 |
+
+";
+
+Document.Create(container =>
+{
+ container.Page(page =>
+ {
+ page.Size(PageSizes.A4);
+ page.Margin(2, Unit.Centimetre);
+ page.Content().Column(col =>
+ {
+ col.Item().HTML(handler =>
+ {
+ handler.SetHtml(html);
+ handler.SetTextStyleForHtmlElement("h1", TextStyle.Default.FontSize(24).Bold());
+ handler.SetContainerStyleForHtmlElement("table", c => c.Border(1));
+ handler.SetListVerticalPadding(10);
+ });
+ });
+ });
+}).GeneratePdf("styled_output.pdf");
+```
+
+### Using with WPF or Other Frameworks
+
+The library integrates seamlessly with QuestPDF. For WPF applications, ensure you handle threading appropriately for PDF generation.
+
+## Limitations
+
+- No full CSS support; only basic tag-based styling.
+- Images must be loaded synchronously or handled via custom functions.
+- Complex HTML structures may not render perfectly.
+- No support for interactive elements or JavaScript.
+- Whitespace in `pre` blocks is not preserved.
+
+## Contributing
+
+If you find missing features or bugs, feel free to contribute or report issues on the GitHub repository.
+
+## License
+
+This library is open-source. Check the LICENSE file for details.