Bug 21952 - interactive form choice field
Summary: interactive form choice field
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other NetBSD
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-26 18:41 UTC by Jeremy C. Reed
Modified: 2009-06-04 14:06 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Jeremy C. Reed 2009-05-26 18:41:18 UTC
The following is from pkgsrc patches to fix problem with interactive forms:
(This is not my writeup or patch.)

-if a choice field defines both an "export value" and a "name", use the
 latter as "value" if selected (according to the PDF spec) -- makes
 that I can fill in my company's travel expenses form correctly
 (there is still an issue with captions of check boxes / radio
 buttons which looks like a font problem)

$NetBSD: patch-al,v 1.3 2009/04/06 09:29:27 drochner Exp $

--- poppler/Form.cc.orig	2009-01-28 22:56:21.000000000 +0100
+++ poppler/Form.cc
@@ -546,7 +546,7 @@ void FormWidgetChoice::_updateV ()
     } else if (numSelected == 1) {
       for(int i=0; i<parent->getNumChoices(); i++) {
         if (parent->isSelected(i)) {
-          obj1.initString(new GooString(parent->getExportVal(i)));
+          obj1.initString(new GooString(parent->getChoice(i)));
           break;
         }
       }
@@ -555,7 +555,7 @@ void FormWidgetChoice::_updateV ()
       for(int i=0; i<parent->getNumChoices(); i++) {
         if (parent->isSelected(i)) {
           Object obj2;
-          obj2.initString(new GooString(parent->getExportVal(i)));
+          obj2.initString(new GooString(parent->getChoice(i)));
           obj1.arrayAdd(&obj2);
         }
       }
Comment 1 Albert Astals Cid 2009-05-27 10:09:31 UTC
Before accepting the patch we need:
 * Full name of who created the patch
 * E-mail address of who created the patch
 * Consent to license his patch under GPLv2 or later

More than welcome:
 * Test case this fixes
Comment 2 Albert Astals Cid 2009-06-02 14:12:16 UTC
i got a personal mail with required info, the pdf is private so i won't post it here.
Comment 3 Albert Astals Cid 2009-06-04 14:06:07 UTC
Patch commited


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.