Monotouch Example for QuickLook PDF
Posted
by
nbonwit
on Stack Overflow
See other posts from Stack Overflow
or by nbonwit
Published on 2012-06-29T19:04:50Z
Indexed on
2012/06/30
21:16 UTC
Read the original article
Hit count: 326
I am looking for a bare-bones pdf viewer example using the QuickLook Monotouch API. I have searched and have found bits and pieces but just can't seem to get it all integrated.
I will be reading the pdf from a file pre-saved to the Personal folder on the iPad and would like to show the pdf as a modal view.
If someone could post a bare-bones example, that would be much appreciated.
What I have so far is below.
Thanks!
path = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
pdfPath = System.IO.Path.Combine(path, "pdfReport.pdf");
QLPreviewController myPdfController = new QLPreviewController();
MyPdf pdfToShow = new MyPdf("", new Uri("")); // Not sure about this line
myPdfController.DataSource = pdfPath; // Not sure what this line should be
PresentModalViewController(myPdfController, true);
© Stack Overflow or respective owner