Return-Path: X-Original-To: apmail-pdfbox-users-archive@www.apache.org Delivered-To: apmail-pdfbox-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CB02B18E73 for ; Thu, 25 Jun 2015 17:28:21 +0000 (UTC) Received: (qmail 6216 invoked by uid 500); 25 Jun 2015 17:28:21 -0000 Delivered-To: apmail-pdfbox-users-archive@pdfbox.apache.org Received: (qmail 6196 invoked by uid 500); 25 Jun 2015 17:28:21 -0000 Mailing-List: contact users-help@pdfbox.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@pdfbox.apache.org Delivered-To: mailing list users@pdfbox.apache.org Received: (qmail 6184 invoked by uid 99); 25 Jun 2015 17:28:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jun 2015 17:28:20 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of evan.williams@zapprx.com designates 108.163.197.50 as permitted sender) Received: from [108.163.197.50] (HELO elk2-relay.sendergen.com) (108.163.197.50) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jun 2015 17:26:06 +0000 Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by elk2-relay.sendergen.com (Postfix) with ESMTPS id 591DC253200D for ; Thu, 25 Jun 2015 13:27:21 -0400 (EDT) Received: by paceq1 with SMTP id eq1so53281593pac.3 for ; Thu, 25 Jun 2015 10:27:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=uH5xhfJNwZdeGG7mpJrEqhEE0p28zFDzN6RgqhxQ7qk=; b=QUEPJrtWRnxvsX2JsfgM+gGSLm5oA+Shq6nk/PNJ6TMiqBJpedxj7oHUf/wBeYQBAI X0wVkxyr+7yFh496cZLxBgMnaznv8nJMdCEvui+yLUwhmOTVSteNyaahqba2bbph1kLC Sl8sFfGWpCQZ32iS6e6i/E0XVWOsHjHXX3dpk0dtjZT7nYYD+1EUiogAMmNbinrnr3n1 pac1jpEiYfyHcQY1Xl2s6NLAT8e/P8w/oTPBMFkg7Sea8dR/AcWviBvdll6E9MUm+dqu qAQFqYj9ZkmjiSlfYPm8YzY2PdmRdYuLjaPCKf/w/Ijz56dip386a5wg666F8ug3BliZ EhSg== X-Gm-Message-State: ALoCoQl5PSo1XVS9Fz3foiRTeVl0jmIgiJOvpYKsuwM7AynxNdK8kzYXDMQxX45I2pS2DTpZbc4f7DjdE+KyhP1MnKDr0pyYF8+nEKjsEVbCD7RX7ZeJRva9n2SeUgo7bPUTbCLu2ZkQqBoctUahVz/N18EvKasxBQ== X-Received: by 10.68.195.200 with SMTP id ig8mr1788160pbc.33.1435253240396; Thu, 25 Jun 2015 10:27:20 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.68.195.200 with SMTP id ig8mr1788140pbc.33.1435253240242; Thu, 25 Jun 2015 10:27:20 -0700 (PDT) Received: by 10.70.34.138 with HTTP; Thu, 25 Jun 2015 10:27:20 -0700 (PDT) In-Reply-To: <52816D5D-299D-4BFE-8E14-D8FCF10D6151@fileaffairs.de> References: <77A5D0D4-1FA4-4571-8699-E56229C066B0@fileaffairs.de> <52816D5D-299D-4BFE-8E14-D8FCF10D6151@fileaffairs.de> Date: Thu, 25 Jun 2015 13:27:20 -0400 Message-ID: Subject: Re: Going from 1.8.9 to 2.0 From: Evan Williams To: users@pdfbox.apache.org Content-Type: multipart/alternative; boundary=e89a8f9219168c3f1605195aef68 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=zapprx.com; h=mime-version:in-reply-to:references:date:message-id:subject:from:to:content-type; s=sendergen; bh=2x0X9DeyjILFfHgov7vIuuz6oLw=; b=z965rfs4RL86DqLHatQPEow15sOAQn2pcsS8rt1mzoNlKAm6K048u9imrsEPWJMlJgFSMerg9A6A0BYl6vIojfjO1zcwfgL3r81TNaf4iR0T5NM3KDhwhkDYZLnG7QX0adkoANOqXqoWSsgZpNnCwStj6Y2vagAdBibA4sFd1Sw= X-Scanned-By: 'EmailPostmaster' on 108.163.197.50 X-Virus-Checked: Checked by ClamAV on apache.org --e89a8f9219168c3f1605195aef68 Content-Type: text/plain; charset=UTF-8 I apologize for my stupidity, but I have no idea how to get the value I need from a PDAppearanceEntry. It is obviously a map of appearance streams but I am not certain how to extract the actual name of the widget from the appearance entry. Could you possibly give me a bit more detail Thank you, and once again, I apologize for being dense. On Thu, Jun 25, 2015 at 12:40 PM, Maruan Sahyoun wrote: > Hi, > > > Am 25.06.2015 um 16:23 schrieb Evan Williams : > > > > When I said getOptions() returned null I meant it returns empty list. Not > > enough coffee. Everything else applies. > > I've created https://issues.apache.org/jira/browse/PDFBOX-2841 < > https://issues.apache.org/jira/browse/PDFBOX-2841> to handle that. > > - getOptions() returns the export values of the radio button group so > that's not what you are looking for (and we might rename that method to > better reflect it's intention) > - you could use getWidgets() to get the individual radio buttons and from > there for each individual widget > widget.getAppearance().getNormalAppearance() gives you the dictionary to > get the values from. > > BR > Maruan > > > > > On Thu, Jun 25, 2015 at 10:07 AM, Evan Williams < > evan.williams@zapprx.com> > > wrote: > > > >> Absolutely you can! > >> > >> > >> > https://drive.google.com/file/d/0B9TQWtr2Ipa9YlRORHVlTDVGS0k/view?usp=sharing > >> > >> But I strongly, strongly suspect that it is nothing to do with the pdf > >> document itself because there are many many forms from many many sources > >> and they all exhibit the same behavior. > >> > >> In the linked document I was, for example, able to enumerate 'Male' and > >> 'Female' as values for the Radio Button group 'Gender' with my 1.8.9 > code. > >> In my 2.0 code I can't. > >> > >> The way I used to enumerate radio button groups was to call the > getKids() > >> method an the radio collection and enumerate the returned fields. That > is > >> not possible in 2.0 and I don't have anything that works. the PDButton > >> method goetOptions() always returns null. > >> > >> Thank you! > >> > >> On Thu, Jun 25, 2015 at 2:02 AM, Maruan Sahyoun > > >> wrote: > >> > >>> Hi, > >>> > >>>> Am 24.06.2015 um 22:20 schrieb Evan Williams < > evan.williams@zapprx.com > >>>> : > >>>> > >>>> I have an application written to use pdfbox 1.8.9 which is all about > >>>> filling forms. I have a form library and I fill in values in forms > using > >>>> data I am handed. > >>>> > >>>> One of the things I also need to do is do introspection on the pdf > >>> document > >>>> to find out what fields are in it and make a template for filling the > >>> form > >>>> with data in my application. > >>>> > >>>> I am trying to get my application to work with pdfbox 2.0. Getting the > >>>> forms I have to fill was pretty straightforward. > >>>> > >>>> But I am having some difficulty with the introspection. > >>>> > >>>> For the templates I like to have an enumeration of the possible values > >>> of > >>>> the field if the field has such values. For example the names of the > >>>> possible values for a collection of radio buttons. > >>>> > >>>> I understood how to get those values for the 1.8.9 PDRadioCollection > >>> but I > >>>> have tried various things to get the same information for the 2.0 > >>>> PDRadioButton and I am not getting the information I need. the > >>> getOptions() > >>>> method on PDButton looked like exactly what I needed. But it always > >>> returns > >>>> null for me. > >>>> > >>> > >>> could you upload a sample form to a public location to take a look? > >>> > >>> BR > >>> Maruan > >>> > >>>> As an aside I also used to get the on and off values of checkboxes > with > >>>> getOnValue() and getOffValue(). These are in the Javadoc but appear to > >>> not > >>>> be in the actual API. I don't care very much about those, but they > were > >>>> nice to have, and the Javadoc should be accurate as much as possible. > >>>> > >>>> If anyone can help me with the RadioButton thing that would be a big > >>> help. > >>>> > >>>> Thank you. > >>>> -- > >>>> *Evan Williams* > >>>> Sr. Software Engineer > >>>> evan.williams@zapprx.com > >>>> > >>>> *www.ZappRx.com * > >>> > >>> > >>> --------------------------------------------------------------------- > >>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org > >>> For additional commands, e-mail: users-help@pdfbox.apache.org > >>> > >>> > >> > >> > >> -- > >> *Evan Williams* > >> Sr. Software Engineer > >> evan.williams@zapprx.com > >> > >> *www.ZappRx.com * > >> > >> > > > > > > -- > > *Evan Williams* > > Sr. Software Engineer > > evan.williams@zapprx.com > > > > *www.ZappRx.com * > > -- *Evan Williams* Sr. Software Engineer evan.williams@zapprx.com *www.ZappRx.com * --e89a8f9219168c3f1605195aef68--