The input PDF can be the same PDF or it can be a different PDF for each row. To make it a different PDF for each row merge fields are used to designate the name or path of the input PDF. PDFs are the only template type that can have the name or path designated by merge fields. PDF templates cannot have merge fields within them. Merge fields can only be used to define the input PDF, name the output PDF, apply watermarks or apply passwords. Each row in the spreadsheet has a unique field that is stamped onto the PDF template, creating a new PDF.
Prepare a data source with a row of data for each PDF.
Create a column in the Excel or CSV data source that contains the text you wish to have stamped onto the PDF. In this example this text will be used to name the new PDFs and will be stamped onto the PDFs.
Select it in the Data tab in the pdfMachine merge profile.
On the Attachments tab of pdfMachine merge select the PDF as the Template File for a dynamically generated PDF.
If you are using a different PDF for each row you will need to type a merge field into the path or name of the template to instruct where pdfMachine merge will get the PDF. Merge fields can only be used to define templates for PDF templates.
Provide a PDF Attachment name for the new PDFs by using the merge field.
Configure the watermark that will appear on the PDF. Use the merge field to make the watermark unique for each PDF.
A new batch of PDFs with a unique name and stamp is produced.