pdfparser icon indicating copy to clipboard operation
pdfparser copied to clipboard

Encrypted but not really _encrypted_ PDF isn't parsed and detected as "secured pdf"

Open rameezrami opened this issue 4 years ago • 13 comments

This is a very good package with excellent and easy to use API but it seems not production-ready yet. I'm having errors with different PDFs.

also, I'm getting an error saying pdf in encrypted. I double-checked if the PDF is protected, it wasn't.

maybe a version issue? like in another issue posted in this repository.

I have created a screencast for better understanding and these pdf is not getting parsed in your demo page too.

Please find the files in the attachment.

pdf and screencasts.zip

rameezrami avatar Jul 17 '20 07:07 rameezrami

any advice on this ?

cesardmoro avatar Aug 13 '20 15:08 cesardmoro

any advice on this ?

Sorry, I can't help you on this one.

k00ni avatar Aug 13 '20 20:08 k00ni

I've tried locally and on my Mac the PDF information are saying the PDF is password encrypted.

Also tried using an online tool and it says the same: https://www.metadata2go.com/result/cffe1bdf-d6be-45d1-b810-f4db8ae846af

image

j0k3r avatar Aug 21 '20 06:08 j0k3r

@j0k3r but you were able to open the pdf without any issue right? no passwords asked. I have a couple of other pdfs(can't share here, confidential information) too which doesn't work the same way.

rameezrami avatar Aug 28 '20 08:08 rameezrami

Of course, but the label says the PDF is encrypted. So we don't try to read it at all. See https://github.com/smalot/pdfparser/blob/master/src/Smalot/PdfParser/Parser.php#L97-L99

Maybe we should improve that and try to read the PDF?

j0k3r avatar Aug 28 '20 08:08 j0k3r

Hey I have encountered same issue, is this fixed? Also, meanwhile do we have any alternate solution for this ?

Sagar1219 avatar Nov 08 '21 10:11 Sagar1219

No alternate solution, but contributions are welcome.

j0k3r avatar Nov 08 '21 10:11 j0k3r

#653 should provide a valid work around until there is a better solution/fix.

k00ni avatar Dec 01 '23 11:12 k00ni

Fix in unixnut/pdfparser fork, 'decryption' branch. I was going to create a draft pull request but I already have an unrelated PR open for one of the commits on that branch so I can't make another until that's merged. @k00ni can you please reopen this issue?

unixnut avatar Jan 19 '24 10:01 unixnut

Hi, Do you know if there is pull request of continue work with src/Smalot/PdfParser/Config::setIgnoreEncryption ? I would like to use this but if is depreacted do we have some alternative method to use ?

matkozikowski avatar Jul 19 '24 08:07 matkozikowski

@matkozikowski @j0k3r @k00ni I am still interested in making a PR for my decryption branch. However, I have been struggling emotionally and need to get into counselling, which should happen soon.

unixnut avatar Jul 20 '24 15:07 unixnut

@unixnut I wish you all the best.

k00ni avatar Jul 22 '24 07:07 k00ni

@k00ni I sent you an e-mail about this project. No rush to reply, but if you didn't see it can you please check your spam folder? Thanks.

unixnut avatar Sep 12 '24 01:09 unixnut