I am using Aspose.Pdf for .NET - Aspose.Pdf_7.2.0. I would like to take the pdf form located at http://www.epa.gov/osweroe1/docs/chem/t2form2012.pdf and create a new pdf document that is the same form repeated multiple times, just with different data.
So if I had a result set with 5 entries that contain all of the data to populate the form, I would like to populate the first document, then populate and append documents 2-5. I would like each document to still be editable, so I don’t want to flatten the pdf before concatenation.
I am currently unable to concatenate the documents. I get the error message: System.Xml.XPath.XPathException: ‘topmostSubform_Aspose_N#1’ has an invalid token.
at MS.Internal.Xml.XPath.XPathParser.ParseXPathExpresion(String xpathExpresion)
at System.Xml.XPath.XPathExpression.Compile(String xpath, IXmlNamespaceResolver nsResolver)
at System.Xml.XPath.XPathNavigator.Select(String xpath)
at System.Xml.XmlNode.SelectNodes(String xpath)
I have attempted to modify the form field names in hope that that would then allow the document to concatenate, but I have not had any luck with that either.
Is there a way with Aspose.pdf to take the pdf from the url from above, duplicate the pdf, populate the form elements on each page with different data, and save the pdf? I basically just want to fill that form our with code a bunch to times then put them all together into one editable pdf file.
I have attached a small VS project that shows the error.