简体   繁体   English

如何将 SVG 文本转换为 SVG 路径?

[英]How to convert SVG text to SVG paths?

I have SVG file (created by com.spire.pdf) and this SVG created from pdf file (pdf file created from html using iText lib).我有 SVG 文件(由 com.spire.pdf 创建)和这个从 pdf 文件创建的 SVG(使用 iText lib 从 html 创建的 pdf 文件)。

So i need to convert this SVG to SVG with another tags(path), or SVG to PDF.所以我需要将此 SVG 转换为带有另一个标签(路径)的 SVG,或将 SVG 转换为 PDF。

All tags in my example is like this: <text style="fill:#000000;font-family:Arial;font-weight:bold;" font-size="10" x="36" y="46.21002" letter-spacing="-0.075">2020</text>我的例子中的所有标签都是这样的: <text style="fill:#000000;font-family:Arial;font-weight:bold;" font-size="10" x="36" y="46.21002" letter-spacing="-0.075">2020</text> <text style="fill:#000000;font-family:Arial;font-weight:bold;" font-size="10" x="36" y="46.21002" letter-spacing="-0.075">2020</text>

I'm find lib, where it's possible to convert (inkscape) where i can by this paramether --export-text-to-path made my SVG file unable to select text.我找到了 lib,可以在其中转换(inkscape),我可以通过这个参数--export-text-to-path使我的 SVG 文件无法选择文本。

The final goal i`m need PDF file where unposible to select text from there.我的最终目标是需要无法从那里选择文本的 PDF 文件。 (like it was created from image). (就像它是从图像创建的)。

There is ways to convert SVG "text" file to SVG "image" file or to pdf?有没有办法将SVG“文本”文件转换为SVG“图像”文件或pdf?

Inkscape not good for me as i want to do it in java code (Spring boot app) Inkscape 对我不好,因为我想用 Java 代码(Spring 启动应用程序)

For now, I'm find only one lib where it's possible to do: inkscape with --export-text-to-path param.目前,我只找到了一个可以执行此操作的库:带有 --export-text-to-path 参数的inkscape。

Inkscape work in few threads, and can be runned from java. Inkscape 在几个线程中工作,并且可以从 java 运行。 Convertions are slow, and size of exported files depends of version of inkscape.转换速度很慢,导出文件的大小取决于inkscape 的版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM