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

Free Support Forum - aspose.com

License File not found in Trial Version

I downloaded Aspose.pdf for .Net. The License folder does not contain the license file instead contains the short cut to a web page.

How can I get a license file for trial version?

Aspose.Pdf.Generator.Pdf pdf1 = new Aspose.Pdf.Generator.Pdf();

Aspose.Pdf.License license = new Aspose.Pdf.License();

license.SetLicense("license"); // Need to set up license file.

pdf1.BindXML(strXmlFileName, null);

pdf1.Save(strDocFileName);//I am trying to convert XML into a PDF and this step does not generate the document.

Please advice.

Ashish

Hi Ashish,

Thanks for your interest in our products.

Kindly use the below link to acquire a temporary license (choose “Get a Temporary License” option) for testing of the product.

http://www.aspose.com/purchase/default.aspx

In case you face any issue or have any more queries, please feel free to contact support.

Thanks & Regards,

Rashid,

Thanks for the help; I got the license file from sales office.

Going forward, the PDF file gets generated but it is blank. I am using following code. XML file has all the data I need. Can you please advice?

Aspose.Pdf.Generator.Pdf pdf = new Aspose.Pdf.Generator.Pdf();

Aspose.Pdf.License license = new Aspose.Pdf.License();

license.SetLicense("Aspose.Pdf.lic");

pdf.BindXML(strXmlFileName, null);//XML file has the data

pdf.Save(strPdfFileName);//This creates the blank pdf file.

Thanks, Ashish

Hi Ashish,

Thank you for your feedback, kindly share the source XML file with us. This will help us to figure out the issue and reply back to you soon.

We apologize for your inconvenience.

Thanks & Regards,

Rashid,

Please find the XML attached.

Thanks, Ashish

Hi Ashish,

Thanks for sharing the template file. I would like to share with you that, the input XML file must follow the Aspose.Pdf for .NET Schema but your provided document is not following the XML Schma provided by Aspose. That's why resultant PDF is blank.

Please check the following documentation links for details.

Introduction to XML Technologies

Create a Hello World PDF document through XML and API

Please feel free to contact support in case you required any further assistance.

Thanks & Regards,

Hello
Ashish,


Thanks for sharing the resource file.

I have tested the scenario and have observed that the source XML file is in WordML format. In order to convert such documents into PDF format, please try using Aspose.Words for .NET. I have used the following code snippet to convert XML file into PDF format. For your reference, I have also attached the resultant PDF that I have generated with Aspose.Words for .NET 10.5.0.

[C#]

// load the source XML file
Aspose.Words.Document doc = new Aspose.Words.Document(“d:/pdftest/GCS94285.xml”);
// save the output in PDF format
doc.Save(“d:/pdftest/GCS94285.pdf”,Aspose.Words.SaveFormat.Pdf);

Adding more to Rashid’s comments, Aspose.Pdf for .NET supports the feature to convert XML file into PDF format but the source XML file must be in Aspose.Pdf for .NET compatible format (according to Document Object Model).
In case you need to convert your own XML file into PDF format, then please try using the XSLT to make it compatible with Aspose.Pdf. In case you have any further query, please feel free to contact.</font>
We are really sorry for your inconvenience.