I am trying to create pdf file from xml and xslt, but it doesn’t work.
Hi there,
Hi Erik,
Thanks for your patience.
We have further investigated the issue PDFNEWNET-35355 reported earlier and it does not seem to be a bug. Please note that BindXML expects that summary XML (that it will get after applying XSLT to that supplied XML), will contain special tags related to PDF document object model. Something similar to the following XML after translation.
<?xml version="1.0" encoding="utf-8"?>
<Pdf xmlns="Aspose.Pdf" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="Aspose.Pdf 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 :</Segment>
<Segment>
dsfk mkf mskdf skdfm skdf ldkf mslkfd smdfkms dfkmkf;koki mslmkf mkmfk mlkf lkf mkmsfk l kmfksmfmskf ifmks lkfm smkmfk s
sdfjfhsdfhdsjf lkf fjslkfd ljflskdfpokmlkrt dmlfkger lkvgdhjh fhkjhdhfyez ajd s
sdfjfhsdfhdsjf lkf fjslkfd ljflskdfpokmlkrt dmlfkger lkvgdhjh fhkjhdhfyez ajd s
sdfjfhsdfhdsjf lkf fjslkfd ljflskdfpokmlkrt dmlfkger lkvgdhjh fhkjhdhfyez ajd s
sdfjfhsdfhdsjf lkf fjslkfd ljflskdfpokmlkrt dmlfkger lkvgdhjh fhkjhdhfyez ajd s
sdfjfhsdfhdsjf lkf fjslkfd ljflskdfpokmlkrt dmlfkger lkvgdhjh fhkjhdhfye
</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 the set of sample files, the XML+XSLT cannot generate XML that makes sense for the BindXml method. Please ensure that XML which you get after applying XSLT to XML looks like the aforementioned XML suitable for the BindXml method. In case of any further query please feel free to contact.