Skip to main content
hemanthp2811159
Inspiring
October 1, 2018
Answered

Losing Checkbox selection on "Save as" functionality of Dynamically filled PDF form

  • October 1, 2018
  • 1 reply
  • 17601 views

Hi

I have an issue regarding a dynamically filled PDF form losing checkbox selection on using the Saves As functionality

I am describing the workflow which we are using currently to fill the PDF and subsequent issues.

1. We are receiving the PDF template created through "Adobe InDesign"  from a 3rd party vendor.

2. We are using "Apache PDFBox' utility to read the PDF form and fill in all the required fields .. including checkboxes and radio buttons.

3. Once the Filled up PDF is generated through PDFbox,   the PDF opens in a new browser window. All the selections are visible correctly as desired.

Scenario 1 > If i just save the generated PDF through save button on the browser , the PDF is saved correctly & all the checkbox selections are retained.

                     Also, when using Acrobar Pro to inspect the form fields, the check box fields are identified correctly.

Scenario 2 ( Having issue ) >  In case of using "Save As" either on the browser Or "Save As" on the previously saved PDF on disk,   on saving ..   The checkboxes which were selected before displayed without the selections. Also , the previously filled Check Box is also not recognized as a Form Field. Instead the checkbox is almost like a normal image / text almost .

Any help would be very much appreciated.

This topic has been closed for replies.
Correct answer hemanthp2811159

These sorts of problems are often related to software that doesn't generate the field appearance like it's supposed to. It would be interesting to see if the field values are correct. You can see by exporting the form data to a data file (e.g., FDF) or using JavaScript to write the field values to the JavaScript console.


Hi. We found the root cause of the issue . The checkboxes filled by PDFBox are being lost in Acrobat reader DC when the "Save As optimizes for Fast Web View" is being checked under the Edit > Preferences > Documents > Save Settings . When we uncheck the check box , then we can see that the checkboxes are recognized correctly and Save As works without issues. I wanted to check with you if you have encountered such a scenario and if it can be resolved on the pdf template or pdf box end since we wont have control on client m/c settings.

Can it be resolved through a script within the PDF template or some other plugin ?

1 reply

Bernd Alheit
Community Expert
October 1, 2018

What happens when you fill the form with Acrobat.

hemanthp2811159
Inspiring
October 1, 2018

If i open the PDF template with Acrobat Pro and select the CheckBoxes, and click on "Save as" and save , the checkbox selections are retained. I can repeat this any number of times and still the checkbox selections are retained when filled and worked on in Acrobat Pro directly.

Bernd Alheit
Community Expert
October 1, 2018

Thanks Bernd . I will try and compare the internal structure of both of them

On a related note , i found that i am able to view the checkbox selection when i open the "Save As" pdf it within Internet Explorer or another PDF utility other than Adobe Acrobat XI . It seems to be an issue with Pure XFA forms with PDFBox & Adobe Acrobat XI.

The following link https://stackoverflow.com/questions/24149361/form-field-values-set-with-pdfbox-not-visible-in-adobe-reader​   talks about how we need to work with edit the xfa xml .. setting the xfa fields as well. ( Option 2 )

Any idea how can i go about it ? Do i need to set both the AcroForm fields as well as the XFA values at the same time ? I am not very clear about the posters explanation of how to implement Option 2 .


Adobe InDesign doesn't create XFA forms.