Whenever I try to move a field for this document an exception is thrown. What am I doing wrong? Is it a bug? I tried doing a Document.Repair() and there was no change. I tried directly changing the rect attribute of the field without the formeditor and no change. Please advise.
var fil = Path.GetTempPath() + Guid.NewGuid().ToString() + ".pdf";
using (WebClient client = new WebClient()) client.DownloadFile("https://www.irs.gov/pub/irs-pdf/fw4.pdf", fil);
var doc = new Document(fil);
//doc.Repair();//no change
var fe = new FormEditor(doc);
var fld = doc.Form.Fields.First();
var rect = new Rectangle(fld.Rect.LLX, fld.Rect.LLY, fld.Rect.URX, fld.Rect.URY);
//Object reference not set to an instance of an object.
//at Aspose.Pdf.Forms.Form. (Int32)
//at Aspose.Pdf.Forms.Field.set_Rect(Rectangle value)
//at Aspose.Pdf.Facades.FormEditor.MoveField(String fieldName, Single llx, Single lly, Single urx, Single ury)
//at bugdemo.Program.Main(String[] args)
fe.MoveField(fld.FullName, (float)rect.LLX, (float)rect.LLY, (float)rect.URX, (float)rect.URY);