Password problem

  • Hello. We have wPDF 2 and wpViewPDF 1.04 components. Our program creates a set of different reports in PDF format. Some of them have password.
    And here is a problem: I can not view password protected PDF files with wpViewPDF. I receive following error: "Cannot open PDF file without password!". It does not matter where I enter the password, in LoadPassword property or in dialog box. There is same error. Files without password open correctly.

    PS: Adobe Reader has no problem in opening these files with password or not.

    • Offizieller Beitrag

    Hi,

    I posted a complete demo on
    http://www.wpcubed.com/ftp/ex/WPViewPDFBatch.zip

    The code is

  • Hello, thank you for reply, but unfortunately this does not solve my problem.
    When I create a PDF file I use two passwords "OwnerPassword" and "UserPassword". "Owner password" is the same for all files, but "User password" differs. When administrator wants to print all files he wants to enter the password once. In this case he has to enter "OwnerPassword". He even does not know any of "UserPasswords". But method you suggested works only with "UserPassword".

    In other words: I can only open PDF file using one password from two possible for PDF file. Second password DOES NOT WORK.

    Surely I can swap these passwords when I create a PDF file. But second password gives rights to modify PDF file in Adobe and this is not acceptable.

    • Offizieller Beitrag

    HI,

    >> Hello, thank you for reply, but unfortunately this does not solve my problem.
    When I create a PDF file I use two passwords "OwnerPassword" and "UserPassword". "Owner password" is the same for all files, but "User password" differs. When administrator wants to print all files he wants to enter the password once. In this case he has to enter "OwnerPassword". He even does not know any of "UserPasswords". But method you suggested works only with "UserPassword". <<

    Don't mistake the 'Owner passwords' with a super user password. In fact the owner password is nothing more than a flag which tells the reader 'please do not change or modify.' - it is up to the reader to ignore or respect the owner password!

    Only the user password gives you the protection that a PDF file is not opened or changed without the knowledge of this password .... and, no, it is not possible to print a PDF file without the user password to be known.
    But as my demo shows, WPViewPDF allows to to provide a list of passwords which are all checked against the file.

    >> In other words: I can only open PDF file using one password from two possible for PDF file. Second password DOES NOT WORK.

    Surely I can swap these passwords when I create a PDF file. But second password gives rights to modify PDF file in Adobe and this is not acceptable.<<

    You can use for the Owner password whatever you want - if you do not specify wPDF will create a random password. Simply use the user password only or none at all.

  • I used property names from wPDF.
    OwnerPassword is a string property where I set Super user password.
    UserPassword is a string property where I set User password.

    In previous message I mean that I can open file with user password, but cannot with Superuser password. When I try to open file with Super user password I receive error message: "Cannot open PDF file without password".

  • There are both passwords. When I create a PDF file I use both fields. And Adobe Reader opens this file with any of this passwords, instead of WPView which opens file with only user password. I want to know is there any way to view PDF file in WPView using super user password or not.

  • Hello, is there any changes or probably plans to change WPView to allow using both available passwords. This feature is very critical for us and as I wrote before is the one what we bought WPView for.