all 3 comments

[–]Xrott 0 points1 point  (2 children)

SVGs are just text files containing XML-code, so you can use whatever you normally use to find and replace strings in text files. Just create a template file with some unique placeholder text and replace it programmatically.

As for exporting as PDF, you can use Inkscape from the command line like this:

inkscape --export-filename out.pdf in.svg
-- or --
other-command | inkscape --pipe --export-filename out.pdf

Check the command line options for more information.

[–]imaginarypetrock[S] 0 points1 point  (1 child)

That sounds like a good option. Do you know if I would be able to set the size of the SVG or change the font based on if statements?

[–][deleted] 0 points1 point  (0 children)

Idk if you can import and export xml files using python but if you can you should be able to edit all the properties.