-
Notifications
You must be signed in to change notification settings - Fork 264
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
PDF metadata not encrypted #865
Comments
Hi! Have you tried enabling the |
I can see the same problem on our reference files. https://github.com/PyFPDF/fpdf2/blob/master/test/encryption/encryption_rc4.pdf The document properties are not being correctly encrypted since #736 |
That file is also generated with Do you see the same problem in https://github.com/PyFPDF/fpdf2/blob/master/test/encryption/encrypt_metadata.pdf generated with |
|
Hello @Tolker-KU, I have tried this code snippet: from fpdf import FPDF
pdf = FPDF()
pdf.set_title("Title")
pdf.set_encryption("", encrypt_metadata=True)
pdf.add_page()
pdf.set_font("helvetica", size=12)
pdf.write(txt="Hello world!")
pdf.output("test_enc.pdf") but the metadata is still not encrypted correctly. If I apply my fix, the metadata is correctly encrypted whether Moreover, I need the |
Damn, that was me... 😅 So this is indeed a bug. |
Co-authored-by: Lucas Cimon <[email protected]>
Error details
The title of the PDF file doesn't appear correctly because it is not encrypted.
I have tested the code snippet below with the master branch (
beb40d4
).Minimal code
Environment
Proposed solution
Update the file
fpdf/output.py
at line 81:I have added
encrypt=True
to all metadata.The text was updated successfully, but these errors were encountered: