使用Batik将svg转换为pdf在Ubuntu 11.10上不起作用 [英] Converting svg to pdf with Batik not working on Ubuntu 11.10

查看:112
本文介绍了使用Batik将svg转换为pdf在Ubuntu 11.10上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Ubuntu-11.10上使用Batik SVG工具包将svg图像转换为pdf. 我安装了蜡染1.7和Fop 0.95.在终端中运行以下命令时:

I am attempting to convert a svg image to pdf using the Batik SVG toolkit on Ubuntu-11.10. I have Batik 1.7 and Fop 0.95 installed. When running the following in the terminal:

java -jar /usr/java/share/batik-rasterizer.jar -m application/pdf /home/user/Batik_Test/colors.svg  
-scriptSecurityOff

我收到以下错误:

转换文件时出错:
错误:无法访问代码为application/pdf的图像的转码器

我注意到的一件事是文件'pdf-transcoders.jar'不在计算机上,因此我将其添加到/usr/share/java中,这是因为问题,但没什么用.

The one thing I did notice was that the file 'pdf-transcoders.jar' was not on the machine so I added that to /usr/share/java on the off chance that was the problem but that did not make a difference.

如果有经验的人在ubuntu上使用蜡染,我将不胜感激.我想念什么?

I would appreciate any help from anyone out there with experience using Batik on ubuntu. What am I missing?

-J

推荐答案

(如果您在/usr/java中具有 java 可执行文件 batik-rasterizer.jar ) /share/目录,您可以在同一路径(/usr/java/share/)

if you have the java executable batik-rasterizer.jar in /usr/java/share/ directory, you can create a dir named lib in this same path (/usr/java/share/)

/usr/java/share/lib

在此最新目录( lib )中,您将复制 pdf-transcoder.jar ,以便具有

in this latest dir (lib) you will copy the pdf-transcoder.jar so to have

/usr/java/share/lib/pdf-transcoder.jar

无论如何,除此以外,您还需要其他 lib ,因此,对您来说,复制 lib 全部内容对您来说更好蜡染二进制分发zip文件中包含的目录

anyway, you need also other libs in addition to this, so, it is better for you, copy the whole content of lib directory contained in batik binary distribution zip file

/usr/java/share/lib/

* content * ,而不是 lib ,如果要一次复制整个lib ,则可以需要放入

only *content*, not lib, if you want copy the whole lib at once, you need to put in

/usr/java/share/

这篇关于使用Batik将svg转换为pdf在Ubuntu 11.10上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆