Scroll PDF on WebView

by Jéssica Tavares   Last Updated June 07, 2015 02:04 AM

I'm new in Android. I need to display and auto-scroll a PDF file on Android 4.1. I'm using a WebView and Google Viewer. The content is shown but pageDown or scrollBy methods have no effect.

The code is simple:

WebView mView = new WebView(DBRoulette.this);
mView.getSettings().setJavaScriptEnabled(true);
/* Register a new JavaScript interface called HTMLOUT */
mView.addJavascriptInterface(new MyJavaScriptInterface(mView), "HTMLOUT");
mView.loadUrl(GOOGLE_VIEWER_PATH + newDocPaths.get(i));
mFlipper.addView(mView);

And in a Runnable loop after onPageFinished

WebView currView = (WebView) mFlipper.getCurrentView();
currView.pageDown(false);

Any suggestions of how could I show the next document page?

Thanks



Related Questions