FillImageField does not fill multiple fields with same name

FillImageField only fills first field while FillField fills all fields with the same name.

This issue is preventing us from going live, please let me know if there is a workaround or an alternate approach.

Thank you,

Nou

======Code=======

static void Main(string[] args)
{

var License = new Aspose.Pdf.Kit.License();
License.SetLicense("Aspose.Pdf.Kit.lic");

var Form = new Aspose.Pdf.Kit.Form(@"C:\LAA-0105AO.pdf", @"c:\aaaaaaaaa1.pdf");
var Form2 = new Aspose.Pdf.Kit.Form(@"C:\LAA-0105AO.pdf", @"c:\aaaaaaaaa2.pdf");

foreach (var item in Form.FieldsNames)
{

System.Diagnostics.Trace.WriteLine(item);
// if(item.StartsWith("SIG_X_PI"))
{

Form.FillImageField(item,@"c:\sig.png");
Form2.FillField(item, "Nou");

}

};

Form.FlattenAllFields();
Form.Save();

Form2.FlattenAllFields();
Form2.Save();

}

Hi Nou,

I have reproduced this problem at my end and logged it as PDFKITNET-14986 in our issue tracking system. Our team will look into this issue and you’ll be updated via this forum thread once the issue is resolved.

We’re sorry for the inconvenience.
Regards,

Hi Shahzad,



This issue is a critical impact on our business. Can you provide an update? Is this something that can quickly be addressed with a patch? Please let me know as soon as possible.



Thanks,

Nou

Hi Nou,

I would like to share with you that this issue was logged recently and our team still need to investigate this issue to find out the cause of the problem. I have contacted our development team regarding the ETA for the resolution of this issue. You’ll be updated with the status the earliest possible.

We’re sorry for the inconvenience.
Regards,

The issues you have found earlier (filed as 14986) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Hi,

The issue still exists, see attach files. This issue is critical to our business please provide feedback as soon as possible.

Thank you,
Nou

==code==

License.SetLicense("Aspose.Pdf.Kit.lic");

string infile = @"e:\pdf\nwl\01-9046FR-00.pdf";

string field1 = "SIG_X_PI";

var Form = new Aspose.Pdf.Kit.Form(infile, @"e:\pdf\nwl\output1.pdf");

var Form2 = new Aspose.Pdf.Kit.Form(infile, @"e:\pdf\nwl\output2.pdf");

Form.FillImageField(field1, @"c:\coss\sig.png");

Form.FillImageField("SIG_X_AGENT", @"c:\coss\sig.png");

Form.FillImageField("SIG_X_OWN", @"c:\coss\sig.png");

Form.FlattenAllFields();

Form.Save();

Form2.FillField(field1, "Nou");

Form2.FillField("SIG_X_AGENT", "Agent");

Form2.FillField("SIG_X_OWN", "Owner");

Form2.FlattenAllFields();

Form2.Save();

System.Diagnostics.Process.Start(@"e:\pdf\nwl\output1.pdf"); ;

System.Diagnostics.Process.Start(@"e:\pdf\nwl\output2.pdf"); ;

Hi Nou,

I have tested the issue at my end and noticed that the fields you referenced in the attached sample are contained only once in the sample PDF file. You can see all the fields using following statement:


string[] names = Form.FieldsNames;

Please try it at your end with some file containing multiple fields with the same name. If you still find any problems, please share that file with us.

If you have any further questions, please do let us know.
Regards,



Hi,

Sorry, I should have been a little more specific… The issue is that the image is placed somewhere in the middle of the page, you can see it in output1.pdf.

I’m not sure if this should be logged as a new issue or is something that is related to the this issue.

Thanks,
Nou

Hi Nou,

The reason that the images are placed in the center is that the fields are present on those locations. You can see this using Adobe Acrobat or Adobe Live Cycle. In order to place the filled images on some other location, you need to adjust the size and location of the fields.

Please try this at your end. If it still doesn’t work or you have any further questions, please do let us know.
Regards,