wnabil / ngx-export-as

Angular 2+ / Ionic 2+ HTML/table element to export it as JSON, XML, PNG, CSV, TXT, MS-Word, Ms-Excel, PDF
MIT License
68 stars 40 forks source link

Gap at the top of the generated PDF if I scrolled down the page #95

Closed dopinder100 closed 3 years ago

dopinder100 commented 3 years ago

I have a very strange problem. I have a page with a few divs and each div will have their own button to click to generate PDF (with the content of their corresponding divs).

If I just load the page and not scroll it down. Then, when click on the button to generate the PDF, the PDF will get generated perfectly.

But, if I scrolled the page, and then clicked on the button to generate the PDF, then the content in the PDF will have some gap at the top, how much is the gap depends on how much I have scrolled. The more I scrolled down, the much wider is the gap at the top of the PDF.

Please help. Many thanks.

wnabil commented 3 years ago

https://github.com/eKoopmans/html2pdf.js/issues/420#issuecomment-828703007