请问用javascript控制的滤镜效果(将图片转向90度),为什么不能用打印机打印出来

银果科技高垒 2008-07-19 06:42:43
我现在有这么一个需求,就是把一个很宽的table表格翻转90度然后打印出来,
我现在用javascript控制滤镜翻转没有问题,可是打印到打印机上还是没有翻转的效果,
请高手帮忙看看那。谢谢了!下面是功能事例代码

<div style="position:relative; width:438px; height:438px; background-color:#F4F4F4;">
<div id="wc" style="position:absolute; left:119px; top:73px; width:200px; height:292px;">
<img src="http://www.cnblogs.com/images/cnblogs_com/wentomi/Untitled-2.jpg">
</div>
</div>
<script type="text/javascript">

var Revolve = {

object : null

, init : function (o, w) {
this.object = o;
this.width = w;

o.style.filter = "progid:DXImageTransform.Microsoft.Matrix()";
//设置滤镜的属性值
o.filters.item("DXImageTransform.Microsoft.Matrix").SizingMethod = "auto expand";
o.filters.item("DXImageTransform.Microsoft.Matrix").FilterType = "bilinear";

}

, revolve : function (n, f) {
var o = this.object, r, sin, cos;

n = (n + f) % 360;

r = n / (360 / (Math.PI * 2));
sin = Math.sin(r), cos = Math.cos(r);


with (o.filters.item("DXImageTransform.Microsoft.Matrix")) {
M11 = 0, M12 = -1, M21 = 1, M22 = 0;
}


with (o.style) {
left = this.width / 2 - o.offsetWidth / 2;
top = this.width / 2 - o.offsetHeight / 2;
}

return n;
}

};
window.onload = function () {
if (!/MSIE/.test(window.navigator.userAgent)) return;
var o = document.getElementById("wc"), n = 0;
Revolve.init(o, 438);
Revolve.revolve(n,90);
};
</script>

...全文
184 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
jacklinchen 2008-07-20
  • 打赏
  • 举报
回复
在确定翻转后再打印
tantaiyizu 2008-07-19
  • 打赏
  • 举报
回复
你可以考虑在 写在css中 ,然后指定 应用硬件 是 print 就可以的

61,112

社区成员

发帖
与我相关
我的任务
社区描述
层叠样式表(英文全称:Cascading Style Sheets)是一种用来表现HTML(标准通用标记语言的一个应用)或XML(标准通用标记语言的一个子集)等文件样式的计算机语言。
社区管理员
  • HTML(CSS)社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧