FDFDoc::MergeAnnots is not working with fields

I'm trying to merge list of annotation commands to PDF.

To achieve this I'm using FDFDoc::MergeAnnots. Any kind of annotations are merged as expected, but not fields. I checked the FDFDoc content before and after merge and also the annotation command which contains field update. Everything looks valid, but after merge, all fields stay in their default state.

I'm using this code:

using (PDFDoc pdfdoc = new PDFDoc(pdfFilePath))
  using(FDFDoc fdoc = pdfdoc.FDFExtract(PDFDoc.ExtractFlag.e_both))
    // state of FDFDoc before merge

    annotationsByIndex.ForEach(annotation => {
      // merged annotation commands

    // state of FDFDoc after merge

    bytes = pdfdoc.Save(SDFDoc.SaveOptions.e_linearized);

Tipical annotation command for field is:

<?xml version="1.0" encoding="UTF-8" ?>
<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
<field name="Address 1 Text Box">
<add />
<modify />
<delete />

I manage to change field values directly, using this code:

fdoc.GetField("Address 1 Text Box").GetValue().SetString("12345");

So I can parse annotation commands, and update fields manually, but would like to avoid this if possible.

Do you have any suggestions?

Sorry for the delay in a response.

That should work as you expected.

Could you provide us the output from PDFNet::GetVersion()?

If you have not already, you can try the latest version.

It’s version is 6.6142388 and I’ve tried the latest which behaves same.

So, any suggestions?

Sorry for the delay in an update.

A developer is working to update FDFDoc::MergeAnnots to also support importing fields. I do not have a timeline/schedule yet for this, so I will keep you updated.

Thank you for your patience.

Thank you for your patience.

This issue is fixed in our latest releases (6.10).

Please let me know how the latest build works for you.