How to flatten PDF form, while still keep the button intact?

Viewed 21

I have flatten pdf form using PDFBOX acroForm.flatten(). but using this method it will remove the button.

I still want the button to work even after I flatten my pdf. This the pdf i want to flatten

1 Answers

Use flatten with parameters:

public void flatten(List<PDField> fields, boolean refreshAppearances)

this will only flatten the fields you want.

Related