CairoSVG icon indicating copy to clipboard operation
CairoSVG copied to clipboard

Cannot export objects with a specified id

Open guillerodriguez opened this issue 3 years ago • 5 comments

I have a svg document that contains an icon set. For each icon there is a rect with a specific id that defines the bounding box of the icon to be exported. With inkscape I can export individual icons as follows:

inkscape --export-filename icon101.png --export-id=icon101 all_icons.svg

Is this possible with CairoSVG? I have noticed that I can add a #fragment to the input file/url, and was hoping I could use this to specify the id of the object to export, but that fails:

$ cairosvg -f png -o icon101.png 'all_icons.svg#icon101'

Traceback (most recent call last):
[...]
TypeError: Root node is rect. Should be one of marker, svg, image, or g.

Is this use case supported?

guillerodriguez avatar Jun 17 '21 06:06 guillerodriguez

Thanks a lot for the issue, it would be interesting indeed.

liZe avatar Jul 12 '21 13:07 liZe

@liZe PR #351 implement this feature.

guillerodriguez avatar Jan 24 '22 07:01 guillerodriguez

@liZe Ping

guillerodriguez avatar Feb 24 '22 09:02 guillerodriguez

Hello!

As you may have noticed, CairoSVG isn’t a full-of-life project and it hasn’t seen much activity for a year…

For a long time, CairoSVG was used by WeasyPrint. To render SVG, PNG or PDF, CairoSVG depends on Cairo, which brought many bugs and limitations in WeasyPrint (and CairoSVG). This led us to remove the Cairo dependency from WeasyPrint, and so to remove the CairoSVG dependency.

Since then, we didn’t do really much on CairoSVG. And, to be honest, we’re not sure about what to do with this project 🤔.

A lot of questions have emerged in our heads. Can it still be a CourtBouillon project, shall we entrust it to someone else? Do people actually expect new features, or only bug fixes? Maybe people don’t expect anything?

And in fact, we can’t answer these questions all by ourselves because we’re not you, we’re not the people using CairoSVG.

So, to know you, your use of CairoSVG and your expectation about the project, we prepared a (short, don’t worry) survey.

Your answers to this survey will help us a lot to come up to a decision about CairoSVG.

The survey is open until the end of April!

The CourtBouillon Team 🍲

Edit: the survey is now closed. Results will be publish soon!

grewn0uille avatar Mar 07 '22 10:03 grewn0uille

Hello!

The results of the survey have been published! You can discover where CairoSVG is going in our latest blog article 📰.

The CourtBouillon Team 🍲

grewn0uille avatar May 19 '22 09:05 grewn0uille