itext-questions  

Re: [iText-questions] Combobox printed, prints undesired value

wasegraves
Fri, 27 Jun 2008 08:56:15 -0700

-------------- Original message ----------------------
From: 1T3XT info <[EMAIL PROTECTED]>
>
<snip>
> I didn't follow the discussion, but I tried the example and to my
> surprise recent Adobe Reader versions say that there's an error in
> the form. So that's something I'll have to investigate.
> 

My Adobe Reader v. 8.1.2, on this computer, processes the online example 
without errors, and displays "English", the first value, as if it were the 
default. The other choices are not revealed until the user selects the field, 
e.g., the first or the second.

> As for the combo box being 'empty' before you click something.
> That's normal if you copy the example from the book.

Adobe Reader, v. 8.1.2, apparently defaults to the first value in the options. 
I vaguely recall having dealt with this several years ago, having had to employ 
the "" or "None" as the first of the options, as I had recommended to the OP. 
Now, for an online form, that's not very satisfying, especially when the first 
option could be something like "Select one", which gives the user a hint as to 
what he's expected to do.

The only other observation I can offer is that the second style of choice field 
is not good to use for tightly laid out forms, as Adobe Reader does not 
collapse the appearance to a single line after a single choice has been made. 
Of course, for multiple choices, you'd want the choices to show, so it makes 
sense "not" to collapse the box.

<snip>

> The first thing you see when you open a form, is the default appearance
> of a field. Only when you click the field (changing it), Adobe Reader
> creates a new appearance.
> 
> Without knowing much about the context of the project, I'd say you'd
> either should take care of the default appearance, or trigger a change
> (for instance with JavaScript) that causes the Reader to create the
> appearance.

<snip>

It seems to me this is not an iText problem. IMO, the OP needs to focus first 
on the requirements for his user interface design, i.e., what he wants the PDF 
to do, and what the appearance should be, and then use itext to create the 
appearance and functionality he wants. He has stated that he has the full 
distribution of Acrobat, no version stated. With the full version of Acrobat, 
he should be able to explore what Acrobat can generate, thereby helping him to 
replicate the desired appearances and othe behaviors with iText.

I've attached the modified version of the example, with "Select one" prepended 
to the options.

Bruno, I've only spent this time on this to save you some, for the reasons you 
know. I'm glad to see Inigo is having a great time at Camp.

Warmest best regards,
Bill Segraves

P.S. I hope the OP shows some appreciation for the free consulting by using the 
PayPal button.

Attachment: choicefields_v2.pdf
Description: Adobe PDF document

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar