-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
We are evaluating Android aspose pdf library and trying to convert pdf to html but the file is not generating.
We are using below code for the same:
InputStream i = null;
try {
i = this.context.getApplicationContext().getContentResolver().openInputStream(uris[0]);
Document d = new Document(i);
App.closeStream(i);
File output = new File(context.getFilesDir(), "html/Aspose_DocToHTML.html");
d.save(output.toString(), SaveFormat.);
return output.toString();
} catch (Exception x) {
this.error = x;
} finally {
App.closeStream(i);
}
To apply license, Using below code in application class
License license = new License();
InputStream i = null;
try {
i = getResources().getAssets().open(getString(R.string.aspose_pdf_license_asset_file));
license.setLicense(i);
closeStream(i);
} catch (Exception x) {
Log.e(App.class.getName(), Log.getStackTraceString(x));
} finally {
closeStream(i);
}
Added below lib in gradle:
compile (
group: 'com.aspose',
name: 'aspose-pdf',
version: '20.11',
classifier: 'android.via.java')
Please suggest, We have did same thing to Aspose word library there it work properly also saving the html file. but here we are not getting any error also not generating/saving html file. We have also cross checked the write external storage permission for the same.
Metadata
Metadata
Assignees
Labels
No labels