Q: One thing we are noticing in our generated PDF's that check boxes
sometimes render properly (i.e., appear checked) and sometimes they do
not. The code snippet is as follows:
if (type == Field.Type.e_check) // just to be sure
{
if (check == true)
field.SetValue("Yes");
else
field.SetValue("No");
}
type is Field.Type and check is a boolean passed into the method that
handles check boxes. The only difference in our entire implementation
over what your samples suggest is in how we are refreshing
appearances.
Again, this does not occur all the time and in some cases code always
sets a check value in one of the fields irrespective of the data. In
other words, irrespective of underlying data or logic, there are a few
check boxes that are always checked (for ex: if(condition) then check
that, else check this). The problem is that this is very inconsistent.
Sometimes they appear fine, other times they do not. There is one
field (gender: Male/Female) that almost always works; this is the
first check box on the PDF, but others on the form, below this, have
inconsistent appearances.
Any ideas?
------
A: I believe that the following article should answer your question:
http://groups.google.com/group/pdfnet-sdk/browse_thread/thread/6cc3671abb568a9/9668095e624c839e
(or search for "toggle checkbox" in this forum).