I am building a solution that includes printing an invoice out of the web browser. I am willing to live with a few browser quarks.
I would like to make my content center in the printed page instead of on the left side as the browser is wanting to do. I have tried setting right and left margins to auto but to no avail. I have also tried googling around but based on the very little I was able to find, I'm fearing that it won't be possible. I'm surprised this question has been closed. I'm soon going to be looking for answers to similar questions due toa simililar approaching issue. I also need to know if there's any way I can control physical print size too. May end up converting web pages to PDF before printing if I can make that process fast enough...
以上就是How to center div when printed的详细内容,更多请关注web前端其它相关文章!