开发者

How can I programatically convert SVG files containing text to PDF files (specifically on CentOS 5.3 x86_64)?

开发者 https://www.devze.com 2022-12-13 18:11 出处:网络
I would like to programatically convert SVG files to PDF files. However, the SVG files contain text that must be searchable in the generated PDF files. Also, it has to work on Red Hat Enterprise Linux

I would like to programatically convert SVG files to PDF files. However, the SVG files contain text that must be searchable in the generated PDF files. Also, it has to work on Red Hat Enterprise Linux 5.3 or CentOS 5.3 for the x86_64 architecture. It would be nice if it were Open Source or at least not very expensive.

Here is what I've tried. All of these, except Batik, work fine on Debian Lenny.

Inkscape

I can get it installed using autopackages from http://inkscape.modevia.com/ap, but when I use it from the command line, the text is not searchable.

Batik rasterizer [sic]

When it converts SVG files to PDF files, the text is no longer searchable.

svg2pdf

The source for this and several of its dependencies are available to download. I have been trying to get it to compile on CentOS, but haven't had success yet. I found a precompiled version for Debian x86_64, but it doesn't work on CentOS.

rsvg-convert

Generated PDF isn't searchable on CentOS 5.3. Perhaps installing a newer version of cairo would help. Thanks to DaveParillo for mentioning rsvg-convert (on superuser).

SOLUTION (but perhaps some of the above will still be useful to the reader)

princeXML

It works fine on CentOS when installed from source. For some reason it doesn't work when installed from the .rpm. Thanks Erik Da开发者_如何学Gohlström!

Cross posted on superuser


You could try princexml, it's free for non-commercial use.

0

精彩评论

暂无评论...
验证码 换一张
取 消