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
setEncryption not working with variable #3437
Comments
Should be no difference in functionality whether you use a string or variable. What values have you tried for $var? Do you receive any errors when calling the method? |
No error is displayed. It just says that the pdf cannot be opened. It only opens what is inside the quotes '$var' opens with $var but does not take the value of the variable, even if the variable is found alone $var without quotes |
At what point are you setting |
This is my code
|
Your logic looks OK. Are you running under a locale other than en_US? I would not expect that to cause issues with the password functionality, but I haven't tested that scenario in a while. |
Solved, the variable changes its value per session variable, so the value did not clear and always kept the same value, why? magic, for no reason. Thanks |
Hello, when I try to encrypt a pdf with a password, it only works with a direct string, example: setEncryption(1234, 5678) but I need the password to be a variable setEncryption($var,123456789). any solution? thanks
this is my line of code:
$dompdf->getCanvas() ->get_cpdf() ->setEncryption($var, '123456789', ['print', 'modify', 'copy', 'add']);
The text was updated successfully, but these errors were encountered: