Hi,
I have used PDFBox to create a .pdf file from a .pdf file that I created in
Adobe Acrobat Pro DC version 2019.021.20061.

Here is the process I've been working on:
1.  Create "template" .pdf file in Adobe Acrobat Pro DC
2.  Run my Java program that loads the .pdf file, populates its form
fields, and saves it to a new file on my local disk.
3.  Open the new .pdf file in Adobe Acrobat Reader.

The .pdf file that I created has a date field that doesn't display the date
after I run PDFBox to set all of the fields in the file.  The other fields,
including a text field, a list box, a combo box, a check box, and a radio
button group all get populated, and display correctly in Adobe Acrobat
Reader DC version 2019.021.20061 (same version as Acrobat Pro).

When I click in the date field, the date appears.  But, when I move the
focus away from the date field, the date disappears.

So, it tried setting the AcroForm's "NeedAppearances" property to true,
like this:  acroForm.setNeedAppearances(true).  That makes the date in the
date field display when I open the new .pdf file, but it has an unwanted
side effect.  When I close the document, without making any changes, I get
a message box that asks me if I want to save the changes before closing.

Does anyone have any insight?  I have attached the output file, which
doesn't have "NeedAppearances" set to true (test.pdf).  I have also
attached my "template" file (Acrobat_DC.pdf).

Thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org

Reply via email to