PDFDocument flatten all form field

Hi,


I try to flatten all form fields in PDFDocument, but nothing work.

I need to remove all active form field and display only values.


I try set all annotation (form fields) property

annot.isReadOnly = true


but this only set form field to read only mode, it still rendered, but it is only inactive.

I need completty remove it and show only value.


How can I flatten all form field over PDFDocument?