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

Free Support Forum - aspose.com

Problem with umlauted charactes (Ä-Ö etc..)


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

// save the output PDF document and release the object
}catch(Exception e) {

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

Dear Kalliokorpi ,

Thanks for considering Aspose.Pdf.Kit.

Honestly, we didn't consider about the umlauted charactes before. Would you please provide the PDF template so as to reproduce the problem? Thank you very much.

Best regards.


Thanks for a quick reply. I’ll attach a new xml and a pdf. Notice that if you remove umlauted characters merge works just fine, so I guess there’s something wrong with the aspose class ?

Dear Kalliokorpi,

Thanks for your sharing resources. This problem has been reproduced and reported as PDFKITJAVA-6305. We will fix it ASAP, and the ETA is about two weeks. Once finished, I wil inform in this thread.

Best regards.


Any news about this issue ?

Dear Kalliokorpi,

This bug has already been fixed. It will be included in the next coming release. Thanks for you patience.

Best regards.

Any idea when the fixed release is available to download ?


Please download the latest release ( from here.