I have trying to load and display the online pdf file (file from sharepoint link) in Xamarin forms Webview. To load the pdf, i have implemented the pdf viewer using custom renderer. But, there files are not loaded. Can you please help me out on this ?
Following code are used to load the file.
var customWebView = Element as AuthWebView;
Control.Settings.AllowUniversalAccessFromFileURLs = true;
Control.Settings.PluginsEnabled = true;
Control.Settings.JavaScriptEnabled = true;
// Control.LoadUrl("https://drive.google.com/viewerng/viewer?embedded=true&url=" + customWebView.Uri); tired this also but no luck
Control.LoadUrl(string.Format("file:///android_asset/pdfjs/web/viewer.html?file={0}", string.Format("file:///android_asset/Content/{0}", WebUtility.UrlEncode(customWebView.Uri))));