Hi
For some reason I can’t merge xml -file with umlauted characters to the pdf. All I get is a SAXParseException.
[Fatal Error] :3:9: Invalid byte 2 of 2-byte UTF-8 sequence.
org.xml.sax.SAXParseException: Invalid byte 2 of 2-byte UTF-8 sequence.
import com.aspose.pdf.kit.;
import aspose.pdf.kit.;
public class ImportXML {
static String path = “/tmp/”;
public static void main(String[] args) {
path = args[3];
try {
// Assign input and output PDF documents
Form form = new Form(args[2], path + args[1]);
// Select a xml file with contents of the form
String xmlFile = path + args[0];
// Import the values from the XML to the output PDF form
form.importXml(xmlFile);
// save the output PDF document and release the object
form.close();
}catch(Exception e) {
System.out.println(e.toString());
}
}
}
Any idea what is going wrong ?
I’ll include the xml file I tested with.
This message was posted using Page2Forum (attachment) from Import and Export into XML - Aspose.Pdf.Kit for .NET and Java