Hi
Hi Arthur,
We are sorry for the inconvenience faced. While testing the scenario with Aspose.Pdf for NET 8.5.0, we've managed to reproduce this issue on our side and logged it as PDFNEWNET-35985 in our bug tracking system for further investigation and resolution. We've also linked your request to this issue and you will be notified via this thread as soon as it is resolved.
Please feel free to contact us for any further assistance.
Best Regards,
Tilal
Hi Arthur,
Hi Arthur,
<?xml version="1.0" encoding="utf-8" ?><o:p></o:p>
<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 :#$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>
However, as we can see from set of sample files, customer's set of XML+XSLT generates HTML, that will not (and should not) be correctly processed with BingXML method. Please get HTML from XML + XSLT and then use BindHTML method to get desired results.
Hi codewarior,
As per my requirement I have to take data from XML and use custom XSL to generate PDF Which I am able to do with first approach but not using second approach.
I have tried as below post
To generate the PDF, I have tried 2 approaches-
-
Transformed XML data with XSL and converted into HTML then Using Aspose.HTML, converted HTML to PDF(It’s working as expected using same .xml and .xsl files)
-
When I am trying to use Aspose.PDF please check below code. Pdf is generating and is not opening because it’s blank pdf. Even I have used same xml which suggested by Farhan (Programmers Guide)
and try to generate PDF using XML only it’s generating BLANK PDF.
If XML schema is not proper in attached snapshot please share the updated valid XML so I can use below code for my requirement.2.PNG (8.6 KB)
Document pdf = new Document();
using (FileStream fs1 = new FileStream(xmlpath + "Examples.xml", FileMode.Open))
using (FileStream fs2 = new FileStream(xmlpath + "Examples.xsl", FileMode.Open))
{
// Bind the XML file
pdf.BindXml(fs1, fs2);
// Save the resultant PDF
pdf.Save(xmlpath + "Examples.pdf");
}
I am achieving requirement using first approach but I don’t have ASPOSE.Html lic but I have for ASPOSE.Pdf.lic
Thanks in advance
We have addressed your concerns in other thread created by you. Kindly follow up in respective thread.
Thank you so much for help.