Highlighted

Problem with XML encoding while using DDG

Badri_Lakshmina

19-02-2009

Hi,



I have a submit button in a PDF that submits the PDF data in UTF-8 encoded XML format. The PDF hame rich text fields. Hence the XML contains some characters like à which is a valid UTF-8 character.



When I try to recreate the PDF using this XML and the same template used to construct the PDF, the DXFA file is throwing the following exception.



Is there a way I can specify to the DXFA the character set of the XML?



Invalid byte 2 of 2-byte UTF-8 sequence.

[2/17/09 8:30:17:798 EST] 0000003a SystemErr R org.xml.sax.SAXParseException: Invalid byte 2 of 2-byte UTF-8 sequence.

[2/17/09 8:30:17:798 EST] 0000003a SystemErr R at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)

[2/17/09 8:30:17:798 EST] 0000003a SystemErr R at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)

[2/17/09 8:30:17:798 EST] 0000003a SystemErr R at com.adobe.solutions.utils.XMLUtils.initDocument(XMLUtils.java:920)

[2/17/09 8:30:17:798 EST] 0000003a SystemErr R at com.adobe.solutions.utils.DOMPlus.init(DOMPlus.java:140)

[2/17/09 8:30:17:798 EST] 0000003a SystemErr R at com.adobe.solutions.utils.DOMPlus.load(DOMPlus.java:101)

[2/17/09 8:30:17:798 EST] 0000003a SystemErr R at com.adobe.solutions.generatedoc.utils.Utils.getDatasetsNode(Utils.java:344)

[2/17/09 8:30:17:798 EST] 0000003a SystemErr R at com.adobe.solutions.generatedoc.utils.Utils.renderFormsDoc(Utils.java:294)

[2/17/09 8:30:17:798 EST] 0000003a SystemErr R at com.adobe.solutions.generatedoc.utils.Utils.renderOutputDoc(Utils.java:285)

[2/17/09 8:30:17:798 EST] 0000003a SystemErr R at com.adobe.solutions.generatedoc.RenderTag.doAfterBody(RenderTag.java:78)

[2/17/09 8:30:17:798 EST] 0000003a SystemErr R at com.ibm._jsp._templatestitcherflat_5F_dxfa._jspService(_templatestitcherflat_5F_dxfa.java:206)

[2/17/09 8:30:17:798 EST] 0000003a SystemErr R at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:87)

[2/17/09 8:30:17:798 EST] 0000003a SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

[2/17/09 8:30:17:798 EST] 0000003a SystemErr R at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1096)

[2/17/09 8:30:17:798 EST] 0000003a SystemErr R at

Replies

Highlighted

Badri_Lakshmina

20-02-2009

Hi,



I found a solution for this. The DXFA file takes the input XML either as a String or as byte[]. When I changed my code to pass the input xml as byte[] it worked!



Thanks,

Badri.
Highlighted

Varma_LC

02-09-2009

Hi,

     I also running into similar issue would you mind elaborate little bit how you modified the settings.

Thanks in Advance.