Open JagadishaIncture opened 3 years ago
My Code :
final ProgressDialog progressDialog = new ProgressDialog(WebViewActivity.this);
progressDialog.setMessage("Downloading...");
try {
progressDialog.show();
PdfView.createWebPrintJob(WebViewActivity.this, webView, myDir, fileName, new PdfView.Callback() {
@Override
public void success(String path) {
progressDialog.dismiss();
openFileView(file);
//PdfView.openPdfFile(WebViewActivity.this, getString(R.string.app_name), "Do you want to open the pdf file?" + fileName, path);
}
@Override
public void failure() {
progressDialog.dismiss();
Toast.makeText(WebViewActivity.this, "SomeThing Went Wrong while Downloading", Toast.LENGTH_SHORT).show();
}
});
} catch (Exception e) {
FirebaseCrashlytics.getInstance().recordException(e);
progressDialog.dismiss();
Toast.makeText(this, "Downloading Failed Try again Later!!", Toast.LENGTH_SHORT).show();
}`
This Screenshot in WebView
This screenshot after converted to PDF Note : No Colors reflecting
Hi Iam trying to save pdf from webview. everything was working fine but recently we found one issue .
in webview i can see some background colors but after pdf is genrated i cant see any color sin tht pdf file