Jump to content

Plik PDF - otworzenie zabezpieczonego pliku


mefisteoo

Recommended Posts

Cześć! Zabezpieczyłem plik PDF poprzez bibliotekę mPDF hasłem, ale niestety teraz nie wiem jak mogę go otworzyć :(( Znam hasło i chcę aby bo kliknięciu otwórz pdf otworzył się on bez hasła. Nie wiem jakiej biblioteki użyć, aby pokazać użytkownikowi odbezpieczony plik PDF. Macie jakieś pomysły?

 

ENGLISH:

Hi! I protected the PDF file through the mPDF library with a password, but unfortunately now I do not know how I can open it :(( I know the password and I want because clicking open pdf it opened without a password. I don't know what library to use to show the user an unprotected PDF. Do you have any ideas?

Edited by mefisteoo
Tłumaczenie
Link to comment
Share on other sites

2 minutes ago, ginerjm said:

Usually a user has a pdf reader on their system so attempting to open a simple pdf file should trigger that.

I would like my system when clicking "show PDF" it opens without a password, so that the user does not have to type it. (with us on the server, each pdf file is secured, because it contains sensitive user data: PESEL number, address of residence, contact details, insurance, etc.)

Link to comment
Share on other sites

If the pdf was encoded with the password how could your app provide that? 

Could you not use a password in your app itself so that you have to enter it just to get into the app and have access to the files?  You could have multiple passwords to provide access to groups of files.   Store the filename in a table with a group code and check if the user has logged in with access to that group and only then show him the file.

Link to comment
Share on other sites

8 minutes ago, ginerjm said:

If the pdf was encoded with the password how could your app provide that? 

Could you not use a password in your app itself so that you have to enter it just to get into the app and have access to the files?  You could have multiple passwords to provide access to groups of files.   Store the filename in a table with a group code and check if the user has logged in with access to that group and only then show him the file.

I understand, but I would like to do so that when you click on the button, the user receives a file without a password. Each file on the server has a different password for security, the password for the file is in the database. Pdf file password protected by mPDF library and I am currently looking for a solution to decode the PDF file.

Link to comment
Share on other sites

9 minutes ago, ginerjm said:

Are you saying that the password is IN the pdf file, or just in a database?

If it is in the pdf file then you need to read up on what mPDF allows you to do, not here.

I have a password for the pdf file in the database, the user does not know the password. When the user clicks "show PDF" then the script is to open the PDF that is password protected.

Link to comment
Share on other sites

So the user does have to login with a password.  Why can't that userid be used to determine what files the user can see and not worry about embedded passwords in the pdf files?  As I already proposed, assign pdf files to groups (where you put the passwords now) and create a table that links a user id to multiple records of groups that he/she can access.  When a user clicks on a pdf button check that his permissions include that group number and show the file.  That's the way I would do it.

It's either that or read the documentation on mPDF to see if they have an interface that allows an app to provide the password

Link to comment
Share on other sites

4 minutes ago, ginerjm said:

So the user does have to login with a password.  Why can't that userid be used to determine what files the user can see and not worry about embedded passwords in the pdf files?  As I already proposed, assign pdf files to groups (where you put the passwords now) and create a table that links a user id to multiple records of groups that he/she can access.  When a user clicks on a pdf button check that his permissions include that group number and show the file.  That's the way I would do it.

It's either that or read the documentation on mPDF to see if they have an interface that allows an app to provide the password

we care about data security, so we do not want our files on the server to be unsecured. There is a situation that FTP access data is leaked and the hacker has user data...

That's why I'm looking for a way to unlock a pdf file knowing the password to it. The mPDF library cannot remove the password or even open the protected file...

Link to comment
Share on other sites

What does mPDF have to offer you?  Obviously we can't help you here (PHP world) unless you find out what access path mPDF can provide.

And BTW - you said that you have the pdf passwords stored in a database.  And you have your pdf files stored on your system.  If you are concerned about somebody hacking into the files what about that same person hacking into the passwords database?

Edited by ginerjm
Link to comment
Share on other sites

6 minutes ago, ginerjm said:

What does mPDF have to offer you?  Obviously we can't help you here (PHP world) unless you find out what access path mPDF can provide.

And BTW - you said that you have the pdf passwords stored in a database.  And you have your pdf files stored on your system.  If you are concerned about somebody hacking into the files what about that same person hacking into the passwords database?

szukam tutaj rozwiązania w jaki sposób mogę odbezpieczyć plik pdf... nie koniecznie w bibliotece mPDF...

 

If you "hack" ftp, it will not necessarily break into the database :)

Link to comment
Share on other sites

Who said anything about ftp?

If I can hack and get to your pdf files folder(s) What makes you think I can't do the same to your databases?  I'm a hacker!!

I just did some google searches and I don't see a way to bypass the user having to type in a password to read a protected pdf file without using some other utility to either unlock the pdf or decrypt it and read it.   Sounds like Adobe was way ahead of its time.  I think you need to rethink your plan here.

Nuff said.  Good luck.  Good bye

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.