You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got a PDF file which has required headers and pdf objects for rendering page #1 (but lacking other page objects, total 16 pages). I can use other PDF viewers (such as Adobe reader or Foxit Reader) to open the pdf and read the page #1. I can also mupdf win32 viewer to read page #1. However, when I use the MuPDF.WinRT to draw page #1, it throws an unknown exception. Since the mupdf win32 viewer can read the pdf successfully, I guess MuPDF.WinRT do more checking so that it failed to read the pdf. Would you please help to skip the checking so that it can render the partial pdf file as mupdf win32 viewer can do?
I'd like to upload the partial pdf for reference, but don't know how to do it. Please let me know how to give the partial pdf to you if needed. Thanks.
The text was updated successfully, but these errors were encountered:
Hi,
I got a PDF file which has required headers and pdf objects for rendering page #1 (but lacking other page objects, total 16 pages). I can use other PDF viewers (such as Adobe reader or Foxit Reader) to open the pdf and read the page #1. I can also mupdf win32 viewer to read page #1. However, when I use the MuPDF.WinRT to draw page #1, it throws an unknown exception. Since the mupdf win32 viewer can read the pdf successfully, I guess MuPDF.WinRT do more checking so that it failed to read the pdf. Would you please help to skip the checking so that it can render the partial pdf file as mupdf win32 viewer can do?
The following is my code in c#:
StorageFile dlFile = await ApplicationData.Current.LocalFolder.GetFileAsync("partial.pdf");
IBuffer pdfBuffer = await FileIO.ReadBufferAsync(dlFile);
Document pdfDocHandle = Document.Create(pdfBuffer, // - file
DocumentType.PDF, // type
150); // - dpi
try
{
MuPDFWinRT.Point sizeP = pdfDocHandle.GetPageSize(1);
WriteableBitmap tmpBmp = new WriteableBitmap(sizeP.X, sizeP.Y);
pdfDocHandle.DrawPage(1, tmpBmp.PixelBuffer, 0, 0, sizeP.X, sizeP.Y, false);
tmpBmp.Invalidate();
imgPdf.Source = tmpBmp;
}
catch (Exception ex)
{
Debug.WriteLine("MuPDF error on showing page:1, ex=" + ex.Message);
}
I'd like to upload the partial pdf for reference, but don't know how to do it. Please let me know how to give the partial pdf to you if needed. Thanks.
The text was updated successfully, but these errors were encountered: