Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #11240 Reply

    Marcos

    Hi all

    I’m trying to secure a PDF with read password, master password and some rules. My idea is to prevent changes in my files, so I follow the example in the link: https://plugpdf.com/protect-your-android-pdfs-with-a-password/ but the generated file can me changed even with the read password.

    To clarify, now I’m testing the library to choose, so I have a trial key.

    att.
    Marcos Gorll

    #11242 Reply

    Marcos

    Edit:

    – Running on Android 6.0 devices

    What is really strange is, with FALSE at all paramenters on PDFDocument.getUserAccessPermissions(), I call PDFDocument.canPrint() and returns TRUE.

    Sample code:

    PDFDocument test1 = new PDFDocument((Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + “/Assinatura.pdf”), “”);
    Log.i(“INFO”, test1.getEncrypt() + “”);
    boolean result = test1.setEncrypt(“Hello”, “World”, PDFDocument.getUserAccessPermissions(false, false, false, false, false, false, false));
    test1.saveFile();
    Log.i(“INFO”, result + “”);
    Log.i(“INFO”, test1.getEncrypt() + “”);
    Log.i(“INFO”, test1.getLastErrorMsg());
    Log.i(“INFO”, test1.canExtract() + “”);
    Log.i(“INFO”, test1.canModifyContent() + “”);
    Log.i(“INFO”, test1.canPrint() + “”);

    The code runs with no error. The PDF is saved correctly, because after it is protected by a the two passwords. Even using the “Hello” password, I can change or print the PDF.

    #11245 Reply

    Dr. Plug
    Moderator

    Hello, Marcos

    Thank you for the inquiry and sorry for the late answering.
    We could reproduce the same problem that you said.
    So we’ll try to fix that issue as soon as possible.
    So could you wait for a few days? After fixing it we’ll let you know.
    Best Regards,

    Dr.Plug

    #11248 Reply

    Dr. Plug
    Moderator

    Hello, Marcos

    Thank you for the waiting.
    We fixed that problem permission’s value didn’t change after setEncrypt.
    So could you try it? This is a temp version link that problem is fixed.
    https://plugpdf.com/sdkfile/PlugPDF_Android_temp.zip

    Best Regards,
    Dr.Plug

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Security PDF
Your information: