.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,369 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi
I am using this code to open a pdf file from a url;
var DocPath = "http://mydomain.com/Docs/MyDoc.PDF";
Launcher.TryOpenAsync(new System.Uri(DocPath));
However I am getting the 'Cannot display PDF (MyDoc.PDF cannot be opened)' error.
Tried below code as well with no luck.
Uri uri=new Uri(DocPath);
await Browser.Default.OpenAsync(uri,BrowserLaunchMode.SystemPreferred);
What is the issue? Are there any special permission required in MAUI to open urls/pdf?
If I enter url [http://mydomain.com/Docs/MyDoc.PDF] in a desktop browser the pdf opens fine.
Thanks
Regards