Code Monkey home page Code Monkey logo

pdf2swf's Introduction

pdf2swf

PDF文件在线预览

服务端

环境要求

OS:CentOS / Ubuntu
JDK:jdk1.8

转换工具安装

安装脚本在CentOS及Ubuntu上测试通过,如果安装过程遇到问题请反馈!
# cd pdf2swf
# chmod +x ./*.sh
# ./install.sh

微服务安装

考虑到转换工作是由服务端处理的,考虑到多数语言(如PHP)一般是禁用执行系统命令的,所以此处用Java来实现微服务
## 通过 server.port 参数可自定义监听的端口
# nohup java -jar serv.jar --server.port=52012 >>./serv.log &
## 检测微服务是否正常
# netstat -anp | grep 上一步指定的端口号

客户端调用

任何客户端通过HTTP POST请求来调用服务,调用成功后会在被转换文件所在目录生成对应的.swf文件。
比如PDF文件路径:/home/wwwroot/demo/demo.pdf
转换后生成文件:/home/wwwroot/demo/demo.pdf.swf

                   
http://localhost:52012
参数说明
pdfFile待转换PDF文件的绝对路径
前端通过JS+Flash实现swf的加载,具体请参考 player/

相关截图

image image

问题反馈

使用中若有问题请联系QQ:46926125

pdf2swf's People

Contributors

ah-guobing avatar

Watchers

 avatar

Forkers

inwikipedia

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.