for linux pdf转mobi_linux PDF转换为SWF
由于工程需要把用户上传的PDF转换为SWF,服务器要求也是linux,所以就想到 swftools,
官方网站:http://www.swftools.org/可以把很多文件转换为swf,
他默认只支持 英文,中文转换出来是乱码,所以我们要下载中文字库。中途遇到不少问题,都慢慢解决了,参数也明白了,大家看我的记载吧。
环境:
software: xpdf-chinese-simplified.tar.gz font.zip
给操作系统安装中文字库
yum install *font* -y
yum install *chinese* -y
##安装软件
wget ftp://ftp.foolabs.com/pub/xpdf/xpdf-chinese-simplified.tar.gz
wget http://www.nginxs.com/download/font.zip
解压 xpdf-chinese-simplified.tar.gz 修改配置文件
tar zxvf xpdf-chinese-simplified.tar.gz
unzip font.zip
mv Gbsn00lp.ttf gkai00mp.ttf xpdf-chinese-simplified/CMap/
##把 xpdf-chinese-simplified 移动到 /usr/share/xpdf
mkdir -p /usr/share/xpdf
mv xpdf-chinese-simplified /usr/share/xpdf
##修改配置文件
cd /usr/share/xpdf/xpdf-chinese-simplified
vim add-to-xpdfrc
#—– begin Chinese Simplified support package (2004-jul-27)
cidToUnicode Adobe-GB1 /usr/share/xpdf/xpdf-chinese-simplified/Adobe-GB1.cidToUnicode
unicodeMap ISO-2022-CN /usr/share/xpdf/xpdf-chinese-simplified/ISO-2022-CN.unicodeMap
unicodeMap EUC-CN /usr/share/xpdf/xpdf-chinese-simplified/EUC-CN.unicodeMap
unicodeMap GBK /usr/share/xpdf/xpdf-chinese-simplified/GBK.unicodeMap
cMapDir Adobe-GB1 /usr/share/xpdf/xpdf-chinese-simplified/CMap
toUnicodeDir /usr/share/xpdf/xpdf-chinese-simplified/CMap
displayCIDFontTT Adobe-GB1 /usr/share/xpdf/xpdf-chinese-simplified/CMap/gkai00mp.ttf
#—– end Chinese Simplified support package
用winscp上传上来一个 pdf 转换看看。
shell $> ls
aa.pdf
##查看参数
pdf2swf –help
Usage: pdf2swf [Options] input.pdf [-o output.swf]
Basic options:
-p –pages=range Convert only pages in range
-P –password=password Use password for deciphering the pdf
-v –verbose Be verbose. Use more than one -v for greater effect
-q –quiet Suppress normal messages. Use -qq to suppress warnings, also.
-F –fontdir directory Add directory to font search path
-V –version Print program version
Enhanced conversion options:
-S –shapes Don’t use SWF Fonts, but store everything as shape
-z –zlib Use Flash 6 (MX) zlib compression (Needs at least Flash 6 Plugin to play)
-w –samewindow Don’t open a new Browser Window for Links in the SWF
-f –fonts Store full fonts in SWF. (Don’t reduce to used characters)
-T –flashversion=num Set the flash version in the header to num (default: 4)
-s insertstop Insert a “Stop” Tag in every frame (don’t turn pages automatically)
-s zoom=factor Scale result, default: 72
-s jpegquality=quality Set quality of embedded jpeg pictures (default:85)
-s caplinewidth=value Set the minimum line width to trigger cap style handling to value. (3)
-s splinequality=value Set the quality of spline convertion to value (0-100, default: 100).
-s fontquality=value Set the quality of font convertion to value (0-100, default: 100).
-s ignoredraworder Ignore draw order (makes the SWF file smaller and faster, but may produce
graphic errors)
-s filloverlap Make intersecting shapes overlap, instead of canceling each
other out. (Needed for some Powerpoint PDFs)
Postprocessing options:
-b –defaultviewer Link default viewer to the pdf (/usr/share/swftools/swfs/default_viewer.swf)
-l –defaultpreloader Link default preloader the pdf (/usr/share/swftools/swfs/default_loader.swf)
-B –viewer=filename Link viewer “name” to the pdf (“pdf2swf -B” for list)
-L –preloader=filename Link preloader “name” to the pdf (“pdf2swf -L” for list)
pdf2swf -o as.swf -T -z -t aa.pdf -s languagedir=/usr/share/xpdf/xpdf-chinese-simplified -s flashversion=9
NOTICE Adding /usr/share/xpdf/xpdf-chinese-simplified to language pack directories
NOTICE Adding /usr/share/swftools/fonts to font directories
Title:
Author: DoDoLo
Creator: Acrobat PDFMaker 7.0 for Word
Producer: Acrobat Distiller 7.0 (Windows)
CreationDate: 20070413230358-07′00′
ModDate: 20070413230457-07′00′
Pages: 177
Linearized: yes
Encrypted: no
NOTICE processing PDF page 1 (595×842:0:0) (move:0:0)
Warning: glyph 0/22141 (unicode 0) has return code 20
NOTICE file contains pbm pictures
NOTICE processing PDF page 2 (595×842:0:0) (move:0:0)
NOTICE Some texts will be rendered as shape
NOTICE File contains links
NOTICE processing PDF page 3 (595×842:0:0) (move:0:0)
Warning: glyph 0/22021 (unicode 0) has return code 20
NOTICE processing PDF page 4 (595×842:0:0) (move:0:0)
NOTICE processing PDF page 5 (595×842:0:0) (move:0:0)
NOTICE processing PDF page 6 (595×842:0:0) (move:0:0)
NOTICE processing PDF page 7 (595×842:0:0) (move:0:0)
NOTICE processing PDF page 8 (595×842:0:0) (move:0:0)
NOTICE processing PDF page 9 (595×842:0:0) (move:0:0)
NOTICE processing PDF page 10 (595×842:0:0) (move:0:0)
NOTICE processing PDF page 11 (595×842:0:0) (move:0:0)
NOTICE processing PDF page 12 (595×842:0:0) (move:0:0)
……
NOTICE SWF written
###随后用 winscp 拷贝到 windows 上查看转换是否成功
for linux pdf转mobi_linux PDF转换为SWF相关推荐
- java linux pdf2swf_Linux PDF转换为SWF
Linux PDF转换为SWF 2010-01-28 15:33:32 由于工程需要把用户上传的PDF转换为SWF,服务器要求也是linux,所以就想到 swftools,官方网站:http://ww ...
- linux java pdf2swf_linux PDF转换为SWF
由于工程需要把用户上传的PDF转换为SWF,服务器要求也是linux,所以就想到 swftools,官方网站:http://www.swftools.org/可以把很多文件转换为swf,他默认只支持 ...
- SWFTools PDF转换为SWF
前言 在iText 制作PDF这篇博文中只是简单的介绍了如何制作PDF,为了能让PDF在Web页面中显示,我还需要通过SWFTools工具将PDF文件转换为SWF文件,然后通过SWF文件显示在Web网 ...
- 好用的把PDF等转换为SWF的工具
好用的把PDF等转换为SWF的工具 发现一个好的工具,能把象PDF,JPG等格式的东西转换为SWF的格式,具体的下载见:http://www.swftools.org/download.html ...
- 如何使用SWFTools 命令 将pdf文件转换为swf文件,并进行在线浏览该pdf文件
发布一个k8s部署视频:https://edu.csdn.net/course/detail/26967 课程内容:各种k8s部署方式.包括minikube部署,kubeadm部署,kubeasz部署 ...
- 将PDF转换为SWF文件
在处理在线阅读PDF文件时,可以将PDF文件转换为SWF的方式.使用SWFTOOLS工具可以实现格式转换. 工具下载:http://www.swftools.org/download.html swf ...
- swftools工具将pdf文件转换为swf文件
开发客户网站时遇到了一个需求,客户要求后台上传pdf文件,前台能以翻书的形式直接访问. 首先想到的是使用js解决,用户访问前端页面时,php将文件路径发送给js,让js呈现出来翻书的效果.在网上百度了 ...
- swftools工具将pdf文件转换为swf文件 文字丢失
开发客户网站时遇到了一个需求,客户要求后台上传pdf文件,前台能以翻书的形式直接访问. 首先想到的是使用js解决,用户访问前端页面时,php将文件路径发送给js,让js呈现出来翻书的效果.在网上百度了 ...
- java将office文档,word,ppt,pdf文档转换成swf文件在线预览
java将office文档pdf文档转换成swf文件在线预览 第一步,安装openoffice.org openoffice.org是一套sun的开源office办公套件,能在widows,linux ...
- java将office文档pdf文档转换成swf文件在线预览
第一步,安装openoffice.org openoffice.org是一套sun的开源office办公套件,能在widows,linux,solaris等操作系统上执行. 主要模块有writer(文 ...
最新文章
- 光耦p621引脚图_开关电源中光耦电路的设计与优点
- 国内较强的NLP高校实验室有哪些?
- [Swift]LeetCode160. 相交链表 | Intersection of Two Linked Lists
- springcloud 微服务 分布式 Activiti6 工作流 vue.js html 跨域 前后分离
- php strtotime 和 date 日期操作
- 拆分工作簿为多个文件_掌握这几行代码,快速拆分Excel工作簿(内含源码)
- 代码review工具:Review Board
- 计算机网络中什么叫总衰耗_计算机网络中的“带宽”,为什么是指“在单位时间内...
- 蓝桥杯 基础练习 报时助手
- 【文本匹配】cqrctr:文本匹配的破城长矛
- BIO、NIO、AIO差别
- Windows XP精简版无添加删除组件选项而无法安装IIS的解决之道
- PS在园林计算机辅助设计中有哪些应用,风景园林计算机辅助设计(谷永丽)(第2版)...
- fullavatareditor 富头像上传编辑器
- 【ArcGIS风暴】ArcGIS10.6栅格计算器(Raster Calculator)用法详解
- 关于LANP的相关常识题
- AdaBoost 人脸检测介绍(5) : AdaBoost算法的误差界限
- LED背光源的结构分类
- win10系统安装virtualbox虚拟机win7系统过程记录
- 02-Hadoop集群搭建