Initially What I did was to loop through my command xfdf strings and call doc.MergeXfdf for each one of them. When I checked the resulting pdf file. It appeared like in the screenshot provided above where replies are not shown as such.
I realized that there might be issues when calling MergeXFDF one by one for each command xfdf string so I what I did next was to combine each xfdf command string into one and manually create an exported XFDF string (seen in from-code4.xfdf) and only call MergeXFDF once. But this still didn’t do what I wanted.
Finally I tried to use
FDFDoc fdf_doc = new FDFDoc(FDFDoc.CreateFromXFDF(xfdf));
doc.FDFUpdate(fdf_doc);
passing my XFDF string there but it still didn’t fix my issue.
FDFDoc fdf_doc = new FDFDoc(FDFDoc.CreateFromXFDF(xfdf));
doc.FDFMerge(fdf_doc)
worked for me in resolving my issue in rendering. It now displays markups with replies correctly as well as the markup’s state (accepted,rejected,etc).
As for my issue regarding grouped markups was not due to the PDFTron C# library but was due to logic on my end.
Yes, the xfdf files I sent aren’t command xfdf. I used my command xfdf strings and extracted the markup part for each one of and combine them into one xfdf file which is the file I sent.