I see that the common implementation of this is to simply append the string to a Google URL, however this will only work with PDF's hosted on the internet. My PDF is a local one and I want to embed it in an IFrame and put it into my webview. I also read somewhere that enabling hardware acceleration can help, which I currently do have enabled. However, the following is what is happening.
string html = "<html><iframe src=\"/storage/emulated/0/Attachment/test.pdf\" width=\"100%\" height=\"100%\"></iframe></html>";
webView.LoadData(html, "text/html", "base64");
That is essentially what I am trying to do. However when I load the WebView in my app, I see WEBPAGE NOT AVAILABLE ... could not be loaded because net::ERR_INVALID_URL
To add onto this, the reason I am doing it this way is because the PDF renderer class for Android is only available for API's 21 and higher. I need my app to support at minimum AP 15.