Add Form Field in PDF and add table at the bottom of PDF document using Aspose.PDF

Hi,
I am currently trying to add a table of results to a PDF which is currently being generated from a PDF form (using Aspose for .Net). I have run into the following obstacles:

  • The Pdf class seems to be the only way of adding a table, but it doesn’t appear to allow loading from an existing PDF file
  • The Form object does not give any information about the location and formatting of fields and in any case doesn’t allow inserting tables, etc
  • I can’t add the table as HTML since the HTML to PDF feature is only available to the Pdf object
As far as I see it, I have to make a choice between one of the following options:
  1. generate the entire PDF from scratch using the Pdf object, in which case I can manually add form fields or simply the values that should be stored in these instead
  2. edit the form using the FormEditor and add in several text fields to mimic the cells of a table
  3. use XSLT to generate the PDF instead of using the form
Options (1) and (3) are not desirable because we would much prefer to start with a PDF form. Option (2) is not desirable because you run into issues of text being truncated if it is too long for a cell and also we don’t know where to place the fields in relation to the rest of the form.

Is it possible to create a new instance of a Aspose.Pdf.Pdf object by loading from an existing PDF file? This would allow us to fill out the form and then add in the table at the end. If not, what other methods could I look at?

Does anyone else have any other ideas how this could be done?

Thanks,
Whitey.

Hello Whitey,

Thanks for considering Aspose.

Aspose.PDF is a component that is used to create a Pdf from scratch. If you need to make changes to any existing Pdf file than please refer to Aspose.Pdf. Your requirement for filling the Form fields present in already created Pdf file can be accomplished using Aspose.Pdf.Form class. For related information on how to fill form fields in already created Pdf, please visit Add, Delete and Modify Form Fields.

Regarding your requirement, for adding a table at the end of the Pdf file , I am sorry to inform you that, currently this feature is not supported in Aspose.Pdf. We will try to support this in future, but I am afraid we cannot support it in short time.

@whitey

We are excited to share with you that adding header/footer functionality has now been added to the API. Please refer to the following article in API documentation to add table at the bottom of the PDF document.