Generate print preview of a web page in asp.net

前端 未结 3 1057
一个人的身影
一个人的身影 2020-12-22 08:04


This is the only c

3条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-22 08:18

    I really don't see this as practical. Your web page has no knowledge of font size (zoom level), page margins, orientation or anything else you'd need to know to construct a print preview image.

    In addition, it's possible for a page to reference images and other content from other sites. How will your code know what is needed here?

    Fortunately, the browsers I use (IE and Chrome) provide print preview, so you'd get it for free anyway. But if you're trying to implement print preview manually, I just don't see that as a practical goal.

提交回复
热议问题