how to get pdf file from .acsm file of google book api in android?

2.3k Views Asked by At

I am trying to download free ebook pdf file through google book api, but I don't succeed. When I check in browser what output comes then that link is giving me download of .acsm format file in explorer or browser. So how I can I download pdf file from .acsm link OR Convert .acsm to pdf format.

1

There are 1 best solutions below

1
On

Answer: To download free books .pdf format from Google Book API, we need to get the download link of pdf from JSON query and then send it into webview. That's it.

String url = "http://books.google.co.in/books/download/The_Child_s_Own_Story_Book.pdf?id=9WevWtW5KMUC&hl=&output=pdf&sig=ACfU3U0LWT7WWnfdtxAFbBctZk4aALv8gA&source=gbs_api";

webview = (WebView) findViewById(R.id.webView);
webview.getSettings().setJavaScriptEnabled(true);
webview.loadUrl(url);