Hi,
I have a xml file which contains UTF-8 chanracters . How should I handle this characters while binding this xml with aspose ? Please provide a code snippet .
xml file :
<?xml version="1.0" encoding="utf-8" ?>
Hi,
I have a xml file which contains UTF-8 chanracters . How should I handle this characters while binding this xml with aspose ? Please provide a code snippet .
xml file :
<?xml version="1.0" encoding="utf-8" ?>
Hello Srinivas,
Thanks for using our products.
In order to render the source XML containing UTF-8 character into PDF format, you need to first save the source XML with UTF-8 encoding (please take a look over attached image file). Please take a look over the attached PDF document that I have generated using following code snippet when using Aspose.Pdf for .NET 5.1.0 (.net4.0 dll) over Windows7 Professional 64Bit and Visual Studio 2010. In case you still face any problem or you have any further query, please feel free to contact. We apologize for your inconvenience.
PS, when using ANSI encoding for source XML, you will face problems while converting the XML containing UTF-8 characters into PDF.
[C#]
//Instntiate the Pdf object by calling its empty Constructor
Pdf pdf1 = new Pdf();
// bind the XML document
pdf1.BindXML(@"d:/pdftest/Data.xml",null);
// save the resultant PDF
pdf1.Save(@"d:/pdftest/UTF-8_Test.pdf");