@janak14,
I have observed your comments. I like to inform that Aspose.Words for Android via Java is a class library and with it you can programmatically generate, modify, convert and render word processing documents. So, it does not offer any UI or control for performing these document processing task. However, if you are intended to just preview your Word document in your android application, we can offer you a simple way that will help you in achieving what you are looking for.
- Load your Word document by using ‘Aspose.Words for Android via Java’
- Generate images against each page in Word document and then view them in some android control
Please see the following code that uses standard ImageView widget to show Aspose.Words generated images:
try
{
String licString = Environment.getExternalStorageDirectory().getAbsolutePath() + “/Aspose.Words.Android.lic”;
String inputPath = Environment.getExternalStorageDirectory().getAbsolutePath() + “/input.docx”;
String outputPath = Environment.getExternalStorageDirectory().getAbsolutePath() + “/”;
com.aspose.words.License lic = new com.aspose.words.License();
lic.setLicense(licString, this);
com.aspose.words.Document doc = new com.aspose.words.Document(inputPath);
com.aspose.words.ImageSaveOptions options = new ImageSaveOptions(SaveFormat.PNG);
options.setPageCount(1);
for (int i = 0; i < doc.getPageCount(); i++) {
options.setPageIndex(i);
doc.save(outputPath + "out_" + i + ".png", options);
}
Bitmap bm = BitmapFactory.decodeFile(outputPath + "out_1.png");
ImageView img = (ImageView) findViewById(R.id.imageView1);
img.setImageBitmap(bm);
}
catch (Exception e)
{
e.printStackTrace();
}
Also from Aspose.Cells for Android via Java perspective, I like to inform Aspose.Cells for Android via Java supports Sheet to image rendering. Please check Documentation article. This will help you to achieve your requirements.