Might I suggest that a searching would be a really useful feature. From my limited knowledge about MuPDF there seems to be such API available. http://www.mupdf.com/news[^]
When I first looked at this project a while ago, it appeared to me that had to build my application to only support x86. But after a closer look I can now see that it provides a x64 libmupdf.dll as-well. That's really great as I can continue as AnyCPU and only making sure that the correct libmupdf is in the path at runtime.
I am amazed as I could not see any official build on mupdf or SumatraPDF in x64.
it's a bit hard to tell from here, what is the source of the problem.
From your DllNotFoundException it seems that there is a problem with a DllImportAttribute (http://msdn.microsoft.com/en-us/library/system.dllnotfoundexception.aspx[^])
Does the libmupdf.dll is in the same directory as the moonpdflib.dll and your application?
What Service Pack do you have on your Windows XP?
It appears, that the included libmupdf.dll is not working properly in Windows XP.
A quick fix is to use the libmupdf.dll from this article (Rendering PDF Documents with Mupdf and P/Invoke in C#[^]) which stems from the SumatraPDF guys.
So download the zip from the mentioned article and copy the libmupdf.dll over the one from moonpdf and it should work.
But note that this will only work in a x86 environment, because the libmupdf.dll from the article is x86.
I have no clue, why my compiled libmupdf.dll doesnt work in Windows XP or what causes the problem. I will have to investigate, when I find the time.
I recompiled the libmupdf.dll for x86 and x64 and it seems that there was a problem with the old x86 version, which caused a problem on Windows XP.
Anyway, now the libmupdf.dll is updated in the article downloads and in the versions on sourceforge.
So it should work fine on Windows XP.
I really like this library it works well and is very performant (If you have tried any of the commercial WPF PDF libraries you know that they are dog slow - at least the ones I have tested).
Anyway, it seems that when using MoonPdf with High DPI, the text is barely readable.
Warning:The referenced component 'MoonPdfLib' could not be found. yashvi_rsy
3 May '13 - 22:07
We are using OS Windows7 64 Bit.
I had downloaded x64bit binary.
While adding refernce to my vb.net project it prompts warning msg:"Warning -The referenced component 'MoonPdfLib' could not be found."
My project is set to "Any CPU" option
Am I doing somthing wrong?
you can not use the AnyCpu target, because the native dll from MuPdf (libmupdf.dll) is compiled as x64 in the x64 version of MoonPdfLib. If you set your target to x64 it will work. The same applies for the x86 versions.
I hope this helps.
Hello,
I got the solution.
Although I had configured project with "Any CPU" or "X64" it was prompting error.
Then I had changed framwork from .net 3.5 to .net4 and now a am able to give refernce.
Dear Daniel,
Your Link "All Binaries (x86 and x64)" contanies only binaries [In the MoonPdf-0.2-x86 Folder].
We are using windows 7 64 Bit OS.
so while adding x86 reference to MoonPdfLib.dll it prompts following error: "The referenced component 'MoonPdfLib' could not be found."
Kindly upload x64 bit binary ASAP.
Regards,
Dhaval
Please put the download files on CodeProject (as well) instead of linking to external sites.
Its the man, not the machine - Chuck Yeager
If at first you don't succeed... get a better publicist
If the final destination is death, then we should enjoy every second of the journey.