File types

From Inkscape Wiki
Revision as of 00:48, 24 January 2005 by BryceHarrington (talk | contribs) (Adding writeup on sxd2svg)
Jump to navigation Jump to search

We need EPS, Adobe SVG, and PDF in/out support. We really need to import/export the following formats:

  • EPS
  • PDF
  • Adobe SVG (must be interoperable!)
  • Postscript
  • Adobe Illustrator File Formats (Newer ones are PDF 1.4 documents)

To really be considered a successful application, we must take these file formats in and be able to save them out.

Other useful formats might be:

  • Enhanced Windows Metafile (emf)
  • Computer Graphics Metafile (cgm)

Existing Conversion Tools

Scripts and other applications that provide conversions, and might be useful to investigate as solutions to this dilemma.

OpenOffice OODraw-to-SVG

OpenOffice can export *to* SVG, although it does not import SVG. Possibly a filter could be created for Inkscape from their code, to enable at least being able to load OODraw's SXD file format into Inkscape.

Browsing through OO's sourcecode, this appears to be the parts that do the SVG writing:

OpenOffice/filter/source/svg

SOTranscoder.java  svgfilter.cxx      svgimport.cxx  svgwriter.hxx
exports.map        svgfilter.hxx      svgscript.hxx
makefile.mk        svgfontexport.cxx  svguno.cxx
svgexport.cxx      svgfontexport.hxx  svgwriter.cxx

You can download the OpenOffice sourcecode from one of the OpenOffice mirrors. E.g.:

http://www.mirror.ac.uk/downloads/sunsite.dk/openoffice/contrib/rc/1.1.4rc/OOo_1.1.4rc_source.tar.gz

There is a webpage with some info about a new SVG exporter, here:

http://graphics.openoffice.org/svg/svg.htm

This includes a java sample test, that could perhaps be used as a starting point for a filter...

http://graphics.openoffice.org/svg/SVGExportTest.java

Perhaps that could be recast into C++ so that a compiled filter could be made of it.

The page also includes a binary svgexport.so package. Perhaps if this is fairly stand-alone, a filter program could be written in C++ based on the above java testcode that links against svgexport.so and provides its functionality on the commandline as a sxd2svg tool.