Open tzographos opened 2 years ago
Hi! That doesn't surprise me, as the library does not contain a native WASM assembly... To allow this, one would need to recompile everything (starting from MuPDF itself) targeting WASM. This should not be impossible, but I have never tried it; maybe I will get around to it in the future 😅
Let's leave this open until I have a chance to give it a go and see if it is feasible.
I used emscripten to produce the output in wasm. It worked, and I was able to add the native dependency. But I was still receiving the dll missing error. Yeah, I think it needs a little rework.
The thing is that MuPDFCore uses the MuPDFWrapper DLL, which uses the MuPDF library... I don't know if that's what you did, but I think you would need to compile both MuPDF and MuPDFWrapper using Emscripten.
I have never done this before though, so I'm not sure exactly what's needed... I will get experimenting if I have some time!
I have had a look at this, and I don't think this is likely to work easily... I have managed to compile a WASM MuPDF, but it seems that not all of the API are there; in fact, even their WASM/JavaScript version has a relatively limited number of functions (https://github.com/ArtifexSoftware/mupdf-wasm).
In particular, my call to fz_create_context
fails; I'm not sure if there's something wrong on my end, but I don't really have time to investigate further.
Hello, I am trying to install the library to a Blazor WebAssembly project in .NET 6.0, and I am getting the error of a missing
MuPDFWrapper
dll.Do you have any ideas?
edit: I need to mention that I even tried adding the library as a blazor native dependency (using
NativeFileReference
) but the error persisted.