Re: Inkscape-user digest, Vol 1 #926 - 13 msgs
![](https://secure.gravatar.com/avatar/f03c3582df0a71588e8de9a5f93faba2.jpg?s=120&d=mm&r=g)
Is it possible to set layer visibility on the command line for the purpose of png export from the command line? Say I have a multi-lingual document, where I have language layers. When I export to png (or print), I only want to see one language at a time on the final picture. Can this be done on command line along with -e?
Yes, if you know the id of the layer you want to show. See --export-id and --export-id-only in 'man inkscape'.
Hi Bulia,
I tried that, without success. My "layer3" object is set be invisible ("display:none"), so from the command line I did: inkscape file.svg --export-id "layer3" --export-png t.png
The document was printed to t.png - cropped to the size of the layer3 object, and the layer3 is still invisible :-(. In any case, I do not want to id the layers, I want to use their name, it is easier, i.e. the_name in inkscape:label="the_name".
How would I turn off a layer for printing via a command line without ever entering the GUI? I could write a script and output to temp files... then invoke inkscape.
Thanks, Martin
![](https://secure.gravatar.com/avatar/bb65b6b3a109d97cf9f8d6c014ede042.jpg?s=120&d=mm&r=g)
On 1/16/06, Martin d Anjou <point14@...1487...> wrote:
The document was printed to t.png - cropped to the size of the layer3 object, and the layer3 is still invisible :-(.
It's a good idea to enable --export-id to enable it to unhide the specified objects if they are hidden. For that, all you need to do is SP_ITEM(object)->setHidden(false).
In any case, I do not want to id the layers, I want to use their name, it is easier, i.e. the_name in inkscape:label="the_name".
Right, so it makes sense to add --export-label which would work exactly the same as --export-id except take a list of labels instead of list of objects.
How would I turn off a layer for printing via a command line without ever entering the GUI? I could write a script and output to temp files... then invoke inkscape.
Yes you can make a script removing display:none from the style= of the objects, but it would be better for everyone if you enable Inkscape do this automatically :)
-- bulia byak Inkscape. Draw Freely. http://www.inkscape.org
![](https://secure.gravatar.com/avatar/54b74d89aab7fc5107207e891bf24900.jpg?s=120&d=mm&r=g)
bulia byak wrote:
In any case, I do not want to id the layers, I want to use their name, it is easier, i.e. the_name in inkscape:label="the_name".
Right, so it makes sense to add --export-label which would work exactly the same as --export-id except take a list of labels instead of list of objects.
Why not give layers the label as ID?
Regards,
![](https://secure.gravatar.com/avatar/bb65b6b3a109d97cf9f8d6c014ede042.jpg?s=120&d=mm&r=g)
On 1/17/06, Aaron Digulla <digulla@...310...> wrote:
Why not give layers the label as ID?
They serve different functions. The ID must be unique but can be absolutely meaningless. The label can be non-unique (so, --export-label=label has to export ALL objects with that label, which may be more than one) but it must be meaningful to the user.
-- bulia byak Inkscape. Draw Freely. http://www.inkscape.org
participants (3)
-
Aaron Digulla
-
bulia byak
-
Martin d Anjou