-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Acroforms - setting an option to false will still apply the flag #1495
Comments
RicoBrase
added a commit
to RicoBrase/pdfkit
that referenced
this issue
Feb 4, 2024
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
Description of the problem
When using acroforms, setting a boolean option to
false
will still add the flag to the PDF document.This is caused by the function
resolveFlags(options)
inlib/mixins/acroforms.js
not checking the value of the options - as long as a corresponding key is set to any value (evenundefined
), their flag is added to the field.Example:
The option
password
is explicitly set tofalse
, but the form text gets rendered with the password flag (only asterisks shown).(Screenshot uses the code sample from below.)
I am currently creating a pull request, which will fix this issue.PR #1496 is ready.
Code sample
I forked the repo and modified the example in the webpack folder:
Your environment
0.14.0
(forked frommaster
)v20.11.0
121.0.6167.139
(arm64)The text was updated successfully, but these errors were encountered: