Create script for diplomas

Discuss SVG code, accessible via the XML Editor.
arthurav2005
Posts: 3
Joined: Thu Nov 19, 2009 1:33 am

Create script for diplomas

Postby arthurav2005 » Fri Feb 19, 2010 7:36 pm

I use inkscape to edit diplomas. They include the student name, address, program name, diploma number, date and student picture. Is there a possibility to create a script that will generate diplomas from a table using each row for one diploma's data and automatically position the data according to its length?
Where can I find tutorials for this and which is the best programming language to interface with inkscape? Thank you.

User avatar
RobA
Posts: 335
Joined: Fri Aug 10, 2007 1:22 am

Re: Create script for diplomas

Postby RobA » Sat Feb 20, 2010 1:28 am

Search for "inkscape extension"

The language is python.

Alternately, (and possibly easier) is to create a single template with placeholders as an SVG file using inkscape, then use an external script to replace the placeholders.

(or specify the node ID's for each element and use an external script with xml parsing capabilities to replace the attribute contents for the specified node id's)

Then call inkscape from the command line to render the output as png.

Text can be set as left/right/or center justified, so as long as the text boxes are large enough to handle the largest string you should be fine.

What is the OS?

-Rob A>

arthurav2005
Posts: 3
Joined: Thu Nov 19, 2009 1:33 am

Re: Create script for diplomas

Postby arthurav2005 » Wed Feb 24, 2010 1:03 am

I can use windows/linux/mac
Is it possible to change image attributes (image source, position, size) too?
Thank you.

User avatar
tomh
Posts: 218
Joined: Sat Feb 14, 2009 10:14 pm

Re: Create script for diplomas

Postby tomh » Sun Apr 25, 2010 1:17 am

Hi, sorry for being so long to give you an answer.

There is an extension that can do " mail merge" type stuff:

http://colivre.coop.br/Aurium/InkscapeGenerator

with the proviso that I have not used it myself, and it may be a bit out of date.

tom.


Return to “SVG / XML Code”