Form values not visible after flattenAnnotations(false)

Thank you for the XFDF String. We tried the following code on our end, but was unable to reproduce the issue:

`
try
{
PDFDoc doc = new PDFDoc(“OoPdfFormExample.pdf”);
FDFDoc fdoc = FDFDoc.createFromXFDF(“annot.xfdf”); // this xfdf is the string is what you forwarded to us
doc.fdfMerge(fdoc);
doc.refreshFieldAppearances();
doc.flattenAnnotations(false); // I want to flatten the entire document, not only form fields but also other annotations
ByteArrayOutputStream merged = new ByteArrayOutputStream();
doc.save(merged, SDFDoc.e_linearized, null);
merged.flush();
byte[] b = merged.toByteArray();
try (FileOutputStream fos = new FileOutputStream(“out.pdf”)) {
fos.write(b);
fos.close(); //There is no more need for this line since you had created the instance of “fos” inside the try. And this will automatically close the OutputStream
}

//doc.save("/vagrant/merged.pdf", SDFDoc.e_linearized, null);
doc.close();
}
catch(PDFNetException e)
{
e.printStackTrace();
System.out.println(e);
}
catch(IOException e)
{
e.printStackTrace();
System.out.println(e);
}
`

The “out.pdf” file generated contains the flattened fields as expected. Could you please let us know if we need to do anything differently? We are using 6.7.1 on our end.

Thanks.