Three steps to Convert XML to PDF

Megan00
Posted by Megan00 under C# category on | Points: 40 | Views : 1470
Below code is for you to convert XML to PDF by three steps:

using Spire.Doc;
namespace XML2PDf
{
class Program
{
static void Main(string[] args)
{
Document mydoc = new Document();
mydoc.LoadFromFile(@"E:\TestScript\XML2PDf\XML2PDf\sample.xml", FileFormat.Xml);
mydoc.SaveToFile("Test.doc", FileFormat.Doc);
mydoc.SaveToFile("test.pdf", FileFormat.PDF);

System.Diagnostics.Process.Start("Test.pdf");
}
}
}

Comments or Responses

Posted by: Naraayanan on: 7/18/2012 Level:Starter | Status: [Member] | Points: 10
Hi
Thanks ...
What is Spire.Doc? Is it 3rd Party Tool...

Posted by: Megan00 on: 7/29/2012 Level:Starter | Status: [Member] | Points: 10
Spire.Doc is a Word component operated on .NET, Silverlight and WPF, it is a third party tool.
Spire.Doc: http://www.e-iceblue.com/Introduce/word-for-net-introduce.html
Posted by: Naraayanan on: 7/29/2012 Level:Starter | Status: [Member] | Points: 10
Hi,
Thanks.

Login to post response