tags:

views:

203

answers:

2

Am getting this error when try to populate a PDF form field using the <cfpdf> tag

The markup in the document following the root element must be well-formed.

When I give overwritedata="yes" the same code works fine, but overwrites the existing data. I noticed there was some fields on the an "arrary" in the document which I saw when I did this: <cfdump var="#resultstruct#">. The "array" part is missing in the new, overwritten document.

The exception goes like this:

rg.jdom.input.JDOMParseException: Error on line 92: The markup in the document following the root element must be well-formed.
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:468)
    at org.jdom.input.SAXBuilder.build(SAXBuilder.java:851)
    at coldfusion.pdf.XFADataXMLGenerator.createFormXMLData(XFADataXMLGenerator.java:108)
    at coldfusion.tagext.lang.PDFFormTag.doEndTag(PDFFormTag.java:276)
    at cfpopulatePDF2ecfm344978773.runPage(C:\ColdFusion8\wwwroot\CFIDE\populatePDF.cfm:26)
        ...
+1  A: 

The obvious question: Is the markup in the document following the root element well-formed?

You are seeing an XML parser error message, not a <cfpdf> specific message.

Make sure that the document you process is well-formed according to XML rules.

Tomalak
How to make the formatting correct for a pdf document deigned in lifecycle designer
Java Guy
A: 

can you post your coldfusion code?

Rich
<cfpdfform action="populate" source="#sourceDirectory#\T.pdf" destination="#destinationDirectory#\test3343.pdf" > <cfpdfsubform name="form1"> <cfpdfsubform name="pageOne"> <cfpdfsubform name="overallSection" > <cfpdfsubform name="overallQA" > <cfpdfformparam name="overallRating" value="2"/> </cfpdfsubform> </cfpdfsubform> </cfpdfsubform> </cfpdfsubform> </cfpdfform>
Java Guy