Mobile app version of vmapp.org
Login or Join
Speyer780

: Inkscape: Export SVG to LaTeX-PDF preserving text positioning I am using Inkscape to export .svg files to LaTeX-PDF using the following command: inkscape --without-gui --file="<file>.svg" --export-pdf="<file>.pdf"

@Speyer780

Posted in: #Export #Inkscape #Latex #Pdf #Svg

I am using Inkscape to export .svg files to LaTeX-PDF using the following command:

inkscape --without-gui --file="<file>.svg" --export-pdf="<file>.pdf" --export-latex


It generates a pdf document containing the "images" and a .pdf_tex document which is written in LaTeX, includes the .pdf file and fills it with the text contained in the .svg file. This works fine and most of the time the text is exactly at the position where it was placed inside the .svg file.

But sometimes the text is out of place, because obviously the fonts used are not the same. For example in one of my .svg files I have a box with text in it. When I export this file the text runs over the border of the box. I would like to know if it is possible to get rid of this problem for example by changing the font size via command line to something smaller.

EDIT: To provide you with a minimal working example: You can use PlantUML to generate an SVG that has this problem.

example.txt:
@startuml example.svg
class AClass{
+ void valueChanged(String key, String value);
} @enduml


You can generate this example .svg file using PlantUML with its -tsvg flag, like this:

java -jar "plantuml.jar" -tsvg example.txt

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Speyer780

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme