.NET實現在網頁中預覽Office文件的3個方法(6)_.Net教程
推薦:asp.net中控制反轉怎么理解?對IOC的解釋為:Inversion of control is a common characteristic of frameworks, so saying that these lightweight containers are special because they use inversion of control is like saying my car is special because it has wheels. 我想對這一概念執行
PrintToolsVisible: true,
ViewModeToolsVisible: true,
ZoomToolsVisible: true,
FullScreenVisible: true,
NavToolsVisible: true,
CursorToolsVisible: true,
SearchToolsVisible: true,
SearchMatchAll:true,
localeChain: "zh_CN"
};
var params = {
quality: "high",
bgcolor: "#ffffff",
allowscriptaccess: "sameDomain",
allowfullscreen: "true"
}
var attributes = { id: "FlexPaperViewer", name: "FlexPaperViewer" };
swfobject.embedSWF("/FlexPaper/FlexPaperViewer.swf", "flashContent", "980", "620", swfVersionStr, xiSwfUrlStr, flashvars, params, attributes);
swfobject.createCSS("#flashContent", "display:block;text-align:left;");
</script>
</div>
document.getElementById("_filename").value是預覽文件的路徑
OK 大功告成 ,至于如何上傳,怎么保存上傳的文件等等那些邏輯我這里就省略了。。。。,但是有個建議,當用戶上傳文件之后調用轉換api生成預覽文件是個耗時的操作,
文件越大耗時越長,也就是說生成預覽文件的時候是需要時間的,因此我使用異步方式生成預覽文件。
分享:delphi選擇文件夾例子所需單元 示例代碼
- 相關鏈接:
- 教程說明:
.Net教程-.NET實現在網頁中預覽Office文件的3個方法(6)。