nlplab / brat

brat rapid annotation tool (brat) - for all your textual annotation needs
http://brat.nlplab.org
Other
1.82k stars 509 forks source link

PNG, PDF (PS, EPS, ...) export #500

Closed spyysalo closed 12 years ago

spyysalo commented 12 years ago

As the SVGs exported by recent versions of the system are (largely) offset-compatible with inkscape rendering, we have an opportunity to add support for export into a large variety of formats with very little effort on systems where inkscape is installed.

Even my ancient version of inkscape supports SVG -> PNG, PDF, PS and EPS conversion on the command line, and the SVG -> PNG conversion makes it possible to convert to any number of bitmap formats on systems with e.g. imagemagick installed.

This would be immediately useful to me in work on the manual page, easy to do, and a nice feature to have for the demo submission.

spyysalo commented 12 years ago

Hey, issue #500! Do I win a prize?

spyysalo commented 12 years ago

This might work, but inkscape seems to be failing on my machine. @ninjin: would you mind giving this a try? Just add

SVG_TO_PNG_COMMAND = 'inkscape --export-area-drawing --without-gui --file=%s --export-png=%s'

to your config.py, open the data dialog, and try to download the PNG.

spyysalo commented 12 years ago

Nevermind, the issue was the my version of inkscape required the directory ./gnome2 in the apache home directory to work. Works for me now.