-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Encrypting - Image color index unchanged #2188
Comments
As you apparently managed to identify the root cause and found a fix: Are you willing to submit a PR including a corresponding test ensuring that this indeed is working correctly with the fix employed? |
@exiledkingcc |
I’m sorry, I’ve been busy. I can’t use the PDF I found the issue on (it’s not mine), but I can mock something up and create some PRs. It just may take a while. |
a good fix! |
New PR #2228 |
When encrypting a PDF with CMYK Indexed color, the colors render incorrectly on the encrypted PDF.
It appears the stream gets encrypted, but the color palette does not, as it is in the dictionary, not the stream of the object.
The output shows the same CMYK values as the input
In _encryption.py, starting around line 75, we encrypt the stream, but not the dictionary
Adding the items of the dictionary, and evaluating them as well
Now, the CMYK values are encrypted too.
Adobe Acrobat will then decrypt the CMYK color values correctly.
The text was updated successfully, but these errors were encountered: