简体   繁体   English

网页打印问题

[英]WebPage printing issue

i have long web page, I want to make it printable when user use the default browser print function. 我的网页很长,我希望在用户使用默认浏览器打印功能时使其可打印。

Currently I can print it as PDF, but it only print a part of the web page and the output is 1 page of PDF ( while the content of the web page has at least 2 pages ). 目前,我可以将其打印为PDF,但它仅打印网页的一部分,输出为1页PDF(而网页的内容至少有2页)。

Is there anything I can do in the developer side ( for user I think there are some external tools help print the entire web site ) to allow user print the entire page easily. 我可以在开发人员方面做些什么(对于用户,我认为有一些外部工具可以帮助您打印整个网站),从而使用户可以轻松地打印整个页面。

I am using angularjs + ionicFramework 我正在使用angularjs + ionicFramework

You can solve this using CSS Media Queries . 您可以使用CSS Media Queries解决此问题。 You can include in your index.html something like: 您可以在index.html

<link rel="stylesheet" media="print" href="print.css">

When the user will try to print the page your css rules in print.css will be applied. 当用户尝试打印页面时,将应用print.css的CSS规则。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM