Search in sources :

Example 1 with RichDocumentsEditorWebView

use of com.owncloud.android.ui.activity.RichDocumentsEditorWebView in project android by nextcloud.

the class PrintAsyncTask method onPostExecute.

@Override
protected void onPostExecute(Boolean result) {
    RichDocumentsEditorWebView richDocumentsWebView = richDocumentsWebViewWeakReference.get();
    richDocumentsWebView.dismissLoadingDialog();
    PrintManager printManager = (PrintManager) richDocumentsWebView.getSystemService(PRINT_SERVICE);
    if (!result || printManager == null) {
        DisplayUtils.showSnackMessage(richDocumentsWebView, richDocumentsWebView.getString(R.string.failed_to_print));
        return;
    }
    PrintDocumentAdapter printAdapter = new PrintAdapter(file.getAbsolutePath());
    printManager.print(JOB_NAME, printAdapter, new PrintAttributes.Builder().build());
}
Also used : RichDocumentsEditorWebView(com.owncloud.android.ui.activity.RichDocumentsEditorWebView) PrintManager(android.print.PrintManager) PrintDocumentAdapter(android.print.PrintDocumentAdapter) PrintAdapter(com.owncloud.android.ui.adapter.PrintAdapter)

Aggregations

PrintDocumentAdapter (android.print.PrintDocumentAdapter)1 PrintManager (android.print.PrintManager)1 RichDocumentsEditorWebView (com.owncloud.android.ui.activity.RichDocumentsEditorWebView)1 PrintAdapter (com.owncloud.android.ui.adapter.PrintAdapter)1