Any easy way to perform mailmerge for PDF

Hi Guys,

Currently, I’m using
TextFragment _TF = new TextFragment(xy.Value);
_TF.Position = new Aspose.Pdf.Text.Position(xy.X, xy.Y);
_TF.TextState.FontSize = xy.FontSize;
_TF.TextState.Font = Aspose.Pdf.Text.FontRepository.FindFont(“Microsoft JhengHei”);
_TF.TextState.CharacterSpacing = (float)xy.CharSpace;

to achieve the mailmerge effect but this way is very troublesome because the X, Y value are not that easy to precisely calculate automatically but need to manually adjust one by one, can anyone guide me how to easily and precisely find the value of X, Y or is there any other easy way which can perform the same? thanks.

Hi Mark,

Thanks for your inquiry. You may create PDF form as template and use XML file to import data into the PDF form. To get a Aspose.Pdf supported XML template you may once fill form manually and export the data as XML and later can use that XML template for new data import. Please check following documentation links for detail.

Please feel free to contact us for any further assistance.

Best Regards,