We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

XML parsing error (incorrect token - error code 4) - When Acrobat Reader X/XI open form filled by pdf.kit


I tried evaluate form fill design by Adobe LiveCycle Designer ES2 using below code.
It’s filling is ok and well open in FoxIt except Acrobat X/XI (also include Reader).

When I open form pdf file in Acrobat, It warning 3 times same error dialoge - "Xml parsing error (incorrect token/error code 4) 49 lines; I don’t know exactly english message, because I translated local to english - and than show correctly.

I guess that error cause by evaluation statement generated by Aspose.Pdf.Kit because that “evaulation only” message showed in Acrobat but didn’t show in Foxit.

Please support to resolve this problem.

— test code —

package com.henc.aspose;

import com.aspose.pdf.kit.*;

* Hello world!
public class App
public static String inFile = “c://work//visa_application.pdf”;
public static String outFile = “c://work///visa_submit.pdf”;

public App() throws Exception {

public void fillForm() throws Exception {
Form form = new Form (inFile, outFile);
String[] fieldNames = form.getFieldsNames();

for (int fieldIdx = 0; fieldIdx <fieldNames.length; fieldIdx++) {
System.out.println(“field:” + fieldNames[fieldIdx]
+ “, type:” + form.getFieldType(fieldNames[fieldIdx]));
try {
if (fieldNames[fieldIdx].indexOf(“RadioButtonList”) > 0 ||
fieldNames[fieldIdx].indexOf(“AddSubformButton”) > 0) {

} catch (ClassCastException ex_cast) {
form.fillField (“form1[0].#subform[1].#field[58]”, "A " + fieldIdx);


public static void main( String[] args ) throws Exception
new App();

Hi Jun,

Thanks for your inquiry. Could you please share your source document here? So we test it at our end and provide you more information accordingly.

Sorry for the inconvenience faced.

Best Regards,


Please refer attahced source form and code.
Additionally, I’m looking for pdf.kit API for recognize radio and combo(list) box object.
I tried each correct value not only text field also several object, but not yet found adoptable APIs.


Hi Jun,

Thanks for sharing the resource files.

have tested the scenario and I am able to notice the same problem. For the sake
of correction, I have logged this issue as
our issue tracking system. We will further look into the details of this problem
and will keep you updated on the status of correction. Please be patient and
spare us little time.

We are sorry for this inconvenience.