Mail Merging Feature using a PDF file as a template

How can I implement the same as mail mergin with GemBox.Document but instead of a docx template, using a PDF that contains a form.

Currently, GemBox.Document doesn’t have support for this.
Nevertheless, can you tell me a bit more about this requirement?

You see, the problem is that PDF files are fixed documents, and the nature of the mail merge process is to add dynamic data to the document. For instance, a single MERGEFIELD element might replaced with one or more words or even a sentence(s) which could cause other content to be moved so that it can fit.

This is normal for flow document types (like DOCX, RTF, HTML), the moving of the content is not something that you need to worry about because the whole content is flowable, but in PDF the content is specified exactly on which page and on which coordinates of the page the content is located, so it’s not designed to adjust the content (to move it dynamically).

Another example would be to have a table in which you want to dynamically add rows using merge range. Each new row should push down the content that comes after the table and when the pushed content (or even the new row) cannot fit on the current page, it should be moved to the next.

So in short, what I’m trying to say is that I don’t believe that PDF templates are adequate for the mail merge process. They should only be used for replacing form fields, which don’t have the same capabilities as the mail merge process.

Regards,
Mario

Makes sense what you say,

I think what I need is replacing form fields, is it difficult to show me how to do that in a pdf?
I found this link Update Word Form Controls from C# / VB.NET applications but not sure if this works the same using a PDF template… also, can you show me how do you do a PDF template to use it for replacing form fields?

As mentioned before, I’m afraid that currently GemBox.Document doesn’t have support for this because its PDF readers will not convert PDF interactive form fields to Word form controls.

So for now, you’ll have to use GemBox.Pdf to fill out those fields.
Please check the following example:

I hope this helps.