HTML to PDF A4 printable size [duplicate]

为君一笑 提交于 2019-12-06 03:08:48

问题


I need to design brochure in HTML from which a pdf will be generated. How can I make it to be A4 size and printable after transform to pdf? The HTML will consist of images and text and needs to look the same as HTML version. Is it possible? Should I use 300dpi pixel size -> 2480 X 3508 pixels?


回答1:


You can make a css file that synchonises the layout and even has print-specific directives. You can specify sizes in terms of physical dimensions, although this will be subject to interpretation on the screen.

An article on doing for-print CSS can be seen here.



来源:https://stackoverflow.com/questions/9719289/html-to-pdf-a4-printable-size

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!