iframe和打印问题 [英] iframe and printing issues

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

问题描述




我有一个在iframe中显示的Excel电子表格。


我打印使用该功能显示的表格:


函数printExcel(){


window.excelFrame.focus();

window.excelFrame。 print();


}


这可以完成工作但是工作表打印出的页面大于4页,比我打印的字体大来自excel本身的页面。设置原始Excel工作表,以便工作表的内容适合所有页面。


我可以做些什么来控制iframe内容的打印区域?

有没有人有任何建议?


提前谢谢。

Hi,

I have an excel spreadsheet that is displayed within an iframe.

I print the sheet displayed by using the function:

function printExcel(){

window.excelFrame.focus();
window.excelFrame.print();

}

This does the job BUT the sheet is printed out over 4 pages in a larger font than had I printed the page from excel itself. The original excel sheet is set up so that the contents of the sheet fit all onto one page.

Is there anything I can do to control the print area of the contents of the iframe?
Does anyone have any suggestions?

Thanks in advance.

推荐答案

如果是Excel sheet不包含在iframe中,它是否按照你想要的方式打印?
If the Excel sheet is not contained within an iframe, does it print how you want it to?


是 - 当excel不在iframe中时,它只打印一页。当我在iframe中打印它时,它会打印4页以上的页面内容。
Yes - when the excel is not in the iframe it prints just the one page. When I print it in the iframe it prints the contents of the sheet over 4 pages.


您使用什么代码来显示Excel工作表?您可能需要使用打印样式表来控制打印。
What code are you using for displaying the Excel sheet? You may need to use a print stylesheet to control the printing.


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

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