導航:首頁 > 操作系統 > swftoolslinux安裝

swftoolslinux安裝

發布時間:2022-08-08 18:43:25

1. linux下卸載swftools工具

你用的是什麼方式安裝的?
1. yum install packagename yum安裝?
2. rpm -ivh packagename rpm安裝?
3. ./configure && make && make install 源碼編譯安裝?
4. 用的圖形界面安裝?
這要看你選擇是怎樣的安裝方式了?根據每種安裝方式的不同有不同的卸載方式。

2. linux安裝swftools 執行make時報錯

在swftools最新版本,FAQ標簽中給出freetype庫和jpeglib庫的連接,freetype選擇版本freetype-2.1.10.tar.gz,jpeglib選擇版本jpegsrc.v8c.tar.gz。
先安裝gcc、gcc-c++、zlib、zlib-devel

解壓命令: tar -zxvf xxx.tar,解壓下來的freetype、jpeglib安裝包
進入安裝包目錄
然後執行:
./configure
make
make install

解壓swftools,進入安裝包目錄,執行以下命令:
ldconfig /usr/local/lib
./configure
make
make install
make clean
make distclean
whereis pdf2swf

運行./configure命令時出現:
checking build system
type Invalid configuration 'i686-pc-linux-': machine 'i686-pc-linux' not
recognized
configure: error:
/bin/sh ./config.sub i686-pc-linux- failed
就換為執行: ./configure --build=i686-pc-linux-gnu

運行出現:make: Nothing to be done for `unix'.
執行: make clean
然在再執行make即可

如出現創建文件時間問題,調整linux系統時間即可。

3. linux安裝swftools 執行make時報錯

在swftools官網下載最新版本,官網FAQ標簽中給出freetype庫和jpeglib庫的連接,freetype選擇版本freetype-2.1.10.tar.gz,jpeglib選擇版本jpegsrc.v8c.tar.gz。
先安裝gcc、gcc-c++、zlib、zlib-devel

解壓命令: tar -zxvf xxx.tar,解壓下載下來的freetype、jpeglib安裝包
進入安裝包目錄
然後執行:
./configure
make
make install

解壓swftools,進入安裝包目錄,執行以下命令:
ldconfig /usr/local/lib
./configure
make
make install
make clean
make distclean
whereis pdf2swf

運行./configure命令時出現:
checking build system
type... Invalid configuration 'i686-pc-linux-': machine 'i686-pc-linux' not
recognized
configure: error:
/bin/sh ./config.sub i686-pc-linux- failed
就換為執行: ./configure --build=i686-pc-linux-gnu

運行出現:make: Nothing to be done for `unix'.
執行: make clean
然在再執行make即可

如出現創建文件時間問題,調整linux系統時間即可。

4. swftools分linux版本嗎

方法/步驟

查找swftools官網

下載安裝包

將安裝包放到你喜歡的目錄

安裝依賴包
yum -y install gcc zlib* freetype jpeglib* ungif* jpeglib.h* freetype* gif_lib.h* jpeg* jpeg-devel libjpeg-devel g++ gcc++ gcc*

解壓安裝包
tar -xzvf swfools***
進入安裝目錄
cd swftools***
執行
./configure --prefix=/usr/local/swftools(後面的參數為指定安裝目錄)

make

make install

這里可能出現安裝不成功,需要修改兩個make文件

裡面的rm命令多了兩個參數-o -l把裡面所有這兩個參數都去掉再make install即可

5. swftools支持solaris10嗎(官網里只有linux和windows的版本)急!急!急!!!在線恭候。

這個好像不行~solaris10其實是unix系統。

6. openoffice+swftools+flexpaper實現在線預覽,是不是每台電腦都要安裝

1.概述
主要原理
1.通過第三方工具openoffice,將word、excel、ppt、txt等文件轉換為pdf文件
2.通過swfTools將pdf文件轉換成swf格式的文件
3.通過FlexPaper文檔組件在頁面上進行展示
2.安裝包下載
1.openoffice是Apache下的一個開放免費的文字處理軟體
下載地址:Apache oppenoffice 官網下載 版本-3.4.1
2.SWFTools是一組用來處理Flash的swf文件的工具包,我們使用它將pdf文件轉成swf文件!
下載地址:SWFTools官網下載 swftools-2013-04-09-1007.exe
3.FlexPaper是一個開源輕量級的在瀏覽器上顯示各種文檔的組件
下載地址:FlexPaper官網下載 版本1.5.1
4.JODConverter一個java的OpenDocument 文件轉換器,在此我們只用到它的jar包
下載地址:JODCConverter下載
3.安裝文件
1.將所下載的文件(JODConverter除外)進行安裝,盤符可隨自己設定!需要注意的是在openoffice安裝完成後,當我們使用它時,需將它的服務打開。在次我們需要以命令的方式打開:
打開dos窗口,進入openoffice安裝盤符,輸入以下代碼來啟動服務:
soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard
注意最後一個命令前邊的『—』,可不要寫錯!服務起不來,項目可是繼續不下去的哦.

7. linux中安裝swftools,在make時總出現這個錯誤,哪位高手幫我看看,感謝不盡!

我在RHEL 6.3 x86_64編譯沒有問題
./configure的時候沒有錯誤嗎
這個可能是 缺少gcc或者g++,還可能有依賴包,把這些包都裝上
yum install gcc-c++
yum-y install giflib-devel libjpeg-devel freetype-devel t1lib-devel zlib
然後再執行

ldconfig
./configure
make
make install

8. flexpaper在線預覽問題java linux office文件在線預覽的時候出現如圖的問題,不能預覽,求大神幫忙

swftools-0.9.1.exe 和 FlexPaper_1.4.5_flash.zip,工具網上下載。
二、PDF轉換SWF文件核心類:

public class DocConverter {
private static final int environment = 1;// 環境1:windows,2:linux(涉及pdf2swf路徑問題)
private String fileString;
private String outputPath = "";// 輸入路徑,如果不設置就輸出在默認位置
private String fileName;
private File pdfFile;
private File swfFile;
private File docFile;

public DocConverter(String fileString) {
ini(fileString);
}

/*
* 重新設置 file @param fileString
*/
public void setFile(String fileString) {
ini(fileString);
}

/*
* 初始化 @param fileString
*/
private void ini(String fileString) {
this.fileString = fileString;
fileName = fileString.substring(0, fileString.lastIndexOf("."));
docFile = new File(fileString);
pdfFile = new File(fileName + ".pdf");
swfFile = new File(fileName + ".swf");
}

/*
* 轉為PDF @param file
*/

/*
* 轉換成swf
*/
private void pdf2swf() throws Exception {
Runtime r = Runtime.getRuntime();
if (!swfFile.exists()) {
if (pdfFile.exists()) {
if (environment == 1)// windows環境處理
{
try {
// 這里根據SWFTools安裝路徑需要進行相應更改
Process p = r.exec("G:/Program Files/SWFTools/pdf2swf.exe " + pdfFile.getPath() + " -o " + swfFile.getPath() + " -T 9");
System.out.print(loadStream(p.getInputStream()));
System.err.print(loadStream(p.getErrorStream()));
System.out.print(loadStream(p.getInputStream()));
System.err.println("****swf轉換成功,文件輸出:" + swfFile.getPath() + "****");
if (pdfFile.exists()) {
// pdfFile.delete();
}
} catch (Exception e) {
e.printStackTrace();
throw e;
}
} else if (environment == 2)// linux環境處理
{
try {
Process p = r.exec("pdf2swf " + pdfFile.getPath() + " -o " + swfFile.getPath() + " -T 9");
System.out.print(loadStream(p.getInputStream()));
System.err.print(loadStream(p.getErrorStream()));
System.err.println("****swf轉換成功,文件輸出:" + swfFile.getPath() + "****");
if (pdfFile.exists()) {
pdfFile.delete();
}
} catch (Exception e) {
e.printStackTrace();
throw e;
}
}
} else {
System.out.println("****pdf不存在,無法轉換****");
}
} else {
System.out.println("****swf已存在不需要轉換****");
}
}

static String loadStream(InputStream in) throws IOException {
int ptr = 0;
//把InputStream位元組流 替換為BufferedReader字元流 2013-07-17修改
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
StringBuilder buffer = new StringBuilder();
while ((ptr = reader.read()) != -1) {
buffer.append((char) ptr);
}
return buffer.toString();
}

/*
* 轉換主方法
*/
public boolean conver() {
if (swfFile.exists()) {
System.out.println("****swf轉換器開始工作,該文件已經轉換為swf****");
return true;
}

if (environment == 1) {
System.out.println("****swf轉換器開始工作,當前設置運行環境windows****");
} else {
System.out.println("****swf轉換器開始工作,當前設置運行環境linux****");
}

try {
// doc2pdf();
pdf2swf();
} catch (Exception e) {
// TODO: Auto-generated catch block
e.printStackTrace();
return false;
}

if (swfFile.exists()) {
return true;
} else {
return false;
}
}

/*
* 返迴文件路徑 @param s
*/
public String getswfPath() {
if (swfFile.exists()) {
String tempString = swfFile.getPath();
tempString = tempString.replaceAll("\\\\", "/");
return tempString;
} else {
return "";
}
}

/*
* 設置輸出路徑
*/
public void setOutputPath(String outputPath) {
this.outputPath = outputPath;
if (!outputPath.equals("")) {
String realName = fileName.substring(fileName.lastIndexOf("/"), fileName.lastIndexOf("."));
if (outputPath.charAt(outputPath.length()) == '/') {
swfFile = new File(outputPath + realName + ".swf");
} else {
swfFile = new File(outputPath + realName + ".swf");
}
}
}
}

三、JSP文件,注意引入的幾個js文件和FlexPaperViewer.swf文件,其中FlexPaperViewer.swf和jsp文件放在同一目錄即可。

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String paths=(String)request.getAttribute("swfpath");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>te</title>

<style type="text/css" media="screen">
html, body { height:100%; }
body { margin:0; padding:0; overflow:auto; }
#flashContent { display:none; }
</style>

<script type="text/javascript" src="<%=basePath %>js/swfobject/swfobject.js"></script>
<script type="text/javascript" src="<%=basePath %>js/flexpaper_flash.js"></script>
<script type="text/javascript">
//<!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
var swfVersionStr = "10.0.0";
//<!-- To use express install, set to playerProctInstall.swf, otherwise the empty string. -->
/* var xiSwfUrlStr = "playerProctInstall.swf"; */
var xiSwfUrlStr = ""; //值可以任意

var flashvars = {
SwfFile : escape("<%=basePath+paths%>"), //swf文件路徑(lucene4.6和頁面同一個位置)
Scale : 0.6,
ZoomTransition : "easeOut",
ZoomTime : 0.5,
ZoomInterval : 0.1,
FitPageOnLoad : false,
FitWidthOnLoad : true,
PrintEnabled : true,
FullScreenAsMaxWindow : false,
ProgressiveLoading : true,

PrintToolsVisible : true,
ViewModeToolsVisible : true,
ZoomToolsVisible : true,
FullScreenVisible : true,
NavToolsVisible : true,
CursorToolsVisible : true,
SearchToolsVisible : true,

localeChain: "en_US"
};

var params = {

}
params.quality = "high";
params.bgcolor = "#ffffff";
params.allowscriptaccess = "sameDomain";
params.allowfullscreen = "true";
var attributes = {};
attributes.id = "FlexPaperViewer";
attributes.name = "FlexPaperViewer";
swfobject.embedSWF(
"FlexPaperViewer.swf", "flashContent",
"1024", "700",
swfVersionStr, xiSwfUrlStr,
flashvars, params, attributes);
swfobject.createCSS("#flashContent", "display:block;text-align:center;");
</script>

</head>
<body>

<div style="width: 100%;height: 90%; text-align: center;">
<div id="flashContent">
</div>
</div>

</body>
</html>

9. 如何在linux下安裝swftools

可以使用apt-get install指令
或者下載源碼進行make安裝

閱讀全文

與swftoolslinux安裝相關的資料

熱點內容
android系統名字 瀏覽:963
安卓手機如何進去有求必應屋 瀏覽:432
指數除法運演算法則底數不同 瀏覽:894
90壓縮干糧09壓縮干糧 瀏覽:516
android線程池框架 瀏覽:481
手機自帶解壓能解壓哪些文件 瀏覽:804
linux安裝hba驅動 瀏覽:119
java構造函數new 瀏覽:668
怎麼查家裡電器耗電量app 瀏覽:506
原神一直顯示重新連接伺服器怎麼辦 瀏覽:826
一般用途軸流式壓縮機 瀏覽:926
沒學歷的怎麼學編程 瀏覽:901
華為的隱藏相冊無法加密 瀏覽:782
聯通套餐app怎麼設置 瀏覽:752
關於刪除鏈表的演算法描述 瀏覽:894
標准盤和壓縮盤的區別 瀏覽:47
銀行存款驗證碼JAVA編程 瀏覽:111
word轉pdf軟體免費版 瀏覽:139
公主連結安卓台服怎麼下載 瀏覽:550
注冊江蘇銀行app怎麼注冊 瀏覽:800