Problems with BindXML command

the command: “BindXMLwith the two attached files gives me the following error:


{“XmlException: The ‘meta’ start tag on line 4 position 6 does not match the end tag of ‘head’. Line 42, position 5.”}




2.2



thanks

Hi Robert,

Thanks for your inquiry. I have tested the scenario with your shared document using Aspose.Pdf for .NET 10.1.0 and managed to observe the reported issue. For further investigation, I have logged an issue in our issue tracking system as PDFNEWNET-38270 and also linked your request to it. We will keep you update via this thread regarding the issue status.

Please feel free to contact us for any further assistance.

Best Regards

Hi Robert,

Thanks for your patience. Our product team has investigate and found that your shared XML+XSLT does not generate XML that Aspose.Pdf engine expect. Please pay attention to the fact that BindXML() supposes that summary XML (that will got after applying XSLT to that supplied XML) will contain special tags related to PDF document object model. Something like this XML must be got after translation.

[XML]

<?xml version="1.0" encoding="utf-8" ?>

<Pdf xmlns=“Aspose.Pdf” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=“Aspose.Pdf<o:p></o:p>

C:\PROGRA~1\Aspose\ASPOSE~1.NET\Xml\Aspose.Pdf.xsd” DestinationType=“FitPage”>

<Section ID=“section1” PageMarginLeft=“1cm” PageMarginRight=“1cm” PageMarginTop="4.5cm"PageMarginBottom=“3.5cm” PageSize=“A4”>

<PageBorder>

<All BorderStyle=“Normal”></All>

</PageBorder>

<Image ID=“id1” File=“PDFNET-15770-1.gif” Type=“Gif” FixHeight=“5cm” FixWidth=“15cm” Alignment="Center"MarginTop=“1cm”></Image>

<Image ID=“id2” File=“PDFNET-15770-2.gif” Type=“Gif” FixHeight=“10cm” FixWidth=“15cm” Alignment="Center"MarginTop=“1cm”></Image>

<Text MarginLeft=“2cm” MarginRight=“2cm” FontName=“Arial” MarginTop=“1cm”>

<TextBorder>

<All BorderStyle=“Normal”></All>

</TextBorder>

<Segment IsTrueTypeFontBold=“true” FontSize=“12”>Commentaires :#$NL</Segment>

<Segment>

dsfk mkf mskdf skdfm skdf ldkf mslkfd smdfkms dfkmkf;koki mslmkf mkmfk mlkf lkf mkmsfk l kmfksmfmskf ifmks lkfm smkmfk s#$NL

sdfjfhsdfhdsjf lkf fjslkfd ljflskdfpokmlkrt dmlfkger lkvgdhjh fhkjhdhfyez ajd s#$NL

sdfjfhsdfhdsjf lkf fjslkfd ljflskdfpokmlkrt dmlfkger lkvgdhjh fhkjhdhfyez ajd s#$NL

sdfjfhsdfhdsjf lkf fjslkfd ljflskdfpokmlkrt dmlfkger lkvgdhjh fhkjhdhfyez ajd s#$NL

sdfjfhsdfhdsjf lkf fjslkfd ljflskdfpokmlkrt dmlfkger lkvgdhjh fhkjhdhfyez ajd s#$NL

sdfjfhsdfhdsjf lkf fjslkfd ljflskdfpokmlkrt dmlfkger lkvgdhjh fhkjhdhfye#$NL

</Segment>

</Text>

<Image ID=“id3” File=“PDFNET-15770-3.gif” Type=“Gif” FixHeight=“10cm” FixWidth=“15cm” Alignment="Center"MarginTop=“1cm”></Image>

<Image ID=“id4” File=“PDFNET-15770-4.gif” Type=“Gif” FixHeight=“10cm” FixWidth=“15cm” Alignment="Center"MarginTop=“1cm”></Image>
</Section>

</Pdf>

But, as we can see from set of your sample files, the XML+XSLT files cannot generate XML that make sense for BindXml method - f.e. it does not contain any PDF tag neither in XML nor in XSLT. Please ensure that XML got after applying of XSLT to XML looks like aforementioned XML suitable for BindXml method. You may please refer Aspose.Pdf XML schema for the purpose.

Please feel free to contact us for any further assistance.

Best Regards,