inkscape programming api

Using Inkscape with other software? Talk about it here.
abentov
Posts: 1
Joined: Thu Apr 08, 2010 7:09 am

inkscape programming api

Postby abentov » Thu Apr 08, 2010 7:29 am

hi,

i am a programmer and i am looking for a way to do the following:

1. i have a .svg file, containing paths, texts, and other svg elements. it's a complex document, containing layers and groups
2. my goal is to 'crop' a small rectangular part of the whole document (not just hide the rest, but remove it)
3. i need to do this programmatically.

via the gnome/graphical ui i managed to do what i need with a single path. i added a rectangle over it, selected both and then used path > intersection. finally file>document properties>fit document to selection.

my question is:

can some one let me know if i can do a similar thing programmatically? for that i'll need several things.

-a linkscape programming api
-documentation if such an api exist
-probably a simple example of opening a .svg document, modifying it and saving it.

i've checked the linkscape manual for command-line options, but they are mainly for exporting and resizing documents. iterating layers and objects and path operations (intersect) are not part of the command-line.

thanks in advance,
albert

ps if there is a developer forum related to linkscape - i'd be glad to know

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: inkscape programming api

Postby prkos » Thu Apr 08, 2010 7:37 am

Start at the FAQ entry http://wiki.inkscape.org/wiki/index.php ... nd_line.3F

There is no dev forum, discussions are held on the dev mailing list http://www.inkscape.org/mailing_lists.php?lang=en
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download


Return to “Inkscape & other”