Groups > Asp .Net > ASP.NET components > Re: mimetex




mimetex

mimetex
Fri, 21 Mar 2008 16:33:02 +000
Has any body used mimetex in an asp.net application? I tried to follow the
instructions from http://www.codeproject.com/KB/dotnet/Eq2Img.aspx  and
http://www.forkosh.com/mimetexmanual.html#build but it doesnt seem to work. I
wanted to follow the example of just having mimetex.cgi file and passing it your
equation. But it doesnt seem to produce any image at all.

Basically this is what i did

I put my mimetex.dll and mimetex.exe in a bin and passed it arguments as 
suggested by the first link i provided, but there was no output image
generated.

Does anybody know how to use mimetex write? i believe i wasnt doing it the write
way.
Post Reply
Re: mimetex
Sun, 23 Mar 2008 23:20:21 +000
Ok i had some success in compiling the example code the guy provided. But i
still dont get any images on my application. I tried to debug the application
ans there was a problem with the dll file he sad we should place in the bin
folder, in the working directory. I get this exception when i debug the
application. 

System.DllNotFoundException was unhandled by user code
  Message="Unable to load DLL 'MimeTex.dll': The specified module could not
be found. (Exception from HRESULT: 0x8007007E)"
  Source="App_Code.z0a8nkyw"
  TypeName=""
  StackTrace:
       at Astrila.Eq2Img.NativeMethods.CreateGifFromEq(String expr, String
fileName)    at Astrila.Eq2Img.ShowEq.CreateGifUsingInProc(HttpContext context,
String equation, String filePathForCachedEqImage, Eq2ImgSettings settings) in
E:\Documents and Settings\rtr104\Desktop\Eq2Img_all\VB.Net
Version\Eq2ImgVB\App_Code\ShowEq.vb:line 131    at
Astrila.Eq2Img.ShowEq.ProcessRequest(HttpContext context) in E:\Documents and
Settings\rtr104\Desktop\Eq2Img_all\VB.Net
Version\Eq2ImgVB\App_Code\ShowEq.vb:line 47    at
Astrila.Eq2Img.ShowEq.HandleEquationQueries() in E:\Documents and
Settings\rtr104\Desktop\Eq2Img_all\VB.Net
Version\Eq2ImgVB\App_Code\ShowEq.vb:line 309    at
Astrila.Eq2Img._default.Page_Load(Object sender, EventArgs e) in E:\Documents
and Settings\rtr104\Desktop\Eq2Img_all\VB.Net
Version\Eq2ImgVB\default.aspx.vb:line 19    at
System.Web.UI.Control.OnLoad(EventArgs e)    at
System.Web.UI.Control.LoadRecursive()    at
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint)
  InnerException: 

 Does any body have an idea as to were i could be going wrong ?? If what i am
doing is not clear, please somebody tell me.

Cheers in advance.............
Post Reply
Re: mimetex
Mon, 24 Mar 2008 01:37:53 +000
OK I managed to fix the code....

The main problem was here

 

<System.Runtime.InteropServices.DllImport("MimeTeX.dll")> _
Public Shared Function CreateGifFromEq(ByVal expr As String, ByVal fileName As
String) As Integer
End Function

  The above code looks for the dll module in the /c/windows/system32 folder.
Which is very wrong. It's supposed to look for the module in ~/bin/ ...

I dont know how i can get it to look for the module in the specified directory
ie bin because i am no VB guru... Anybody please help................
Post Reply
about | contact