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
{{ message }}
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.
Using the Zoomable pdf viewer worked great at first, but then I noticed a small subsect of pdf that can't be display. I Looked around the code and the one thing I noticed is that CGPDFDocument is reading the file just fine, but when it is time to create the subsampling image the view shows a white page.
I exported the pdfs to pdf on my mac and now the file is bigger and they can be view on the device. Is it a compression issues? or is the formatting for the original pdf different?
// make the initial view 'fit to width'
CGRect pageRect = page.GetBoxRect (CGPDFBox.Media);
//scale = Frame.Width / pageRect.Width;
scale = Frame.Width / pageRect.Width;
pageRect.Size = new CGSize (pageRect.Width * scale , pageRect.Height * scale);
// create bitmap version of the PDF page, to be used (scaled)
// when no other (tiled) view are visible
UIGraphics.BeginImageContext (pageRect.Size);
CGContext context = UIGraphics.GetCurrentContext ();
//CGColorSpace colorSpace = CGColorSpace.CreateDeviceRGB();
//CGBitmapContext context = new CGBitmapContext(null, (int)pageRect.Size.Width, (int)pageRect.Size.Height, 8, (int)pageRect.Size.Width * 4, colorSpace , CGImageAlphaInfo.PremultipliedLast);
// fill with white background
context.SetFillColor (1.0f, 1.0f, 1.0f, 1.0f);
context.FillRect (pageRect);
context.SaveState ();
The text was updated successfully, but these errors were encountered:
@zerocold96, I think there's nothing wrong with ZoomingPdfViewer sample. It's desgined to work this way and it seems like document you're using is too large to be displayed correctly with this app. However you can try other samples like QuartzSample where your pdf file displayed correcly.
Yes the quartzsample can read the pdf just fine.... this is odd. I will compare the samples and make notes of the differences. I must make a point of saying that I have other pdf files that do work just fine this way and are about the same size or bigger (both mb and pixels).
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Using the Zoomable pdf viewer worked great at first, but then I noticed a small subsect of pdf that can't be display. I Looked around the code and the one thing I noticed is that CGPDFDocument is reading the file just fine, but when it is time to create the subsampling image the view shows a white page.
I exported the pdfs to pdf on my mac and now the file is bigger and they can be view on the device. Is it a compression issues? or is the formatting for the original pdf different?
The text was updated successfully, but these errors were encountered: