zoukankan      html  css  js  c++  java
  • word转pdf swf 在线预览

    来源:http://www.cnblogs.com/wuhenke/archive/2010/08/01/1789750.html

      之前在项目中研究使用了一套word转PDF,然后将PDF转成SWF的方法,最终实现SWF的在线浏览。自己还有些洋洋得意,昨晚在浏览网页搜集资料时发现:原来在2004年左右就有Flash Paper,已经很容易地实现上面的过程。

         Flash Paper支持Office文档(.doc,.xls,.ppt)直接转换为PDF或SWF,速度很快,效果较好。可惜,Flash Paper V2.2后没有再更新了。安装Flash Paper后,可以直接使用命令调用FlashPrinter.exe,实现批量转换。

         例如:C:FlashPaper2.2FlashPrinter.exe C:Flex技术简介.ppt  -o C:Flex技术简介.pdf

    Code highlighting produced by Actipro CodeHighlighter (freeware)
    http://www.CodeHighlighter.com/

    --> public static void ConvertPdfToSwf(HttpRequest reqeust, String styFileName, String[] dataFileNames, String outputFileFullName)

    {

    try

    { String flashPrinter = String.Concat(AppDomain.CurrentDomain.BaseDirectory, "FlashPrinter.exe");//FlashPrinter.exe
    System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(flashPrinter);


    if (String.IsNullOrEmpty(outputFileFullName))

    { return ; }

    Int32 intLastDot = outputFileFullName.LastIndexOf(".");

    //*********Temp Programming****************************************

    Int32 intLast = outputFileFullName.LastIndexOf("\");

    String path = outputFileFullName.Substring(0, intLast);

    String tempFileName = path + "\PdfToSwf20080923.pdf";

    //*****************************************************************

    String swfFileName = String.Concat(path, "\PdfToSwf20080923.swf");

    startInfo.Arguments = String.Concat(tempFileName, " -o ", swfFileName);

    System.Diagnostics.Process process = new System.Diagnostics.Process();

    process.StartInfo = startInfo;

    Boolean isStart = process.Start();

    process.WaitForExit();

    process.Close();

    }

    catch(Exception ex) { throw ex; }

    }

  • 相关阅读:
    函数的调用过程
    Android基础-弹出式菜单
    Android基础-上下文菜单(Content_Menu)
    Adnroid基础-选项菜单(OptionMenu)
    Android基础-UI界面(项目实战 点菜界面) 1.EditText 2.SeekBar 3.CheckBox 4.ToggleButton 5.RadioGroup 6.Button 7.TextView 8.ImageView
    Android基础-进度条(SeekBar)
    Android基础-开关按钮(ToggleButton)
    Android基础-单选框(RadioButton)
    显示应用名称
    在Xcode中使用pch文件
  • 原文地址:https://www.cnblogs.com/-yan/p/4499975.html
Copyright © 2011-2022 走看看