Hello,
Thanks for your feedback.
You mean you want to add text and form field to grid, then the output document will be automatically paginated based on the content of the grid? Sorry at present our Spire.PDF doesn't support placing the form fields inside the grid cell. But as for adding text to grid, you could refer to the following code to set up automatic pagination.
- Code: Select all
PdfDocument pdfdoc = new PdfDocument();
PdfPageBase page = pdfdoc.Pages.Add(PdfPageSize.A4);
PdfMetafileLayoutFormat format = new PdfMetafileLayoutFormat();
format.Layout = PdfLayoutType.Paginate;
format.Break = PdfLayoutBreakType.FitElement;
//Add grid
PdfGrid grid = new PdfGrid();
grid.Columns.Add(1);
for (int i = 0; i < 40; i++)
{
PdfGridRow row = grid.Rows.Add();
row.Cells[0].Value = "If you have questions regarding your account or would like to be contacted by a representative,please call BENCOR Administrative Services www.google.com";
}
grid.Draw(page, new PointF(0, 20), format);
//Save
pdfdoc.SaveToFile("result.pdf", FileFormat.PDF);
Besides, I'm a little confused about "How to set dynamic position xaxis and yaxis for the form fields" you mentioned. Could you please provide more details about your requirement to help us further investigate it? Such as the complete code you are using and your desired output. You could send them to us(
support@e-iceblue.com) via email. Thanks in advance.
Sincerely,
Rachel
E-iceblue support team