All I need to do is take a (locally saved) PDF-document
and convert one or all of it\'s pages to image format like JPG or PNG.
I\'ve tr
I will say you a simple trick not a complete solution.Once if you successfully rendered the pdf page you will get its bitmap from screen as follow
View view = MuPDFActivity.this.getWindow().getDecorView();
if (false == view.isDrawingCacheEnabled()) {
view.setDrawingCacheEnabled(true);
}
Bitmap bitmap = view.getDrawingCache();
Then you can save this bitmap, that is your pdf page as image in locally
try {
new File(Environment.getExternalStorageDirectory()+"/PDF Reader").mkdirs();
File outputFile = new File(Environment.getExternalStorageDirectory()+"/PDF Reader", System.currentTimeMillis()+"_pdf.jpg");
FileOutputStream outputStream = new FileOutputStream(outputFile);
// a bit long running
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, outputStream);
outputStream.close();
} catch (IOException e) {
Log.e("During IMAGE formation", e.toString());
}
that's all, hope you help this.