a-x- / react-easy-print

Powerful react component for easy printing
https://www.npmjs.com/package/react-easy-print
MIT License
87 stars 19 forks source link

Avoid empty page at the end #36

Open renatonmendes opened 5 years ago

renatonmendes commented 5 years ago

Is there a way to avoid an extra blank page when printing ?

sahilchopra commented 5 years ago

+1

sahilchopra commented 5 years ago

Facing same issue. Any idea to prevent that

BTARPAR commented 5 years ago

+1

officeabg commented 5 years ago

I created pull request #40 to address this issue. Please verify if adding .react-easy-print-print{ position: absolute; left: 0; top: 0; } to your css file inside @media print { ... } will fix it. Thank you!

a-x- commented 5 years ago

Hey 👋 I'm here!

a-x- commented 5 years ago

Similar issue: https://github.com/a-x-/react-easy-print/issues/9

a-x- commented 5 years ago

I'm creating a bunch of live examples now. I have to check all the use-cases before accept this hacky-fix :'-)

a-x- commented 5 years ago

I apologize, I don't know how to test printing results automatically.

officeabg commented 5 years ago

Hey! This was a bush fix that worked at the time. Don't know if it works only with my CSS or will fix other cases. This is why I posted here, so others can tell :) and maybe help a poor soul or two. I actually end up using nothing and controlling everything from @media print.

oleg-am commented 4 years ago

works for me: @media print { html, body { height:100vh; margin: 0 !important; padding: 0 !important; overflow: hidden; } }

there are another recipes: https://stackoverflow.com/questions/7846346/how-to-avoid-extra-blank-page-at-end-while-printing