How to design a webpage to be print friendly?

前端 未结 4 1023
失恋的感觉
失恋的感觉 2021-02-09 12:12

What are the right sizes for a webpage to be printed on A4 size paper? What other stuff should be considered?

*inline CSS is preferred in this case

Clari

4条回答
  •  悲&欢浪女
    2021-02-09 12:22

    Make your printable version as simple and free from page furniture as possible.

    You should create a print-specific stylesheet that as a minimum removes any width restrictions on the page so the print page can flow the text to fit the output paper.

    You should also be aware that most browser don't print CSS background images by default so don't rely on them being present on the printed page.


    EDIT: In answer to your comment, I would make the receipt as simple as possible. The main issue is you don't have control over the end-user's printer so you can't know for sure exactly how wide the printable area is.

    Design the page using a liquid/flowable layout and try and keep it simple. Amazon's receipt style that you get in the delivery box is probably worth using for inspiration.

提交回复
热议问题