开发者

Android - Problem in using the Google pdf viewer in webview

I have seen lot of threads about loading a PDF in Android Webview. But I didn't see the issue what I am getting.

I am using Google PDF viewer to load the URL in the Webview which will give a PDF as response.

I am setting the following properties to my webview

mWebview.setWebViewClient(new WebViewClient());
mWebview.setVerticalScrollBarEnabled(false);
mWebview.getSettings().setJavaScriptEnabled(true);  
Webvi开发者_如何学Cew.getSettings().setDefaultZoom(ZoomDensity.MEDIUM);


String url = "http://docs.google.com/viewer?embedded=true&url=" + "my url";
mWebview.loadUrl(url); 

I am able load the PDF with the above given code. The issue I have is,

Once after loading the full page, a empty line is keep on getting inserted in top and bottom of page. So my page is looking like the one given below.

empty line
empty line
empty line
....
pdf content
empty line
empty line
empty line
....

The page is keep on increasing with empty lines.


There was something wrong with Google only, now I am not getting this issue, it works fine.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜