8000 Problem generating pdf · Issue #5 · wooio/htmltopdf-java · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Problem generating pdf #5
Closed
Closed
@eduardogsch

Description

@eduardogsch

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; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0