PDFNet 5.7.0.0 Removing metadata blanks form fields

We use the PDFTron product using C.

We have noticed that when we remove the metadata from a PDF file,
using the following code:
  PDFDocInfo docInfo = m_pPDFDoc->GetDocInfo();
  docInfo.SetAuthor("");
  docInfo.SetCreationDate(Date());
  docInfo.SetCreator("");
  docInfo.SetKeywords("");
  docInfo.SetModDate(Date());
  docInfo.SetProducer("");
  docInfo.SetSubject("");
  docInfo.SetTitle("");

  m_pPDFDoc->GetRoot().Erase("Metadata");

that data which has been input into form fields also gets removed.
Obviously we just want to remove the Author etc data and not the data
entered into the form fields.

using docInfo.SetAuthor(""); etc on their own does not seem enough as
some PDF apps (PDFXchange for example) still displays the Author etc

...presumably its being stored in more than one place within the PDF
file structure.

Can provide before & after sample files if needed.

using docInfo.SetAuthor(""); etc on their own does not seem

Yes, this information is frequently replicated in XMP Metadata block.

into form fields also gets removed.

This should not happen. Form fields are not stored in doc info or Metadata stream, so it is not clear how removing this would affect forms.

Could you please forward sample PDFs to support at pdftron. Thank you.

Hi there,

Some more investigation has been done and it looks like the cause
could be manipulation of the annotation occurring elsewhere in the
code base. DEv are checking now,

thanks.