2
I use the following code to open a PDF document.
I would like to know how to open the PDF on a specific page, because every time I run the code, the document opens at the beginning.
public void OpenFile(string targetPath)
{
try
{
Device.BeginInvokeOnMainThread(() =>
{
QLPreviewItemFileSystem prevItem = new QLPreviewItemFileSystem(_name, targetPath);
QLPreviewController previewController = new QLPreviewController();
previewController.DataSource = new PreviewControllerDS(prevItem);
UIApplication.SharedApplication.KeyWindow.RootViewController.PresentViewController(previewController, true, null);
});
}
catch(Exception ex)
{
Debug.WriteLine(ex);
}
}