Description
Hello,
I'm trying to use htmltopdf to generate a pdf file whenever a service is called.
The first time I initialize the application and call the service, the PDF is correctly rendered; however, every time I call the service after that, the HTML is not rendered - instead, there is just plain text.
I was looking into the source code and I noticed that if I force the load() method call (that belongs to the WkHtmlToPdfLoader), copying the LIB to a new directory and its load in memory, it works as expected.
Below is my code to generate the PDF and the code that is generated after the first conversion:
My code
HtmlToPdf.create().object(HtmlToPdfObject.forHtml(html)).convert(tempFile.toAbsolutePath().toString());
Code generated after the first conversion...
body, html { padding: 0; margin: 0; font-family: 'Nunito', sans-serif; width: 100%; } .row { display: - webkit-box; display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; margin-right: -15px; margin-left: -15px; margin-bottom: 17px; }