I have 1-4 PDF files with form text and checkbox fields that will be assigned values from the database based on answers supplied by the end-user.
I need to merge all PDF files dynamically into 1 PDF file that is both saved to disk and pushed to the browser.
The only way I have gotten this to work is the following code:
Dim MyDocument As MergeDocument = New MergeDocument()
MyDocument.Append(MapPath("template_doc1.pdf"))
MyDocument.Append(MapPath("template_doc2.pdf"))
MyDocument.Append(MapPath("template_doc3.pdf"))
Dim MyPage As ceTe.DynamicPDF.Page = MyDocument.Pages(0)
MyDocument.Form.Fields("txtYear").Value = "2008"
MyDocument.Form.Fields("txtOwner1Name").Value = "TESTING"
MyDocument.Form.Fields("cbInitialApp").Value = "Yes"
MyDocument.Form.Fields("txtAppYear").Value = "2008"
MyDocument.Form.IsReadOnly = True
MyDocument.Draw(MapPath("finaldoc.pdf"))
MyDocument.DrawToWeb("finaldoc.pdf")
Response.End()
Which means that I would need to define all the Form Fields to be unique across all the PDF documents that are to be used. Am I performing this task correctly? Or is there a better recommended solution?
Merge 4 docs into 1 w/ dynamic data
Re: Merge 4 docs into 1 w/ dynamic data
Support · Jan 24, 2008Hello,
If you are going to merge the PDF documents having the form fields with same name then you can reorganize the field names by using the MergeOptions class. You will have to use the new reorganized names when filling the form field from the main final PDF document. You can refer to the Form Filling
topic for this.
Thanks,
ceTe Software Support Team.