sathishsr / apv

Automatically exported from code.google.com/p/apv
GNU General Public License v3.0
0 stars 0 forks source link

Feature Request: Open password protected PDF files #24

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Just tried to open a password protected PDF file, and the pdf viewer just
crashed (Force Close error). It would be great if this supported protected
documents, or at the very least it shouldn't crash when attempting to open
one. Great program otherwise, though.

Original issue reported on code.google.com by maciel310 on 21 Apr 2010 at 10:04

GoogleCodeExporter commented 9 years ago

Original comment by mpietrzak on 22 Apr 2010 at 8:21

GoogleCodeExporter commented 9 years ago
I also get the problem, the I read the source file pdfview2.c , I found the 
method parse_pdf_file : 
 if (pdf_needs_password(pdf->xref)) {
        int authenticated = 0;
        authenticated = pdf_authenticate_password(pdf->xref, "");
        if (!authenticated) {
            /* TODO: ask for password */
            __android_log_print(ANDROID_LOG_ERROR, PDFVIEW_LOG_TAG, "failed to authenticate with empty password");
            return NULL;
        }
    } 
in the source , but I don'n know how to do 

Original comment by WangNin...@gmail.com on 6 Feb 2012 at 3:11

GoogleCodeExporter commented 9 years ago
Hi Maciel n WangNin,

  If you have static pdf password, just put in this line 
"authenticated = pdf_authenticate_password(pdf->xref, 
"put-your-password-here");"
At least that was i'm doing :)

Best Regards,
Santo

Original comment by abun.sa...@gmail.com on 6 Feb 2012 at 4:27