Author Topic: Remote Controlling Inkscape or using some kind of Inkscape Library?  (Read 2738 times)

April 28, 2017, 03:05:53 AM
Read 2738 times

WhyLee

  • Newbie

  • Offline
  • *

  • 1
Hallo Guys!

First of all thanks to all developers and supporters of Inkscape. I think it is a great tool!

Second: My Use case:

I am a software developer (c# on pc and c on embedded devices) and do not have good skills at designing nice graphics but i tried very hard to make two demo sheets for a menu for a restaurant of a friend and i think the result is ok.
i cut out a piece so that you don't see for which restaurant it is but see how it looks and is composed and attached it to this message (have fun).
(well, sadly my female friend that owns the restaurant does not have the same kind of humor that i have)

Now, everyone can imagine that there are changes in a menu of a restaurant - maybe daily or weekly with a dish of the day.
And for that inkscape is probably not the right tool of choice cause it is lot of work to change the menu or some items on it.
And you can also imagine that the person of a restaurant who decides what is the new dish of the day does not want to fiddle around one hour for the new menu page.

So it came to my mind that some kind of helping program with some kind of database support would be nice that uses some kind of inkscape template SVG-file and adds in the new menu items for the new updated menu page. It is perfect that the SVG file is some sort of xml so that there is a very good structure.

my question now is: is there some kind of library dll that i can include in a c# program to read and write the svg file so that i have c# objects or c++ objects to generate the new pages from a template?

in my example in the attachment you can see "Appetizers & Snacks" which is a head line for a new menu section.
the you see a menu entry that consists of a white translucent bar, a head line "Noname Vegetable" and some text and the price for it and a graphic.
in this case the white bars are of fixes size that make it easy for a program to add additional menu entries where the text needs to be entered in a way that it fits properly into that white bar.

question number two: is there a way to get a good feedback of the inkscape font renderer somehow to see what size the text "perfect as a snack inbetween or as a side dish" has?
so that the program can automatically determine if the desired text fits into the white bar.

or maybe there is way that i just render the white bar without the whole page and then the user can see, if it fits?

thanks for your thoughts and for your help!!






April 28, 2017, 06:52:38 PM
Reply #1

Moini

  • IC Mentor

  • Offline
  • ******

  • 1,568
    • VektorRascheln
I think you may be looking for the Inkscape generator extension: http://wiki.inkscape.org/wiki/index.php/Extension_repository#Generator (be sure to take a look at the linked helper files).

If you prefer doing this from an outside program, I can only say that I have no clue about c# modules - python has some nice xml editing modules, though. I like beautifulsoup a lot :)

For the size adjustment of fonts, you'd probably need to use the command line to query the object's width, and then try out different font sizes until it fits. See also: https://inkscape.org/doc/inkscape-man.html . This could also be accomplished from inside the extension.

April 29, 2017, 05:07:51 AM
Reply #2

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Welcome to the forum!

What you're asking is over my head.  But as much as I love Inkscape, for a menu, I would probably be thinking Scribus (open source desktop publishing).  Because most of the images will be photos, rather than  vector drawings, right?  Scribus is SVG compatible....although with my limited understanding of the technical side of Inkscape, I don't know if Inkscape's libraries are compatible with Scribus.  I guess they might share some libraries??
  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann