Hey Logan,
After setting widgets: true on the export, it does repopulate some of the fields on the import; however, on the second submission we get duplicated widgets in the new XFDF data, if we submit a third time, then we get triplicated widgets and so on.
It also appears that (probably due to the brackets in the field name?) that fields named such as A_FIELD_NAME[1234] do not get repopulated, even though the data is in the XFDF data string on export/import.
For example using the sample document from earlier, this is the xfdf data on first submission:
<?xml version="1.0" encoding="UTF-8" ?><xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve"><pdf-info xmlns="http://www.pdftron.com/pdfinfo" version="2" import-version="3"><ffield type="Tx" name="FLD_SIG_IMAGE[1000]"><font name="Arial" size="12" /></ffield><ffield type="Tx" name="FLD_SIG_IMAGE[1001]"><font name="Arial" size="12" /></ffield><ffield type="Tx" name="txtField"><font name="Arial" size="12" /></ffield><ffield type="Sig" name="SIG_IMAGE_TEST"><font name="Arial" /></ffield><widget field="FLD_SIG_IMAGE[1000]" modified-date="D:20200629142739-05'00'" page="1"><rect x1="106.388" x2="256.388" y1="708.58" y2="730.58" /><border width="0" style="null"><color a="0" /></border></widget><widget field="FLD_SIG_IMAGE[1001]" modified-date="D:20200629142739-05'00'" page="1"><rect x1="106.936" x2="256.936" y1="657.031" y2="679.031" /><border width="0" style="null"><color a="0" /></border></widget><widget field="txtField" modified-date="D:20200629142739-05'00'" page="1"><rect x1="106.388" x2="256.388" y1="617.547" y2="639.547" /><border width="0" style="null"><color a="0" /></border></widget><widget appearance="_DEFAULT" field="SIG_IMAGE_TEST" modified-date="D:20200629142739-05'00'" page="1"><rect x1="108.033" x2="258.033" y1="543.386" y2="575.386" /><border width="0" style="null"><color a="0" /></border><appearances><aappearance name="_DEFAULT"><Normal>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyEAAABFCAYAAABdY+kiAAAACXBIWXMAAB7CAAAewgFu0HU+AAAA7UlEQVR4nO3BgQAAAADDoPlTX+EAVQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwGWAGAAGtvyc4AAAAAElFTkSuQmCC</Normal></aappearance></appearances></widget></pdf-info><fields><field name="FLD_SIG_IMAGE[1000]"><value>testf1</value></field><field name="FLD_SIG_IMAGE[1001]"><value></value></field><field name="txtField"><value>testf3</value></field><field name="SIG_IMAGE_TEST"><value></value></field></fields><annots /><pages><defmtx matrix="1,0,0,-1,0,792" /></pages></xfdf>
When we import this string back into the viewer, it does populate field âtxtFieldâ but does not populate FLD_SIG_IMAGE[1000]. When we submit the data again, this is the exported data string, notice the duplicated widget entries:
<?xml version="1.0" encoding="UTF-8" ?><xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve"><pdf-info xmlns="http://www.pdftron.com/pdfinfo" version="2" import-version="3"><ffield type="Tx" name="FLD_SIG_IMAGE[1000]"><font name="Arial" size="12" /></ffield><ffield type="Tx" name="FLD_SIG_IMAGE[1001]"><font name="Arial" size="12" /></ffield><ffield type="Tx" name="txtField"><font name="Arial" size="12" /></ffield><ffield type="Sig" name="SIG_IMAGE_TEST"><font name="Arial" /></ffield><widget field="FLD_SIG_IMAGE[1000]" modified-date="D:20200629142739-05'00'" page="1"><rect x1="106.388" x2="256.388" y1="708.58" y2="730.58" /><border width="0" style="null"><color a="0" /></border></widget><widget field="FLD_SIG_IMAGE[1001]" modified-date="D:20200629142739-05'00'" page="1"><rect x1="106.936" x2="256.936" y1="657.031" y2="679.031" /><border width="0" style="null"><color a="0" /></border></widget><widget field="txtField" modified-date="D:20200629142739-05'00'" page="1"><rect x1="106.388" x2="256.388" y1="617.547" y2="639.547" /><border width="0" style="null"><color a="0" /></border></widget><widget appearance="_DEFAULT" field="SIG_IMAGE_TEST" modified-date="D:20200629142739-05'00'" page="1"><rect x1="108.033" x2="258.033" y1="543.386" y2="575.386" /><border width="0" style="null"><color a="0" /></border><appearances><aappearance name="_DEFAULT"><Normal>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyEAAABFCAYAAABdY+kiAAAACXBIWXMAAB7CAAAewgFu0HU+AAAA7UlEQVR4nO3BgQAAAADDoPlTX+EAVQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwGWAGAAGtvyc4AAAAAElFTkSuQmCC</Normal></aappearance></appearances></widget><widget index="1" field="FLD_SIG_IMAGE[1000]" modified-date="D:20200629142751-05'00'" page="1"><rect x1="106.388" x2="256.388" y1="708.58" y2="730.58" /><border width="0" style="null"><color a="0" /></border></widget><widget index="1" field="FLD_SIG_IMAGE[1001]" modified-date="D:20200629142751-05'00'" page="1"><rect x1="106.936" x2="256.936" y1="657.031" y2="679.031" /><border width="0" style="null"><color a="0" /></border></widget><widget index="1" field="txtField" modified-date="D:20200629142751-05'00'" page="1"><rect x1="106.388" x2="256.388" y1="617.547" y2="639.547" /><border width="0" style="null"><color a="0" /></border></widget><widget appearance="_DEFAULT" index="1" field="SIG_IMAGE_TEST" modified-date="D:20200629142751-05'00'" page="1"><rect x1="108.033" x2="258.033" y1="543.386" y2="575.386" /><border width="0" style="null"><color a="0" /></border><appearances><aappearance name="_DEFAULT"><Normal>data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyEAAABFCAYAAABdY+kiAAAACXBIWXMAAB7CAAAewgFu0HU+AAAA7UlEQVR4nO3BgQAAAADDoPlTX+EAVQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwGWAGAAGtvyc4AAAAAElFTkSuQmCC</Normal></aappearance></appearances></widget></pdf-info><fields><field name="FLD_SIG_IMAGE[1000]"><value>testf1 - new value</value></field><field name="FLD_SIG_IMAGE[1001]"><value></value></field><field name="txtField"><value>a new value in f3</value></field><field name="SIG_IMAGE_TEST"><value>_DEFAULT</value></field></fields><annots /><pages><defmtx matrix="1,0,0,-1,0,792" /></pages></xfdf>
The duplicated entries wouldnât be so bad except on import for the third submission it seems it is stacking the widgets on top of each other so when you type in the field again it appears you are typing over the previously entered values: