I've been examining our options for importing postscript without requiring a bajillion evil dependencies, and I think I've arrived at a plan.
1) write a postscript to SVG converter in Postscript and use that for our Postscript importer
2) write a bare-bones standalone Postscript interpreter (doesn't need to implement any rendering, just provide a dummy postscipt device) and ship it with Inkscape
Until #2 is finished, we can run the converter using Ghostscript, which is still two fewer dependencies than before.
I've got prototypes for both #1 and #2 in CVS in the module 'ps3convert'.
The prototype interpreter is written in Ruby and isn't really functional yet, but the converter (currently encapsulated in the ps-svg shell script) already works for the basic stuff.
Running the converter:
./ps-svg blah.ps > blah.svg
Caveats with the converter:
* it's a proof-of-concept; hence the code is horribly ugly
* it doesn't yet do text, gradients or clipping paths
* the image in the output SVG appears above the top of the page, so you have to scroll up to see it
Also one last caveat: I'm not promising any timetables on this stuff. So don't bug me to finish it. You'll probably find giving me patches to be the more productive alternative.
-mental
Hi,
I miss in your list: 3) write a own postscript to svg importer linked in the inkscape source
this is some similar to your #2 but the code is not a script but linked into inkscape. If you write in ruby that is not linked to inkscape I see some problems on systems where ruby is not installed ...
Anyway I like the idea of direct import ps (and pdf ;-))
HTH,
Adib.
MenTaLguY schrieb:
I've been examining our options for importing postscript without requiring a bajillion evil dependencies, and I think I've arrived at a plan.
- write a postscript to SVG converter in Postscript and use that for
our Postscript importer
- write a bare-bones standalone Postscript interpreter (doesn't need to
implement any rendering, just provide a dummy postscipt device) and ship it with Inkscape
Until #2 is finished, we can run the converter using Ghostscript, which is still two fewer dependencies than before.
I've got prototypes for both #1 and #2 in CVS in the module 'ps3convert'.
The prototype interpreter is written in Ruby and isn't really functional yet, but the converter (currently encapsulated in the ps-svg shell script) already works for the basic stuff.
Running the converter:
./ps-svg blah.ps > blah.svg
Caveats with the converter:
it's a proof-of-concept; hence the code is horribly ugly
it doesn't yet do text, gradients or clipping paths
the image in the output SVG appears above the top of the page, so you
have to scroll up to see it
Also one last caveat: I'm not promising any timetables on this stuff. So don't bug me to finish it. You'll probably find giving me patches to be the more productive alternative.
-mental
On Sun, 2005-05-01 at 05:31, Adib Taraben wrote:
this is some similar to your #2 but the code is not a script but
linked into inkscape. If you write in ruby that is not linked to inkscape I see some problems on systems where ruby is not installed ...
I'm doing the prototype in Ruby since I'm several orders of magnitude more productive in that language. If it works out, I'd port it to C++ and integrate it with the main codebase.
-mental
participants (2)
-
Adib Taraben
-
MenTaLguY