Code Monkey home page Code Monkey logo

paper2swf's Introduction

Paper2Swf

项目介绍

convert office to pdf and pdf to swf.
  • 支持word、excel、ppt等office文档格式转swf;
  • 支持pdf转swf.

主要实现思路

若是Office文档转swf,需要先把Office文档转为pdf文档,然后再使用swftools将pdf转为swf。
Office文档转pdf的实现方式有两种,一是使用com bridge,使用开源Jacob工具,调用Office或WPS的VBA接口,实现Office文档输出为pdf文档。二是使用OpenOffice、JODConvert将Office文档输出为pdf。
本方案还尝试提供与gearman结合的实现方式,以更好地支持异步转换。

参考资料

运行环境

  • swftools、xpdf语言包
  • 若选用com bridge(即jacob)方式,需要安装MS Office 2007或WPS
  • 若使用WPS,默认安装的程序是不带VBA的,需要自行安装Microsoft Visual Basic for Application,然后才能使用。
  • 若选用OpenOffice方式,需要安装OpenOffice(推荐)
  • 若需要更好地支持异步转换,需要部署gearman

存在问题

  • 使用OO转换大文件性能不理想,100MB doc文档大概需要5分钟时间(x86,i5-2.6GHz,8G,win7),使用com bridge快很多

Start OpenOffice as service

soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard

see also: http://www.artofsolving.com/node/10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.