HTML-Renderer
HTML-Renderer copied to clipboard
Cross framework (WinForms/WPF/PDF/Metro/Mono/etc.), Multipurpose (UI Controls / Image generation / PDF generation / etc.), 100% managed (C#), High performance HTML Rendering library.
I am rendering a very simple invoice and it is cutting off HTML in the middle of the page when I set page top and bottom margins. When the margin...
This is the first run  This is the second  My command: TheArtOfDev.HtmlRenderer.PdfSharp.PdfGenerator.GeneratePdf("* { line-height:3!important; }asd aaaaaaaaaasda aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaasdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd", config); Thanks for the help
I got an 'System.InvalidOperationException' and message 'Cannot save a PDF document with no pages.'
I generate a PdfDocument with ```TheArtOfDev.HtmlRenderer.PdfSharp.PdfGenerator.GeneratePdf(html, PdfSharp.PageSize.Letter)```, and the html has contents, but the PdfDocument is empty and cause a 'System.InvalidOperationException' when i save the document by ```pdf.Save(memoryStream)```
Can you tell me how to support Chinese ? ` var htmlStr = " Support Chinese,支持中文 PDF. "; PdfDocument pdf = PdfGenerator.GeneratePdf(htmlStr, PageSize.A4); pdf.save("zh.pdf"); `
The line https://github.com/ArthurHub/HTML-Renderer/blob/master/Source/HtmlRenderer.WPF/Adapters/FontFamilyAdapter.cs#L57 throws sometimes exception ArgumentException. More details and workaround http://code.logos.com/blog/2012/11/how-to-crash-many-wpf-applications-wpf-4-edition.html
Add support .net Standard 2.0.
So, I've been spending a couple days beating my head over this library, trying to get simple HTML to render correctly. b tags don't seem to work sometimes, there are...
I added .net 5 projects for HtmlRenderer and HtmlRender.WPF
AvaloniaUI become more and more popular with same api as wpf. Port for AvaloniaUI will be good.