Hello

Thanks for the answers. I have attached two PDFs by hopefully removing all
traces that could violate the NDA, which I can't get to work.

>> Normally when a checkbox is checked the fields value AND the appearance
> >> need to be updated. This is not the case with your form. How was the
> value
> >> of the original form set? Which software?
> >>
> >
> > The value set in the form is by simply clicking it in Adobe Acrobat
> > (Reader). It sets the field accordingly, nevertheless for a set field,
> > getValue() still returns null. The forms themselves were created with
> > InDesign, I think. Not sure though. So, you're kind of implying that
> > independent of the field type (Textbox, PrintButton, Checkbox,
> > Radiobutton), PDFBox would normally expect the value of a field to be
> !null?
>
> I did a quick test with a newly created form using Adobe Acrobat and
> setting the checkbox also with Acrobat. There the value is not null when
> the checkbox has been checked.
>

I have attached now PDFs, where with my tool the value is null.

> How could I deal with this? Because this is exactly what seems to fail and
> > also cause this dreaded exception message when trying to fill out the
> forms
> > with anything other than PDTextbox.
>
> Without looking at the form:
>
> a) test if getValue returns null if not take that value
> b) if it returns null test if the box has been checked - if yes take that
> value.
>

Which value?


> use the value retrieved from a) or b) to set the fields value in the pdf
> template.
>

I'm not sure which value you mean.


> What would be helpful is either a screenshot of the form fields entries
> using the PDFDebugger [
> http://pdfbox.apache.org/1.8/commandline.html#pdfDebugger] or the
> printout of the fields getDictionary() method so there is some more
> information about how the field definition looks lie. Best would be to have
> the form of course.
>

Attached. Also you can find the code here: http://pastebin.com/Ra0ebSis.
Let me know if something else is needed.

The idea is that you call it with the template TestTemplate.pdf and the
input PDF Test.pdf, resulting in an output PDF that is a carbon-copy of the
input PDF, but with the template PDF CI/CD (in my test case they are
identical, but it serves the purpose).


> >
> > Would anybody here be willing to have a Skype or Teamviewer session with
> me
> > tonight or tomorrow night to have a look at the problem? We're willing to
> > pay for such support. If so, please send a private message to me, so we
> > don't clutter this mailing list.
>
> I'm currently on travel so won't be able to do that


Thanks, anybody else?

Cheers
Roberto
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to