-
Notifications
You must be signed in to change notification settings - Fork 541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting false "Secured pdf file are currently not supported." #488
Comments
Can you provide us the PDF? We would like to include it in our test environment, therefore it must be free of charge and without any obligations. |
I've looked into it. If I comment out line 102 - 104 in the Parser, the file get parsed. The problem is, that the trailer HAS a reference to /Encrypt: here's the trailer:
/Encrypt [dictionary]: Specifies the document’s encryption dictionary. But is does not use it. The file is not encrypted. Or at least I can use getText() on it and get the contents? So testing a pdf on the value encrypt is not fail safe to really test for secured files. Or if I misunderstood, secured files can be read. To replicate:
|
Here's an example file. I created it using LibreOffice. While exporting to PDF, I set the WRITE password, but not the READ password. So it is not encrypted for reading, which is the case in the file I encountered this at first as well. Now you have a test file |
Thank you for your detailed feedback. I hope someone can pick up the ball and writes a fix. |
I am looking into it. Looks like the answer could be found here: https://www.win2pdf.com/doc/controllingencryptionoptions.html |
Additional explanation |
Any progress on this? |
+1 any update please? |
Not to my knowledge, sorry. |
#653 should provide a valid work around until there is a better solution/fix. |
* Add ability to ingore PDF encryption check * Switch to ! syntax * Update src/Smalot/PdfParser/Parser.php * Additional changes for #488 doc/Usage.md: - Moved description of `setIgnoreEncryption` option to doc/CustomConfig.md - Added brief "PDF encryption" section doc/CustomConfig.md: added `setIgnoreEncryption` option and section to describe it. src/Smalot/PdfParser/Config.php: Doc comment for Config::setIgnoreEncryption() Added tests/PHPUnit/Integration/EncryptionTest.php Added samples/not_really_encrypted.pdf (thanks to @parijke who orginially created this as test.pdf) See #653 * src/Smalot/PdfParser/Config.php: PHP-CS-Fixer issue fixed * Update CustomConfig.md refined texts * Config.php: use explicit PHP doc entities * ParserTest.php: moved tests * removed EncryptionTest.php --------- Co-authored-by: Jordan Hall <[email protected]> Co-authored-by: Konrad Abicht <[email protected]>
I have a PDF that, when trying to parse the parser says
Secured pdf file are currently not supported.
Sounds like a false positive to me?
The text was updated successfully, but these errors were encountered: