Questions tagged [html-renderer]

Use this tag for questions about the HTML Renderer family of libraries that allow conversion from HTML to other formats (HTML Renderer for WinForms/for WPF/for Mono/for PDF using PdfSharp).

HTML Renderer is a family of libraries that allow conversion from HTML to other formats. There are:

  • HTML Renderer for WinForms
  • HTML Renderer for WPF
  • HTML Renderer for Mono
  • HTML Renderer for PDF using PdfSharp
  • HTML Renderer Core

Project on GitHub: https://github.com/ArthurHub/HTML-Renderer

37 questions
0
votes
1 answer

HTML Renderer - letter-spacing CSS not working

I'm generating PDF from HTML using HTML Renderer, but the letter-spacing HTML is not working: h1 { text-align: center; font-size: 2.2em; letter-spacing: 3px; } Generating PDF like below: var config = new PdfGenerateConfig(); …
Kris
  • 5
  • 6
0
votes
0 answers

HTML Renderer - generated PDF from HTML but couldn't add background image from stream C#

I have generated PDF from HTML using HTML Renderer, all images are from stream var pngBinaryDataLogoLeft = File.ReadAllBytes(folderPath + "logo.png"); var ImgDataURILogoLeft = @"data:image/png;base64," +…
Kris
  • 5
  • 6
0
votes
1 answer

Created pdf does not display all UTF-8 characters

I'm creating a PDF document using HtmlRenderer.PdfSharp library. Back-end receives html from front-end and creates PDF using GeneratePdf() method. PdfGenerator.GeneratePdf(html, PdfSharp.PageSize.A4); The process works fine when standard latin…
asd2ws
  • 23
  • 4
0
votes
1 answer

Syncfusion Webkit rendering engine binaries notarization on MAC

I am using html to PDF conversion using syncfusion webkit rendering on MAC os. It works fine until I notarize my app. When I tried to notarize my app, I got errors like QtMacBinaries are not signed. I signed all QtMacBinaries using my developer id…
0
votes
2 answers

Images don't display in generated PDF file

I have an HTML page rendered via ASP.NET. When I generate a PDF through HtmlRenderer.PdfSharp the images appear as a red X (missing image) in the PDF while the rest of the HTML appears properly. The images are not links, they are binary objects.…
0
votes
0 answers

Use HtmlRenderer to Generate Image with Scripts

I'm attempting to use TheArtOfDev.HtmlRenderer on my .NET 4.6 WebAPI project to generate an image of some HTML that I have. private static string GetBase64FromHtml(string htmlString) { var image = HtmlRender.RenderToImage(htmlString); string…
Chris Hobbs
  • 713
  • 9
  • 26
0
votes
1 answer

Is it possible to display multiple partial view one below row-wise in single _Layout.cshtml?

I have a situation where i wish to render 2 partial views in single layout.cshtml one below another. Each partial view belongs to separate controller. I processed it using 2 different approach, the first one which i wanted it to work didn't worked…
0
votes
0 answers

save a div with css to pdf file ASP.net C#

i have a div in asp.net page
the contents of this div are generated from code behind using c#. And it is being applied with external css file. Now using c#i want to save this rendered div to a pdf file on server. i tried using…
Surensiveaya
  • 199
  • 7
0
votes
1 answer

HTMLRenderer and PDFSharp not rendering tables well even with embedded styles

I'm trying to use HTMLRenderer and PDFSharp to output a PDF file. But I'm noticing that even very simple tables don't render correctly. I embed the style right in the web page. I even tried style tags right on the elements and it ignores them. Am I…
jgilmore
  • 29
  • 4
0
votes
1 answer

Is there a high fidelity way to convert HTML into PDF and DOCX?

I need to convert HTML files into PDF and DOCX respectively (just the HTML -> PDF part would good enough for now though). Obviously I know there are some projects that help with what I want to achieve, I am currently using HTML-Renderer for the PDF…
Erick Santander
  • 171
  • 1
  • 15
0
votes
1 answer

Convert HTML to PDF using HTML Renderer using C# and XML to Pdf

I want to convert an HTML form to a PDF form using HTML Renderer. I know how to convert an HTML page to PDF using HTML Renderer, but I'm not getting all the pages, it is displaying only first page. When I open HTML in the browser it is displaying…
tony
  • 1
  • 1
0
votes
0 answers

HtmlRenderer set custom size (HTML to PDF)

How can I set the size of my PDF output to a custom value like 50mm? PdfDocument pdf = PdfGenerator.GeneratePdf(rpt.TransformText(), PageSize.A4, 0); pdf.Save(@"path\to\output\pdf"); I did: var config = new…
scikid
  • 7
  • 4
0
votes
0 answers

Left to Right Unicode Character in email Time Stamp

I am converting email to a .pdf using an HTML-to-pdf conversion scheme. When I convert the email I see this in the pdf: So I looked a little deeper into the email and can see Unicode character 200e which is a left to right character: I am going…
Be Kind To New Users
  • 8,043
  • 10
  • 63
  • 102
0
votes
0 answers

HTML to image with HtmlRenderer on c#

I use this C# code and HtmlRenderer Library ( HTML Renderer for WinForms HtmlRenderer.WinForms ) for convert GridView to htm and save to image. But the output is not formatted and is misaligned with respect to the browser GridView : The browser…
0
votes
0 answers

Converting HTML to an image using C#

Hi i want to convert HTML to an image using HTMLRenderer. I am able to convert the HTML to an image but the fonts are appearing bold and blurred. It seems the resolution breaks while converting. Bitmap m_Bitmap = new Bitmap(850,700); PointF point =…
user1818042
  • 75
  • 1
  • 10