就是百度文库,豆丁网那种技术是咋做的,求高手指点!最近公司要做网站需要这个技术,但是还不会,愁

解决方案 »

  1.   

    FlashPaper 或者 FlashPrinter 可以把所有格式转换成swfhttp://www.google.com.hk/search?q=Flashprinter&hl=zh-CN&safe=strict&rls=com.microsoft%3Azh-cn%3AIE-SearchBox&rlz=1I7ADFA_zh-CN&sa=2
      

  2.   

    孟哥!在问完这个问题后我也搜查了一番, flashpaper能转换word ppt 页面放个标签embed传给他路径就能显示,可以出现以下几个问题!
    1,不能转换pdf格式文件。
    2,转换word ppt的时候勾选防止打印,防止修改 复制但是转换出来的文件依然可以被复制 被打印。。
    3, 就是上传文件word文件后, 代码怎样处理进行转化swf格式呢?C#执行flashpaper.
    希望孟哥能帮帮小弟。
      

  3.   

    可以这样
    Process process = new Process()
    String FlashPrinterPath = folderpath; //\\FlashPrinter.exe
       所 在 的 文 件 夹
    process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
    process.StartInfo.UseShellExecute = true;
    process.StartInfo.CreateNoWindow = true;
    process.StartInfo.ErrorDialog = false;
    process.StartInfo.WorkingDirectory = FlashPrinterPath;
    process.StartInfo.FileName = "FlashPrinter.exe";
    process.StartInfo.Arguments = "\"" + pdf + "\" -o \"" + swf + "\"";
    process.Start();
    process.WaitForExit();
    process.Close();或者参见
     http://blog.csdn.net/zhouwen/archive/2010/09/02/5859861.aspx
      

  4.   

    本帖最后由 net_lover 于 2011-06-02 10:37:27 编辑
      

  5.   

    谢谢孟哥!确实自己研究发现豆丁 百度文库都是自己开发的。据说也有新的而且都出了产品卖钱呢,公司不可能花钱去买,只能自己开发,现在就剩下怎样才能处理PDF和禁止打印复制了。
      

  6.   

        protected void Button1_Click(object sender, EventArgs e)
        {
            bool isconvert = ConvertPdfToSwf("officeroot\\a.doc", "swfroot\\a.swf");
        }
        public bool ConvertPdfToSwf(string inFilename,string swfFilename)
        {
            bool isStart;
            try
            {
                Process p = new Process();
                p.StartInfo.FileName = "cmd";
                p.StartInfo.UseShellExecute = false;
                p.StartInfo.RedirectStandardInput = true;
                p.StartInfo.RedirectStandardOutput = true;
                p.StartInfo.RedirectStandardError = true;
                p.StartInfo.CreateNoWindow = true;
                p.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
                p.Start();
                isStart = p.Start();
                string strOutput = null;
                string s = @"E:\FlashPaper2.2\FlashPrinter.exe " + Server.MapPath(inFilename) + " -o " + Server.MapPath(swfFilename);
                p.StandardInput.WriteLine(s);
                p.StandardInput.WriteLine("exit");
                strOutput = p.StandardOutput.ReadToEnd();
                Console.WriteLine(strOutput);
                p.WaitForExit();
                p.Close();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return isStart;
        }
    完成了 word ppt转换。。但是PDF需要用阅读器打开点击打印选择 flashpaper才能打开进行转换,我在网上查了资料swftools-0.9.1.exe 这款软件能直接打开pdf保存转换swf,我我怎样才能在 上面的代码基础上加上这个呢?执行pdf2swf呢?pdf2sw就是说的这个软件swftools-0.9.1.exe 安装版的。。可以考虑装在服务器。
    我获取文件名称进行判断 是否是pdf? 怎么执行就不会啦。 
      

  7.   

    FlashPrinter.exe安装完毕后有一个虚拟打印机。命令行调用的是直接打开阅读器之后自动进行打印,然后关闭。
    不过,这个跟Reader的版本有关系,好像版本低比较容易转换成功,另外,FlashPrinter.exe这个程序不是很好用,我也测试过。
      

  8.   

    命令行调用的是直接打开阅读器之后自动进行打印,然后关闭。
    1 我需要在服务器安装阅读器,
    2 是不是跟打开flashpaper差不多 传递路径执行文件?小弟我 C#开发没有弄过  执行本机上的软件。
    还望大哥多指点。