How do I open a PDF specific page with Xamarin (iOS)?

2

I use the following code to open a PDF document.

I'd 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);
    }
}
    
asked by anonymous 26.09.2018 / 17:54

0 answers