aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2024-02-11 21:32:02 +0100
committerJay Berkenbilt <ejb@ql.org>2024-02-11 21:49:44 +0100
commitb1dad0de2a12a0feb0608d1f68f3f1e8144592e6 (patch)
tree3a8be3e2c47b3a2ffd9b68d9facec3d2484f4228 /include
parentb1b789df4203296a848fec6a3513f30efceb1a45 (diff)
downloadqpdf-b1dad0de2a12a0feb0608d1f68f3f1e8144592e6.tar.zst
Fix previous fix to setting checkbox value (fixes #1056)
The code accepted values other than /Yes but still used /Yes as the checked value instead of obeying the normal appearance dictionary.
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/QPDFFormFieldObjectHelper.hh4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/qpdf/QPDFFormFieldObjectHelper.hh b/include/qpdf/QPDFFormFieldObjectHelper.hh
index f31bb7bd..881a7db4 100644
--- a/include/qpdf/QPDFFormFieldObjectHelper.hh
+++ b/include/qpdf/QPDFFormFieldObjectHelper.hh
@@ -166,7 +166,9 @@ class QPDFFormFieldObjectHelper: public QPDFObjectHelper
// either /Tx (text) or /Ch (choice), set /NeedAppearances to true. You can explicitly tell this
// method not to set /NeedAppearances if you are going to generate an appearance stream
// yourself. Starting with qpdf 8.3.0, this method handles fields of type /Btn (checkboxes,
- // radio buttons, pushbuttons) specially.
+ // radio buttons, pushbuttons) specially. When setting a checkbox value, any value other than
+ // /Off will be treated as on, and the actual value set will be based on the appearance stream's
+ // /N dictionary, so the value that ends up in /V may not exactly match the value you pass in.
QPDF_DLL
void setV(QPDFObjectHandle value, bool need_appearances = true);