cesarvr / pdf-generator

Cordova plugin to generate pdf in the client-side
MIT License
106 stars 62 forks source link

how to restrict number of pages #90

Closed Chousse closed 5 years ago

Chousse commented 5 years ago

Hi, When I generate a pdf file fromData with payload("some HTML") I have more than 17 pages (16 blanks) but my HTML fit normally in a A4 document. Is it possible de restraint the number of pages ? Thanks

cesarvr commented 5 years ago

This can happen because there is a big margin or padding at the bottom of the HTML after rendering. I think you should try to preview the HTML in your browser first and try to see if you can spot some anomalies at the bottom of the final document.

Here is a working example.

Cheers 👍.