
On Sat, 3 Apr 2004, Ted Gould wrote:
On Fri, 2004-04-02 at 08:49, Carl Hetherington wrote:
OK, so I just found the "Print Direct" option. So I think all that remains for EPS export is to add a bounding box to the file :-)
I'll take a look sometime unless anyone else wants to give me any hints ;-)
Well, I don't know much about EPS - but if adding a bounding box at the top is all you'd need I would recommend subclassing out the PrintPS class and overloading the 'begin' and 'init' functions. This will create an EPS printer, and I could help you hack that to make it a EPS output extension pretty easily.
Well, having looked at things again it seems that the code already writes a bounding box. I think there was a sodipodi patch that added this, and that it was incorporated into Inkscape.
Having tried exporting an Inkscape file to LaTeX (which is the reason I'm interested in all this) it all works fine. The only thing left is that I'd like an option to make the bounding box the size of the objects in the drawing, rather than the paper size. I don't think this is too hard, though.
I was thinking about implementing EPSI with the Ghostscript ps2epsi script, but it would be soo much better to have it be internal to Inkscape (rather than depending on Ghostscript).
AFAIK EPS is just PostScript with a specified bounding box and without certain PostScript operators (e.g. newpage, that sort of thing). It looks to me like Inkscape's PS output will actually qualify as EPS without any further work; especially since Inkscape doesn't have the concept of pages etc.
Hopefully I'll be able to work out a patch which gives the option of calculating EPS bounding boxes from the size of the a drawing's contents. Then Inkscape will truly be an alternative for the LaTeX user who wants to draw figures. Judging by my experiences and those of colleagues, this is a big "gap in the market".
Cheers
Carl