Chrome打印预览错误 [英] Chrome print preview error

查看:144
本文介绍了Chrome打印预览错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想打印一个html页面。
html页面是由我开发的,这个页面可以用mozilla打印,也就是说。



在Chrome中:当按下CTRL + P时,它会显示预览窗口,但它说:打印预览失败,我无法打印任何东西。
在opera中,它不会打开打印窗口,也不会按Ctrl + P也不从菜单 - >打印,Safari会打印一个白页。

你有什么想法可能是错误的?什么样的错误会导致这个问题?有没有错误日志的铬,找出有什么不对?



编辑



我尝试删除html元素,css脚本,javascripts,并且我发现我的一个css文件阻止了打印预览,我会去一个,并尝试从css中删除块,我希望我能找到这样的错误在哪里。

编辑2



没有成功。 。有没有可能,那css是为了让浏览器大量编译它的? css里面有导入,我试图删除它们,但是这不能解决我的问题......任何其他建议?



编辑3
我有以下内容:

 < link rel =stylesheethref =/ css / style。 default.csstype =text / cssmedia =all/> 
< link rel =stylesheethref =/ css / myStyle.csstype =text / cssmedia =all/>
< link rel =stylesheethref =/ css / print.csstype =text / cssmedia =print/>

如果我评论第一个include,或者将媒体更改为screen.default.css,那么生成预览,但缺少css规则。
style.default.css是我的全局css,它有17个其他css以这种方式导入它:

  @import url('jquery.ui.css'); 
@import ...

我试着评论导入,该文件的css规则。 (如果错误来自其中一个导入,这应该可以解决这个问题),但是这并没有解决问题,所以我尝试了=反过来,评论css规则,并尝试只使用导入,结果相同。如果我评论整个文件,只有成功......



还有其他建议吗?有人知道,如果铬在某处记录这样的错误?

解决方案

最后我发现错误。 2 css规则阻止浏览器生成预览:

  min-height:100%; 
身高:100%;

  position:fixed; 


I want to print a html page. The html page is developed by me, this page can be printed with mozilla, ie.

In Chrome: when pressing CTRL+P it brings up the preview window, but it says: "Print preview failed", and i can't print anything. In opera it doesn't brings up the print window, nor from pressing CTRL+P nor from Menu->Print, Safari prints a white page.

Do you have any ideas what could be wrong? What kind of error can cause this problem? Is there any error log for chrome, to figure out what is wrong?

EDIT

I tried removing html elements, css scripts, javascripts, and i found out that one of my css file is blocking the print preview, i will go one, and will try to remove blocks from the css, i hope i can find this way where is the error.

EDIT 2

No success... Is there a possibility, that the css is to large for the browser to compile it? the css has imports inside, i tried to remove them, but this doesn't resolved my problem... Any other suggestions?

EDIT 3 I have the following:

<link rel="stylesheet" href="/css/style.default.css" type="text/css" media="all"/>
<link rel="stylesheet" href="/css/myStyle.css" type="text/css" media="all"/>
<link rel="stylesheet" href="/css/print.css" type="text/css" media="print"/>

If I comment the first include, or change the media to screen for style.default.css then the preview is generated, but with missing css rules. The style.default.css is my global css, it has 17 other css imported into it this way:

@import url('jquery.ui.css');
@import ...

I have tried to comment the imports, and tried only with the css rules from that file. (If the error came from one of the imports, this should fix the problem), but this didn't fixed it, so i tried =the other way around, commenting the css rules, and try only with the imports, same result. Only success if i comment the whole file...

Any other suggestions? Somebody knows if chrome is logging somewhere such errors?

解决方案

Finally i found the error. 2 css rules have blocked the browser from generating the preview:

min-height: 100%;
height: 100%;

and

position: fixed;

这篇关于Chrome打印预览错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆