We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PDFtoExcel sample can't run

PDFtoExcel.zip (909.7 KB)
I have convert PDFtoExcel sample to gradle version and add aspose.pdf jar(v19) to the libs dir.
But when I step over into the code:
Document doc = new Document(inputPath);

There are no any response.

public class MainActivity extends Activity {

private static void PDFtoExcel()
	String path=Environment.getExternalStorageDirectory().getPath();
	String inputPath  = path + "/Documents/test.pdf";
	String outputPath = "/storage/emulated/0/Documents/Table_out.xlsx";
	//                    '/storage/emulated/0/Documents/my.pdf'
	// Method 1
	File file=new File(inputPath);
	if (file.exists()) {
		Document doc = new Document(inputPath);
		doc.save(outputPath, SaveFormat.Excel);
	// Method 2
	ExcelSaveOptions options = new ExcelSaveOptions();
	//Save document in XLSX format

	Document pdfDocument = new Document(inputPath);
	pdfDocument.save(outputPath, options);

protected void onCreate(Bundle savedInstanceState) {
	TextView tx = (TextView)findViewById(R.id.textBox);
	}catch (Exception ex){

public boolean onCreateOptionsMenu(Menu menu) {
	// Inflate the menu; this adds items to the action bar if it is present.
	getMenuInflater().inflate(R.menu.main, menu);
	return true;

public boolean onOptionsItemSelected(MenuItem item) {
	// Handle action bar item clicks here. The action bar will
	// automatically handle clicks on the Home/Up button, so long
	// as you specify a parent activity in AndroidManifest.xml.
	int id = item.getItemId();
	if (id == R.id.action_settings) {
		return true;
	return super.onOptionsItemSelected(item);



Would you please share the complete version of the API which you are using at your side? e.g. 19.3, 19.12, etc. Also, would you kindly try using Android Studio as well and let us know in case you face any issue. Please also share the sample source PDF document which you are trying to convert. We will test the scenario in our environment and address it accordingly.

I use version 19.12 in Android Studio 4.0.test.pdf (1.6 MB)
PDFtoExcel.zip (909.7 KB)
By the way, I want to use aspose.pdf in a APP which developed by delphi XE 10.4, I will order the product if these problem is resolved.


We were able to notice the issue in our environment while testing the scenario with your shared file. We have logged it as PDFANDROID-603 in our issue management system. We will further look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.