Expand my Community achievements bar.

Check Box value not saving

Avatar

Level 2

Upating a PDF file using Adobe SDK and VB.Net.  Text and Date fields update and save without any problems, but Check Boxes will update, but not save.  If I display the PDF file after updating the Check Boxes are checked, but after PDF file is saved they are not checked.  The PDF file was created with LiveCycle.  To test my program I created a PDF file with Acrobat.  The Check Boxes update and save on the PDF created with Acrobat, but the Check Boxes do not save on PDF created with LiveCycle.  Is there a different method to upate/save Check Boxes on a PDF created with LiveCycle?

5 Replies

Avatar

Level 4

The on / off state of the checkbox can be toggled using a custom value. Make sure you are setting the checkbox object to the correct value for the state you want (checked vs. unchecked).

Avatar

Level 2

According to the properties of the check box the 'On Value' is a 1 and the 'Off Value' is a 0.  See screen captures below.  I have tried both "1" and 1, both values mark the check box checked when document is displayed (Opened), but neither one saves when you save the document.  Can you identify what the 'custom value' is for the checked and unchecked state?

Code snippet:

"form1[0].#subform[0].cbComplaint[0]").value = "1"

"form1[0].#subform[0].cbComplaint[0]").value = 1

Code to display document:

AcroExchPDDoc.OpenAVDoc("Test")

Field Tab.jpgUntitled.jpg

Avatar

Level 4

Looking at your code snippets, if you are changing the values within the form and are using JavaScript, you must modify the `rawValue` property rather than the `value` property. I do not have experience with the Adobe SDK, but keep in mind that most APIs used to modify PDFs will modify only the AcroForm representation of the form. If you are using a dynamic form, you will have to update the XML of the XML Data DOM by hand.