Module: Asposediagramjava::ExportToSvg
- Defined in:
- lib/asposediagramjava/Export/exporttosvg.rb
Instance Method Summary collapse
Instance Method Details
#initialize ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/asposediagramjava/Export/exporttosvg.rb', line 3 def initialize() data_dir = File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) + '/data/' # Call the diagram constructor to load diagram from a VSD file diagram = Rjb::import('com.aspose.diagram.Diagram').new(data_dir + "Drawing.vsd") # Save as SVG diagram.save(data_dir + "Diagram.svg", Rjb::import('com.aspose.diagram.SaveFileFormat').SVG) puts "Exported visio diagram to SVG." end |