Svg to Eps by id

Post questions on how to use or achieve an effect in Inkscape.
artistademacrado
Posts: 2
Joined: Fri Jan 04, 2019 6:28 am

Svg to Eps by id

Postby artistademacrado » Fri Jan 04, 2019 8:18 am

Hello there,
Im trying to export several .eps files from one .svg file by Id, for example:
given this .svg file (source: https://lovesvg.com/2019/01/heart-gifts-8370/):

and the following command:

Code: Select all

inkscape Heart_gifts.svg --export-id=path4 --export-eps=heartobject.eps

i obtain this:
heartobjectEPS.zip
I cant upload .eps file so i compressed it
(1.71 KiB) Downloaded 122 times


My issue is that im trying to export all the content within the boundaries of the given id not only the object, so far i have no idea how to accomplish this:
heartobject.png
wanted result but in png :(
heartobject.png (7.99 KiB) Viewed 932 times

I can export from .svg to .png and then to .eps but the loss of quality is large, and because im working on a script to do this process i dont want a dialogue box everytime i export from .png to .eps:
dialogue box.jpg
dialogue box
dialogue box.jpg (108.98 KiB) Viewed 932 times

I have no idea why im getting this dialogue box, i tried ussing -z, --without-gui but it doesnt seems to work, neither doing the same process on inkscape -z --shell.

Can you help me with my first problem? (.svg to .eps by id exporting all the content within the boundaries limits of the id object)
It seems like an easy problem but i havent found a solution googling it :(
thanks :), sorry for my english.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Svg to Eps by id

Postby Moini » Sat Jan 05, 2019 10:45 am

Click on 'No volver a preguntar' to not get the dialog box again.

--id-only should be required to get the result you get... weird.

Yes, I agree, this is a bug.

Can you check out the bug reports at https://bugs.launchpad.net/inkscape and see if there is one for this already? I couldn't find one, but who knows. If there isn't one, please create a new one for this.

To workaround your issue, can you query the object's location and width and height with query-all, and then try if exporting that area with export-area works? This will then need a two-step approach, calling Inkscape twice per file.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

artistademacrado
Posts: 2
Joined: Fri Jan 04, 2019 6:28 am

Re: Svg to Eps by id

Postby artistademacrado » Sun Jan 06, 2019 7:03 am

Moini wrote:Click on 'No volver a preguntar' to not get the dialog box again.

Image
whether or not i fill the checkbox the dialogue box continues showing. :(

Moini wrote:--id-only should be required to get the result you get... weird.
Yes, I agree, this is a bug.

Can you check out the bug reports at https://bugs.launchpad.net/inkscape and see if there is one for this already? I couldn't find one, but who knows. If there isn't one, please create a new one for this.

Ok, ill look around.

Moini wrote:To workaround your issue, can you query the object's location and width and height with query-all, and then try if exporting that area with export-area works? This will then need a two-step approach, calling Inkscape twice per file.

I can query objects location and obtain the objects rectangle area but export-area is bitmap export only ( png (?) ) so it doesnt work with eps export.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Svg to Eps by id

Postby Moini » Sun Jan 06, 2019 7:52 am

Upon re-reading the man page, I think it's impossible to get the desired result with eps without cutting the objects to fit the viewbox. It seems to allude that eps does not support objects that extend over its page borders.

If they all don't have a stroke but only a fill, you could cut them with a rectangle that you create, that covers the area that you want to cut, and then use https://gitlab.com/su-v/inx-pathops to do a multiple cut through all of them (by selecting all objects, with the new rectangle on top).

It's rather complex, but if you really need this...

Or, make a bitmap copy with a sufficient resolution and trace it.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)


Return to “Help with using Inkscape”