ArthurHub / HTML-Renderer

Cross framework (WinForms/WPF/PDF/Metro/Mono/etc.), Multipurpose (UI Controls / Image generation / PDF generation / etc.), 100% managed (C#), High performance HTML Rendering library.
https://htmlrenderer.codeplex.com/
BSD 3-Clause "New" or "Revised" License
1.24k stars 522 forks source link

Generated blank page - version: 1.5.1-beta1 #185

Closed therohlikar closed 3 years ago

therohlikar commented 3 years ago

Hey,

PdfSharp: 1.32.3057 Html Renderer: 1.5.1-beta1

Simple html code: <html><head></head><body>HELLO WORLD</body></html> but the renderer gives a blank page:

pdfGenerated = "<html><head></head><body>HELLO WORLD</body></html>"; PdfDocument pdf = new PdfDocument(); pdf = PdfGenerator.GeneratePdf(pdfGenerated, PdfSharp.PageSize.A4); pdf.Save("notimportant.pdf");

Any idea why? Thanks,.

PS. earlier version works, but it cuts input in half in between the pages, so...

ferry-aritonang commented 3 years ago

Hi @therohlikar have you tried to use HtmlRenderer.PdfSharp with the same version 1.5.1-beta1?

AndrewShchetkin commented 3 years ago

Hi! I have the same issue. I use: HtmlRenderer.PdfSharp.1.5.1-beta1 HtmlRenderer.Core.1.5.1-beta1 PDFsharp.1.50.5147

therohlikar commented 3 years ago

Hi @therohlikar have you tried to use HtmlRenderer.PdfSharp with the same version 1.5.1-beta1?

Hi, sorry for the late reply @ferry-aritonang, it works now with these versions:

HtmlRenderer.Core: 1.5.1 beta1 HtmlRenderer.PdfSharp 1.5.1 beta1 PDFSharp 1.51.5185 beta

@AndrewShchetkin

AndrewShchetkin commented 3 years ago

Hi, @therohlikar! I updated version PDFSharp to 1.51.5185 beta. But it is not worked for me. I guess it's not work because I use styles for footer: .footer { text-align:left; width:100%; position:fixed; left:20px; right:20px; bottom:20px; top:770px; }

If remove this styles, PdfGenerator generate right PDF