I am trying to convert MathType's equation which is stored as OLE binary file to MathML using MathType's SDK.
The input file for my program is a DocX which would contain embdedd MathType equations. I am looking for a solution thats independent of using MS Word. DocX is a zip file, and once it is extracted we can find the a binary file for each OLE object in the folder "word/embeddings/". Typically the file name would be oleObject1.bin, oleObject2.bin etc.
When I checked with MathType SDK it has a class "ConvertEquation" which has following method:
virtual public bool Convert(EquationInput ei, EquationOutput eo)
EquationInput is an abstract class for which following concrete classes are made available:
EquationInputFileText
EquationInputFileWMF2
EquationInputFileWMF
EquationInputFileGIF
EquationInputFileEPS
In the above listed classes none of them seems to support OLE binary.
According to MathType's SDK doc, MTEF data is saved as the native data format of the object. Whenever an equation object is to be written to an OLE "stream", a 28- byte header is written, followed by the MTEF data. I guess this is exactly what is present in this binary file. But just that there seems to be no way by which this format can be made to be used by SDK to convert it into MathML. Any thoughts?
Thanks