Check Box value not saving

stew1204 08-01-2019

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?

Mark Solution

Are these answers useful?
Help other community members by marking useful answers as accepted.

Accepted Solutions (0)

Answers (5)

Answers (5)

altrue990 12-01-2019

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.

stew1204 11-01-2019

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

altrue990 10-01-2019

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).