We have a custom mobile application that uses DocumentViewer to download/view PDFs and it works perfectly.
We also allow user access on their phone through URL. The URL access runs a separate script to download PDFs. For iOS it either shows the PDF's url and all of the pages, or hide that url but only shows one page. This is fix by using DocumentViewer is Custom mobile app.
Is there a way for us to use DocumentViewer API in a browser?
When the script runs in the browser nothing happens. When it run in the custom mobile app, it will open the PDF.
DocumentViewer is a Mobile client specific API not available in mobile/desktop browser. For mobile/desktop browsers you can use Open url in window function or whatever doAttachmentSingleClick function does.