my customer is exploring your Aspose.Cells and Aspose.Word components for Android.
And liked what we saw.
To begin with, I need to know below mentioned technical details -
-
In-memory support for conversion of DOC, DOCX, XLS, XLSX, RTF, TXT files, to PDF: There are SDKs in Aspose.Word and Aspose.Cells that seems to support conversion/saving to output stream, for exa – Document.Save(Outputsream, SaveFormat) and Workbook.Save(Outputsream, SaveFormat). Do these methods perform any File I/O ? I intend to assume that they don’t. This is critical for my application.
-
Any known issues specific to conversion to PDF: For exa: We found that the charts were not getting converted from Word to PDF. Are there any other such major issues in conversion module ?
-
Page / Sheet support: Is there any way to convert only a specific page from Word or a sheet from Excel document into PDF ?
-
PPT support : Are there any android library supporting conversion of PPT PPTX to PDF file ?
- Is there any android library specific to conversion of ALL office files like Doc, Docx, Ppt, Pptx, Xls, Xlsx to PDF ?
- Minimum and maximum android version supported ?
- Any rendering component for android to be released soon ?
Your prompt responses will help me in decision-making further.
Regards,
M.Irfan.
Hi Irfan,
Thanks for your interest in Aspose products. I will answer your questions related to Aspose.Words for Android.
- Yes. Aspose.Words for Android supports in-memory conversions i.e. you can use the following code to save a Word processing document into PDF format in memory:
com.aspose.words.Document doc = new com.aspose.words.Document(inputPath);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
doc.save(baos, SaveFormat.PDF);
-
Could you please attach your input Word document you’re getting problems with here for testing? I will investigate the issue(s) on my side and provide you more information. Also, please refer to the following section of documentation which outlines the known issues in Aspose.Words for Android API:
https://docs.aspose.com/words/androidjava/
-
Sure, you can use the following code to convert only a specific page from Word document into PDF:
com.aspose.words.Document doc = new com.aspose.words.Document(inputPath);
PdfSaveOptions options = new PdfSaveOptions();
options.setPageIndex(1);
options.setPageCount(1);
doc.save(outputPath, options);
-
No. There is no single API which converts all formats to PDF. Please use Aspose.Total for Android instead which is a compilation of every Android component offered by Aspose. We compile it on a daily basis to ensure it contains the most up to date versions of each of our Android components.
-
Aspose.Words for Android is platform independent and can be used on any platform where Android Runtime environment is installed and will run on Android systems running Android OS 2.0 or greater. At present, the component has been tested with Android 4.2 v 17.
-
I am afraid, Aspose.Words for Android does not offer any UI or control for performing document processing tasks. However, if your’re intended to just preview your Word document in your android application, I can offer you a simple way that will help you in achieving what you are looking for e.g.
-
Load your Word document into Aspose.Words for Android
-
Generate images against each page in Word document and then view them in some android control.
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 com.aspose.words.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();
}
Please let me know if I can be of any further assistance.
Best regards,
Hi,
I would like to address your issues/requirements from Aspose.Cells for Android perspective for Excel file formats and conversions (XLS, XLSX, PDF etc.). We recommend you to kindly try our latest version of the product (Aspose.Cells for Android v1.1.0) which does support Excel to PDF, Chart to Image and Sheet to Image features etc. in it, you may download it and give it a try here:
https://releases.aspose.com/words/androidjava
-
Yes, your understanding is correct. Aspose.Cells for Android does not perform any file I/O operation when you have the workbook to memory/streams.
-
There is not any significant issue(s) or limitation for Excel to PDF conversions:
https://docs.aspose.com/cells/java/converting-workbook-to-different-formats/
-
You may try to hide your unwanted sheets and make your desired sheets visible before conversions, see the document/ article for your reference:
https://docs.aspose.com/cells/java/show-and-hide-elements/
-
You would require multiple products for conversions of different file formats,
e.g
Excel file formats (XLS, XLSX) to PDF — Aspose.Cells for Android
Word file formats (DOC, RTF etc.) to PDF — Aspose.Words for Android
etc.
-
See the document on System requirements regarding Aspose.Cells for Android:
https://docs.aspose.com/cells/java/aspose-cells-for-android-via-java-installation/
Thank you.
Hi M.Irfan,
I will share my feedback with you related to Aspose.Slides that supports PPT/PPTX presentations.
-
PPT support : Are there any android library supporting conversion of PPT PPTX to PDF file ?
- Is there any android library specific to conversion of ALL office files like Doc, Docx, Ppt, Pptx, Xls, Xlsx to PDF ?
I like to share that at present the support Aspose.Slides to manage PPT/PPTX presentations in Android environment is not available. We are working over Aspose.Slides for Android and it will take sometime. As soon as we will share the product we will share the notification via blog posts and you can then use Aspose.Slides in Android environment afterwards.
Many Thanks,