Skip to content

OLE2 signature is invalid // ruby script conversion error #9

@dasanb

Description

@dasanb

We are trying to convert MathType binary files to MathML from a Docx file, while converting the MathType binary file (eg: image1.wmf), the below error is thrown,

Code Used:

mathml = MathTypeToMathML::Converter.new('image3.wmf').convert

Error:

base.rb:378:in `validate!': OLE2 signature is invalid (Ole::Storage::FormatError)

        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ruby-ole-1.2.12.2/lib/ole/storage/base.rb:370:in `initialize'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ruby-ole-1.2.12.2/lib/ole/storage/base.rb:112:in `new'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ruby-ole-1.2.12.2/lib/ole/storage/base.rb:112:in `load'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ruby-ole-1.2.12.2/lib/ole/storage/base.rb:79:in `initialize'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ruby-ole-1.2.12.2/lib/ole/storage/base.rb:85:in `new'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ruby-ole-1.2.12.2/lib/ole/storage/base.rb:85:in `open'
        from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/mathtype-0.0.8/lib/mathtype.rb:12:in `initialize'
        from D:/Tool_Development/XSweet/wmf-test/mathtype_to_mathml/lib/mathtype_to_mathml.rb:12:in `new'
        from D:/Tool_Development/XSweet/wmf-test/mathtype_to_mathml/lib/mathtype_to_mathml.rb:12:in `initialize'
        from test.rb:3:in `new'
        from test.rb:3:in `<main>'

MathType_WMF_images.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions