HakanL / WkHtmlToPdf-DotNet

C# .NET Core wrapper for wkhtmltopdf library that uses Webkit engine to convert HTML pages to PDF.
GNU Lesser General Public License v3.0
367 stars 66 forks source link

Blank Pages being inserted in large PDFs #44

Closed CaseyLemieux closed 3 years ago

CaseyLemieux commented 3 years ago

WkHtmlToPdf-DotNet seems to be inserting blank pages into pdfs being converted to byte arrays if its used consecutively. I don't know if this is an issue with the converter or something else. I am generating student ids in pdfs from html templates and CSS. If I generate them individually it works correctly and is formatted right. However if I generate a large number of them it starts inserting blank pages between the front and back of the ids that print fine when doing them individually. I tried limiting the to 25 students thus 50 page pdfs which makes the first 50 print correctly but after that it starts inserting blank pages. Maybe an issue with calling the converter back to back? Any help would be appreciated.

HakanL commented 3 years ago

Try to use the native library directly and see if you can reproduce the problem. Not likely an issue with this .NET Wrapper.