phantomjs服务器linux32位系统安装使用记录
来源:互联网 发布:戴比尔斯钻石骗局 知乎 编辑:程序博客网 时间:2024/06/05 03:00
使用phantomjs遇到问题
chmod 777 phantomjs后
执行./phantomjs 出现./phantomjs-32: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory
无脑安装~包:
yum install libxml2-devel
yum install contconfig fontconfig-devel
解决问题~指令可以执行./phantomjs-32 1.js
截图出现中文乱码
解决问题~
var page = new WebPage(),
address, output, size;
if (phantom.args.length < 2 || phantom.args.length > 3) {
console.log('Usage: rasterize.js URL filename');
phantom.exit();
} else {
address = phantom.args[0];
output = phantom.args[1];
page.viewportSize = { width: '100%', height: '100%' };
page.open(address, function (status) {
if (status !== 'success') {
console.log('Unable to load the address!');
} else {
window.setTimeout(function () {
page.render(output);
phantom.exit();
}, 200);
}
});
}
java中调指令:
List<String> commend = new java.util.ArrayList<String>();
commend.add("chmod 777 "+phantomjs_path);
commend.add(jspath);
commend.add(url);
commend.add(filePath+fileName);
ProcessBuilder builder = new ProcessBuilder();
builder.command(commend);
try {
builder.start();
- phantomjs服务器linux32位系统安装使用记录
- redhat5 linux32/64位 oracle10g安装
- Linux32位64位问题
- phantomjs安装、使用
- phantomjs安装使用
- 安装和使用PhantomJS
- 安装使用PhantomJS
- cacti无法监控linux32位系统网卡流量(超过10M)的处理方法
- phantomjs 的安装和使用
- ubuntu安装使用selenuim&PhantomJS
- PhantomJS简介及安装使用
- linux64位使用phantomjs获取页面截图
- win7 32位系统 安装svn服务器
- Redhat 64位系统安装Nginx服务器
- linux32位操作系统支持大内存
- 动态切换linux32与linux64系统
- 安装phantomjs,使用java代码进行截图
- Centos下安装部署phantomjs 及使用
- CXF在AIX+Weblogic环境下出现包冲突问题
- 不同数据库分页总结
- jsp if else c标签 总结
- UVA - 1452 (jump 约瑟夫变形,求后三位数)
- Codeforces Round #281 (Div. 2) A - Vasya and Football
- phantomjs服务器linux32位系统安装使用记录
- windows远程桌面超出最大连接数的解决方法
- Redis脚本
- 通用分类标准实施
- 第17周 项目6-学生成绩统计
- Longest Common Prefix(最长公共前缀)
- 一起学习HTTP协议
- NYOJ 房间安排 168
- webview问题汇总