首先,windows系统必须安装预览插件!
html代码中书写如下!
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="http://127.0.0.1:8096/draw/">
<title>dwg图纸浏览</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<OBJECT id="DWGViewX" classid="clsid:AC53EFE4-94A7-47E6-BBFC-E9B9CF322299" codebase="/draw/download/dwgviewx.cab" width="1200" height="750">
<param name="_Version" value="65536">
<param name="_ExtentX" value="18521">
<param name="_ExtentY" value="13758">
<param name="_StockProps" value="0">
<!-- http://127.0.0.1:8096/draw/upload/201610/20161012104324045_829.dwg
c:\a.dxg
${fileUrl}
此处必须用文件的静态路径,流路径测试失败!
-->
<param name="DrawingFile" value="c:\a.dwg">
<param name="ShowToobar" value="-1">
<param name="ShowLayoutBar" value="1">
</OBJECT>
</body>
</html>
IE浏览器插件代码