marcbachmann / node-html-pdf

This repo isn't maintained anymore as phantomjs got dreprecated a long time ago. Please migrate to headless chrome/puppeteer.
MIT License
3.56k stars 545 forks source link

Image is cut on the bottom edge of the page #621

Closed ays-code closed 3 years ago

ays-code commented 3 years ago

Hi.

I have a problem with one image that is just on the bottom edge of the page. It is cut, and one part keep in the first page and the other is put in the next page. I haven't find any solution, I have reviewed the related issues and nothing.

image

Any help.

Thank you.

ays-code commented 3 years ago

After to do a lot of tests I found a solution! The image was inside a quill editor css style (ql-editor) then added a css class and changed the default height style to auto: .content_editor .ql-editor { height: auto; }

/** HTML /

'<div id="content" class="content_editor">
  <div class="ql-editor">html content ....</div>
</div>'