iOS how to opening the pdf from a https link

I’m trying to open a pdf document from a url and then going to a specific page number. I’m using the below snippet but it just stays blank.
1 Kindly please provide an working obj-c sample for a https link that downloads the pdf file.
2 How to check to see if the download failed or is in progress?
3 Is there a an activity indicator on the PTPDFViewCtrl that could be switched on?

[PTPDFViewCtrl OpenUrlAsync: WithPDFPassword:@""];

  1. I believe the CompleteReader sample exposes the OpenUrlAsync method in the UI, so you can search the sample code for the call.

Normally the call would be something like the following.

[myctrl OpenUrlAsync:@“https://www.pdftron.com/assets/pdfs/support/PDFTron_PDF2Image_User_Manual.pdf” WithPDFPassword:@""];

As for listening for errors or to check if the download is finished, you can either check the sample code for usage, or use this template.

  1. You can check the current download state through PDFViewCtrl.DownloadTypes:

void HandleDownloadEventType (object sender, PDFViewCtrl.DocumentDownloadedEventArgs e) { PDFViewCtrl.DownloadTypes type = (PDFViewCtrl.DownloadTypes)sender; if (type == PDFViewCtrl.DownloadTypes.e_downloadtype_opened) { // can now get the page count } else if (type == PDFViewCtrl.DownloadTypes.e_downloadtype_finished) { // finished } else if (type == PDFViewCtrl.DownloadTypes.e_downloadtype_failed) { // failed } }

  1. No, this would something you can add. You can track progress by page count.

To add to Ryans answer, please see the iOS specific API calls to check for download status here:
https://www.pdftron.com/pdfnet/mobile/docs/iOS/src/Protocols/PTPDFViewCtrlDelegate.html#/c:objc(pl)PTPDFViewCtrlDelegate(im)downloadEventType:pageNumber:

To see a working example of this under iOS, please refer to the PDFViewCtrl sample project (specifically, go to RootViewController.m:155, and uncomment the OpenUrlAsync method.).