rdvojmoc / DinkToPdf

C# .NET Core wrapper for wkhtmltopdf library that uses Webkit engine to convert HTML pages to PDF.
MIT License
1.08k stars 415 forks source link

Setting PagesCount to false causes crash #22

Closed ghost closed 6 years ago

ghost commented 6 years ago

If I set PagesCount to false it crashes. The error messages says pdftools not found and a divide by 0 error.

I can get around it with the following:

new ObjectSettings() { PagesCount = true, HtmlContent = html, WebSettings = { DefaultEncoding = "utf-8" }, HeaderSettings = { FontSize = 9, //Right = "Page [page] of [toPage]", Right = "", Line = false, Spacing = 0 } }

rdvojmoc commented 6 years ago

I can confirm the issues. Can you maybe post this problem to wkhtmltopdf. Issue is coming from wkhtmltopdf library and not DinkToPdf.

fabs-rodriguez commented 5 years ago

I am getting that error too when setting PagesCount to zero. Jacquers, did you post the problem to wkhtmltopdf? I didn't see the issue there... I will post it now...