Method: IsoDoc::WordFunction::Body#svg_to_emf
- Defined in:
- lib/isodoc/word_function/inline.rb
#svg_to_emf(node) ⇒ Object
45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/isodoc/word_function/inline.rb', line 45 def svg_to_emf(node) return unless node["mimetype"] == "image/svg+xml" uri = node["src"] %r{^data:}.match(uri) and uri = save_dataimage(uri) ret = svg_to_emf_filename(uri) File.exists?(ret) and return ret exe = inkscape_installed? or return nil system %(#{exe} --export-type="emf" #{uri}) and return ret nil end |