Safe width in pixels for printing web pages?

后端 未结 7 2332
无人及你
无人及你 2020-11-30 23:51

What is the safe width in pixels to print a web page?

My page includes large images and I want to make sure they will not be cut of when printed.

I know abo

7条回答
  •  没有蜡笔的小新
    2020-12-01 00:16

    For printing I don't set any width and remove any obstacles which keep your print layout from having a dynamic width. Meaning if you make your browser window smaller and smaller, no content is cut/hidden but the document just gets longer. Like this, you can be sure that the rest will be handled by the printer/pdf-creator.

    What about elements with a fixed width such as images or tables?

    Images

    Options I can think of:

    • scale images down in your print CSS to a width which you can assume will fit in any case, use pt not px (but print will need more points/unit anyways, so this should hardly be a problem)
    • exclude from being printed

    Tables

    • remove the fixed width
    • use landscape if you really have tables with loads of information
    • don't use tables for layout purposes
    • exclude from being printed
    • extract content, print it as paragraphs

    http://www.intensivstation.ch/en/css/print/

    or any other google result for combinations of: CSS, print, media, layout

提交回复
热议问题