Closed gauravlohanilohani closed 10 years ago
Did you added refernce to MuPDF?
Best Regards, Misha Uliutin
Yes i have added the MuPDFWinRT in my project.
hmm, could you check please that you use right version of MuPDF for right platform? (ARM for ARM, x86 for x86)? You could find example there - https://bitbucket.org/mishauliutin/pdf-reader-for-wp8-public
Best Regards, Misha Uliutin
i used all platform version but still the problem is occurred.
i attached the error screenshots.
Thanks for your support...
hmm, Could you share your code by github/bitbucket/GoogleCode?
Best Regards, Misha Uliutin
shere my code with you plz check. i got the error on Document.creat() point. here is my code..
private void GetPageDataAndDraw(int reader, bool isDocumentMoving, int scaleFactor = 0) { using (var document = Document.Create(WindowsRuntimeBufferExtensions.AsBuffer(GetStreamData()), // - file GetDocumentType(), // type 160 + scaleFactor)) // - dpi { WriteableBitmap image = null; int sizeX = 0; int sizeY = 0;
MuPDFWinRT.Point size = document.GetPageSize(0);
sizeX = size.X;
sizeY = size.Y;
UISynchronizationContext.Instance.InvokeAndBlockUntilCompletion(delegate
{
image = new WriteableBitmap(size.X, size.Y);
});
pixels = image.Pixels;
try
{
if (Book.BookExtension == DataService.Objects.Enums.BookExtension.PDF)
document.DrawPage(0, pixels, 0, 0, sizeX, sizeY, false);
else if (Book.BookExtension == DataService.Objects.Enums.BookExtension.CBZ)
document.DrawPage((_currentPage - 1), pixels, 0, 0, sizeX, sizeY, false);
}
catch
{
//LoadPageFromIsolated(reader);
}
UISynchronizationContext.Instance.InvokeAndBlockUntilCompletion(delegate
{
data = null;
//task = null;
//GC.Collect();
try
{
image.Invalidate();
BindPage(reader, isDocumentMoving, image);
}
catch
{
}
});
document.Dispose();
}
//}
//catch { }
}
hey plz help me for my question?
Hi, sorry was in vocation, so, could you please check that .winmd file and the .dll file generated from the WinRT Component have THE SAME NAME (e.g: MuPDFWinRT.dll and MuPDFWinRT.winmd).
Then:
Add the .winmd medata file as a reference in your project. Check that the .winmd / dll files are in the same folder to be correctly loaded.
hi, i have check the name they are same but when i add refrence of MuPDFWinRT.winmd and run the project , then i see my Bin\ARM\Debug folder there is no .dll or .pdb file of MuPDFWinRT, so what can i do? need Help
does MuPDFWinRT.dll locate in the same folder as MuPDFWinRT.winmd(which you reference)?
yes
Could you create new simple project with MuPDFWinRT and share it source code?
hi when i create a new project both the files are correctly loaded in arm\debug folder, but in my current project they not loaded .. please suggest .
hi its solved now thanks for Your support. in my project 2 sub project in one of that subproject i used mupdf and build the sub project thats why the dll are not loaded, but when we build the main project the mupdfwinrt.dll correctly loded.
Hello sir i have download your "mishauliutin-pdf-reader-for-wp8-public" project When i m open any pdf file from SDCARD List then error message is and not open any pdf file Can not open file - testPath1.:( OK button please Solve my problem I am waiting Your replay thanks
Hello sir i have download your "mishauliutin-pdf-reader-for-wp8-public" project When i m open any pdf file from SDCARD List then error message is and not open any pdf file Can not open file - testPath1.:( OK button please Solve my problem I am waiting Your replay thanks
hello , I have a _navigation problem when i am try to open this function how to solve this problem _navigation is null public void OpenFile(IFileInfo fileInfo) {
if (IsLoading)
return;
_navigationService.UriFor<FileViewerPageViewModel>().WithParam(x => x.CurrentFileId, fileInfo.Id).Navigate();
}
I have getting the error :- Requested Windows Runtime type 'MuPDFWinRT.Document' is not registered.
Code is. using (var document = //getting error here Document.Create(WindowsRuntimeBufferExtensions.AsBuffer(GetStreamData()), // - file GetDocumentType(), // type 160 + scaleFactor)) // - dpi { //here my code }
plz solve this..