1. opendoc.pdf - original file
2. opendoc.xfdf - original file annotations + 4 arrows i added via webviewer
<annots>
<line subject="Line" page="0" rect="223.767167,751.333133,278.278165,789.005343" flags="print" name="5ac66878-e1b3-52f3-d678-35a9178a95c2" title="aaa" date="D:20160616215017+03'00'" color="#000000" width="0.75" opacity="1" creationdate="D:20160616215017+03'00'" start="224.52,752.08" end="277.53,788.26" head="OpenArrow" tail="None"/>
<line subject="Line" page="2" rect="254.326448,761.311674,354.364539,792.747296" flags="print" name="302f641a-4624-7ec4-6b09-f2f1aa6ac69e" title="aaa" date="D:20160616215036+03'00'" color="#000000" width="0.75" opacity="1" creationdate="D:20160616215036+03'00'" start="255.08,762.06" end="353.61,792" head="OpenArrow" tail="None"/>
<line subject="Line" page="2" rect="256.197425,784.387049,337.525751,804.596813" flags="print" name="9cf62161-cf34-237f-78a1-a2588b602304" title="aaa" date="D:20160616215036+03'00'" color="#000000" width="0.75" opacity="1" creationdate="D:20160616215036+03'00'" start="256.95,785.14" end="336.78,803.85" head="OpenArrow" tail="None"/>
<line subject="Line" page="2" rect="225.638144,774.408509,285.138412,813.951695" flags="print" name="c8752689-c66d-a59f-5e75-284f961979c7" title="aaa" date="D:20160616215037+03'00'" color="#000000" width="0.75" opacity="1" creationdate="D:20160616215037+03'00'" start="226.39,775.16" end="284.39,813.2" head="OpenArrow" tail="None"/>
</annots>
3. here is the export_opendoc.pdf result, as you can see instead of showing 4 arrows (one in page1, other three in page 3, it shows just single arrow)
this behavior of "missing" elements is consistent over different types of annotation types and with different varing base pdf files.
the merge code i used is trivial
if (System.IO.File.Exists(pdf_file))
{
using (PDFDoc pdfdoc = new PDFDoc(pdf_file))
{
pdfdoc.InitSecurityHandler();
if (System.IO.File.Exists(xfdf_file))
{
using (FDFDoc fdoc = new FDFDoc(FDFDoc.CreateFromXFDF(xfdf_file)))
{
//fdoc.Save(fdf_file);
pdfdoc.FDFMerge(fdoc);
pdfdoc.FlattenAnnotations();
}
}
pdfdoc.Save(export_file, SDFDoc.SaveOptions.e_linearized);
}
}
let me know if you able to reproduce this bug over your machine.
Many many thanks
Danny