export-id must work for export to svg

Bug #171230 reported by Bug Importer
32
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Medium
Martin Owens

Bug Description

trying to export only one id into an svg files doesn't
work.

 inkscape -i myid -j -e test.png manyids.svg

works, but the similar

inkscape -i myid -j -l test.svg manyids.svg

gives

** (inkscape:2056): WARNING **: No export filename
given and no filename hint. Nothing exported.

and test.svg ends up as a copy of the input file.

Tags: cli exporting
Revision history for this message
Hans Ulrich Niedermann (ndim) wrote :

This looks a little older. Has there been any work on this in the mean time?

Revision history for this message
Hans Ulrich Niedermann (ndim) wrote :

I can confirm this.

I have a simple inkscape SVG file with two groups side by side. One group has ID aaa, and the other bbb.

+ inkscape -z --export-ps=export-test.ps --export-id=aaa export-test.inkscape.svg

** (inkscape:21481): WARNING **: No export filename given and no filename hint. Nothing exported.

** (inkscape:21481): WARNING **: Could not set export-bbox-page option for this export.
+ inkscape -z --export-eps=export-test.eps --export-id=aaa export-test.inkscape.svg

** (inkscape:21488): WARNING **: No export filename given and no filename hint. Nothing exported.
+ inkscape -z --export-pdf=export-test.pdf --export-id=aaa export-test.inkscape.svg

** (inkscape:21494): WARNING **: No export filename given and no filename hint. Nothing exported.
+ inkscape -z --export-plain-svg=export-test.svg --export-id=aaa export-test.inkscape.svg

** (inkscape:21499): WARNING **: No export filename given and no filename hint. Nothing exported.
+ inkscape -z --export-png=export-test.png --export-id=aaa export-test.inkscape.svg
Background RRGGBBAA: ffffff00
Area 77:536:154:618 exported to 77 x 82 pixels (90 dpi)
Bitmap saved as: export-test.png

This is with Fedora's inkscape-0.45.1-1.fc7 package.

Changed in inkscape:
status: New → Confirmed
Revision history for this message
Hans Ulrich Niedermann (ndim) wrote :
Revision history for this message
Hans Ulrich Niedermann (ndim) wrote :
Revision history for this message
Hans Ulrich Niedermann (ndim) wrote :

I have just confirmed the same failures with SVN trunk rev 16636.

Revision history for this message
jimmac (jimmac) wrote :

Being able to generate ('crop') SVGs using --export-id would be extremely useful.

jazzynico (jazzynico)
Changed in inkscape:
status: Confirmed → Triaged
su_v (suv-lp)
tags: added: cli
Revision history for this message
su_v (suv-lp) wrote :

Proposing to convert bug report into feature request: As described in the man page of inkscape, '--export-id' only works with PNG, PS, EPS and PDF export (state of current stable release 0.48.x):

<quote>
-i ID, --export-id=ID

    For PNG, PS, EPS, and PDF export, the id attribute value of the object that you want to export from the document; all other objects are not exported. By default the exported area is the bounding box of the object; you can override this using --export-area (PNG only) or --export-area-page.
</quote>

Related (imho duplicate) newer report:
- Bug #1191783 “-export-id does not work for plain-svg output”
  <https://bugs.launchpad.net/inkscape/+bug/1191783>

AFAIU this request likely needs further investigation wrt handling of complex | nested | inherited SVG features (e.g. clips/masks, transformations (on parent containers), referenced resources in the <defs> section, original of clones, internal style sheets etc).

Revision history for this message
Jakub Steiner (jimmac-redhat) wrote :

Martin addressed the bug in http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/13268, however there is still one obstacle to overcome - in some cases the object is offset outside of the cropped canvas, creating a "blank" svg output.

Test case:
Using https://git.gnome.org/browse/gnome-icon-theme-symbolic/plain/src/gnome-stencils.svg?h=wip/avoid-verbs

`inkscape -z -l face-uncertain-symbolic.svg -i g4928 -j src/gnome-stencils.svg`

Will create an apparently "blank" svg, but the group/path in question is there, offset to the bottom right.

Revision history for this message
su_v (suv-lp) wrote :

@jimmac - the issue introduced with r13268 is tracked in
- Bug #1306662 “trunk: '-i -j' for plain SVG export fails to fit page size correctly (rev >= r13268)”
  <https://bugs.launchpad.net/inkscape/+bug/1306662>

Revision history for this message
su_v (suv-lp) wrote :

Initial implementation committed in rev 13268:
<http://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/13268>

Follow-up report: bug #1306662

Changed in inkscape:
assignee: nobody → Martin Owens (doctormo)
milestone: none → 0.91
status: Triaged → Fix Committed
Revision history for this message
su_v (suv-lp) wrote :

Follow-up report to track update of documentation: bug #1310266

su_v (suv-lp)
summary: - export-id must work for export to svg, pdf
+ export-id must work for export to svg
Changed in inkscape:
status: Fix Committed → Fix Released
Revision history for this message
Jakub Steiner (jimmac-redhat) wrote :

I'm still getting the artwork offset when exporting. I'll attach the test case SVG

Revision history for this message
Jakub Steiner (jimmac-redhat) wrote :

This is the "source" master plate I want to export with:

inkscape -f gnome-stencils.svg -l folder.svg -i g4958 -j

Revision history for this message
Jakub Steiner (jimmac-redhat) wrote :

the result of the previous operation: a blank canvas, with the object offset down below.

Revision history for this message
su_v (suv-lp) wrote :

On 2015-02-20 17:02 (+0100), Jakub Steiner wrote:
> I'm still getting the artwork offset when exporting. I'll attach the
> test case SVG

As already replied last time: known issue tracked in
- Bug #1306662 “trunk: '-i -j' for plain SVG export fails to fit page size correctly (rev >= r13268)”
  https://bugs.launchpad.net/inkscape/+bug/1306662

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.