How to display Word Document inside Webview

SwagatikaSwagatika Member ✭✭✭

I have tried Display PDF in Webview . Pdf is Working properly. Now I have to display Word document in Webview .But i am not finding proper solution.Can any one please help me?


  • JarvanJarvan Member, Xamarin Team Xamurai

    Try to convert word file to html file, then load local Html content using DependencyService.

    Create an interface.

    public interface IBaseUrl { string Get(); }

    Implement the interface on each platform

    [assembly: Dependency (typeof(BaseUrl_Android))]
    namespace WorkingWithWebview.Android
      public class BaseUrl_Android : IBaseUrl
        public string Get()
          return "file:///android_asset/";

    Get the file on PCL.

    var source = new HtmlWebViewSource();
    source.BaseUrl = DependencyService.Get<IBaseUrl>().Get();


Sign In or Register to comment.