在做一个项目,客户有个变态的需求:就是PPT文件提供在线打开,不能下载。不提供下载,,怎么把PPT文件输出到HTML或者用图片打开?? 最好提供代码,,不要给我下面这两个链接,,我没账号。。ppt=>html:
http://www.codeproject.com/vb/net/litewait.aspppt=>image:
http://www.codeproject.com/cs/media/PowerpointBitmaps.asp
http://www.codeproject.com/vb/net/litewait.aspppt=>image:
http://www.codeproject.com/cs/media/PowerpointBitmaps.asp
解决方案 »
- 发送邮件失败无法连接到远程服务器
- Access填充gridview 如何取出数据传值!!!
- 如何在cs文件里对panel增加<br>
- XP操作系统 vs2003出现这个问题,怎么解决啊??无法将文件“bin\Destine.pdb”复制到运行目录。另一个程序正在使用此文件,进程无法访问。
- 牛人救命啊!如何取到Label1 .Attributes.Add ("onclick","return confirm('确认吗?');")的返回值
- 水晶报表问题...........
- 急!!!!!!!!我是通过调用listarticle函数来邦定数据源的!!!!是不是这里有问题?(共100分)
- 急需aspnet免费论坛,大家知道哪有这样的下载帮帮忙啦
- 从数据库读取数据到gridv中但是页面不显示
- 用formview控件更新的问题
- ASP.NET 2.0下可通过什么方式直接在页面上显示.doc/.xls/.ppt文档?
- 如何遍历datagrid,然后插入数据表??
我以前也遇到过一个变太客户,要求在哪一台机子上注册,就只能在哪一台机子上登陆
伪装的话就读硬盘好了^_^
这样做个病毒给他的了
欢迎大家来我的博客作客:http://blog.csdn.net/aafshzj/
我正在写一系列关于AAF组件框架的文章。该框架能对开发工作提供很多帮助,并极大地提高开发效率。希望大家看一看并提出宝贵建议。
可以更进一步,实现弹出窗口,屏蔽所有工具条、屏蔽右键菜单——很多在线播放的网站都是这么做的。
我这里正在研究word读取,可以参考,
------------------------------
<%@ Page language="c#" Codebehind="WordToHtml.aspx.cs" AutoEventWireup="false"
Inherits="aspxWebcs.WordToHtml" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>WordToHtml</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
</form>
</body>
</HTML>----------------------------------------
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using Office;namespace aspxWebcs
{
/// <summary>
/// WordToHtml 的摘要说明。
/// 首先要添加引用:Microsoft Word 9.0 Object Library
/// </summary>
public class WordToHtml : System.Web.UI.Page
{
private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
Word.ApplicationClass word = new Word.ApplicationClass();
Type wordType = word.GetType();
Word.Documents docs = word.Documents; // 打开文件
Type docsType = docs.GetType();
object fileName = "d:\\tmp\\aaa.doc";
Word.Document doc = (Word.Document)docsType.InvokeMember("Open",
System.Reflection.BindingFlags.InvokeMethod, null, docs, new Object[] {fileName, true, true});
// 转换格式,另存为
Type docType = doc.GetType();
object saveFileName = "d:\\tmp\\aaa.html";
//下面是Microsoft Word 9 Object Library的写法,如果是10,可能写成:
/*
docType.InvokeMember("SaveAs", System.Reflection.BindingFlags.InvokeMethod,
null, doc, new object[]{saveFileName, Word.WdSaveFormat.wdFormatFilteredHTML});
*/
///其它格式:
///wdFormatHTML
///wdFormatDocument
///wdFormatDOSText
///wdFormatDOSTextLineBreaks
///wdFormatEncodedText
///wdFormatRTF
///wdFormatTemplate
///wdFormatText
///wdFormatTextLineBreaks
///wdFormatUnicodeText
docType.InvokeMember("SaveAs", System.Reflection.BindingFlags.InvokeMethod,
null, doc, new object[]{saveFileName, Word.WdSaveFormat.wdFormatHTML}); // 退出 Word
wordType.InvokeMember("Quit", System.Reflection.BindingFlags.InvokeMethod,
null, word, null);
}#region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}
---------------------------