Text variable & database & SVG template

General discussions about Inkscape.
24pm
Posts: 1
Joined: Fri Nov 06, 2015 5:04 pm

Text variable & database & SVG template

Postby 24pm » Fri Nov 06, 2015 5:38 pm

I would like to produce several PDF and SVG files out of SVG template with several text variables (name, address, etc.) filled in from database (could be just text CSV file).
The only solution I found is an article in Russian how to do it with php script:
http://diomer.ru/read/create-pdf-with-p ... om-patter/
But I would like to do it within Inkscape (+extentions).

Is it a build-in possibility or an extension for that? I could not find...

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Text variable & database & SVG template

Postby Moini » Fri Nov 06, 2015 10:42 pm

The quickest way is probably to write a short command line script, using sed - SVG files are just text, you can batch edit them easily via command line.
Then you can use Inkscape command line interface to export to pdf.

As far as I know, there is no extension yet that does that (but I don't think it would be too hard to make one, as the building blocks - like reading a CSV file, exporting to pdf, search+replace - are all available in other extensions already).
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Text variable & database & SVG template

Postby brynn » Sat Nov 07, 2015 1:27 pm

Well, what it sounds like you want to do is over my head. But I just came across this extension which is said to take text from a CSV file and put in Inkscape canvas: viewtopic.php?f=11&t=9212

Maybe will do part of your project?


Return to “General Discussions”