Creating a PDF doc from xml and xlst file pair

Hi.My namae is cemil karapinar.I started to evaluate Aspose.Pdf .for .net. product.

When I used BindXML method it waited indefinetly resulting error "The remote server returned an error: (500) Internal Server Error."

I could not understand why it needs to connect a remote server?

My code is as following.


Aspose.Pdf.Generator.Pdf pdf = new Aspose.Pdf.Generator.Pdf();
pdf.BindXML(@"D:\source.xml", @"D:\source.xslt");
pdf.Save(@"D:\target.pdf");

Could you help me Why I failed?

Hi Cemil,


Thanks for your considering Aspose. We will appreciate it if you please share your source files here, so we will test the scenario at our end and will provide you information accordingly.

We are sorry for the inconvenience caused.

Best Regards,

I am sending XML and XSLT files.
I get the error “The remote server returned an error: (500) Internal Server Error.” error.
I can not create a PDF file.

The code I wrote is below.

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

var license = new Aspose.Pdf.License();
//license.SetLicense“Aspose.Pdf.lic”);

pdf.BindXML(“VTI2014000001391.xml”, “VTI2014000001391.xslt”);
pdf.Save(“Invoice.pdf”);

Best Regards,

at System.Net.HttpWebRequest.GetResponse()
at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at System.Xml.XmlTextReaderImpl.OpenAndPush(Uri uri)
at System.Xml.XmlTextReaderImpl.PushExternalEntityOrSubset(String publicId, String systemId, Uri baseUri, String entityName)
at System.Xml.XmlTextReaderImpl.DtdParserProxy_PushExternalSubset(String systemId, String publicId)
at System.Xml.XmlTextReaderImpl.DtdParserProxy.System.Xml.IDtdParserAdapter.PushExternalSubset(String systemId, String publicId)
at System.Xml.DtdParser.ParseExternalSubset()
at System.Xml.DtdParser.ParseInDocumentDtd(Boolean saveInternalSubset)
at System.Xml.DtdParser.Parse(Boolean saveInternalSubset)
at System.Xml.DtdParser.System.Xml.IDtdParser.ParseInternalDtd(IDtdParserAdapter adapter, Boolean saveInternalSubset)
at System.Xml.XmlTextReaderImpl.ParseDtd()
at System.Xml.XmlTextReaderImpl.ParseDoctypeDecl()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlTextReader.Read()
at Š.Ž.Œ(XmlTextReader )
at Š.Ž.e(XmlDocument , XslTransform )
at Š.Ž.BindXML(Pdf , XmlDocument , XslTransform )
at Aspose.Pdf.Generator.Pdf.BindXML(String xmlFile, String xslFile)
at FtpDen.Form1.button1_Click(Object sender, EventArgs e) in D:\Calismalar\Denemeler\FtpDen\FtpDen\Form1.cs:line 49

Hi Cemil,

Thanks for sharing the source documents. While testing the scenario with the latest version of Aspose.Pdf for .NET 9.4.0, we have managed to reproduce the reported issue and logged it in our bug tracking system as PDFNEWNET-37295 for further investigation and resolution. We will notify you via this thread as soon as it is resolved.

We are sorry for the inconvenience caused.

Best Regards,

Hi Cemil,

Thanks for your patience. Our development team has further investigated the issue and found that your shared XML+XSLT files are not following Aspose.Pdf XML schema. As BindXML() expect that summary XML (that will got after applying XSLT to that supplied XML) will contain special tags related to PDF document object model.

Your source XML files are not Aspose.Pdf XML schema compliant so its throwing the error. Please change your source XML files accordingly and try again, Hopefully your issue will be resolved.

We are sorry for the inconvenience caused.

Best Regards,