Note that there are some explanatory texts on larger screens.

plurals
  1. POOpen password protected pdf file
    primarykey
    data
    text
    <p>I am developing a pdf reader[eBook Reader, which can display pdf file], as android don't have any native pdf viewer so i have to use third party pdf viewer. in that case i have choose the Adobe pdf viewer for android. I can open pdf file which are stored in sdcard of my device. Now i want to open password protected pdf file from my application. If user wants to open password protected pdf file manually then use have to provide password while opening. </p> <p>but i want to open those password pdf file from my application without any password prompt. Application provide the password,[apps knows the password] and without any password prompt, pdf will open. </p> <p>currently if i want to open any password protected pdf file from my application then a password prompt is appeared and needs a password to open it. </p> <p>I am using this code to open pdf from my stored pdf files in the SDCARD. </p> <p>==== </p> <pre><code>File pdfFile = new File(fileLocation); if (pdfFile.exists()) { Uri pdfFilepathUri = Uri.fromFile(pdfFile); Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(pdfFilepathUri, "application/pdf"); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); try { startActivity(intent); } catch (ActivityNotFoundException e) { Toast.makeText(this,"No Application Available to View PDF : "+fileLocation,Toast.LENGTH_LONG).show(); } } else Toast.makeText(this,"File cannot found : "+fileLocation,Toast.LENGTH_SHORT).show(); </code></pre> <p>==== </p> <p>can anybody please help how can i provide the password from the application, so that it can open pdf file automatically without prompting any password window. ?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload