Converting xml to pdf and embedding some images

Hi ,

I have a requirement as i need to convert the xml into pdf format.This is for a product specification, so i have to include some images also.i am planning to use aspose pdf kit for java to convert the xml.

I have never done the pdf conversion, just to start with how to make the template with all the fields from the xml, like layout cration and all.

could you please assist me.I am using eclipse with weblogicserver.All this implementation is for a web app with portal.

Thanks

Hi,

Thanks for considering Aspose.

Please try using the following code snippet and the following XML contents to convert it into PDF format. The XML file also contains Tag for image file to be included in the resultant PDF.

[Java]

try{
aspose.pdf.License lic = new aspose.pdf.License();
lic.setLicense(new FileInputStream(new File("D:/ASPOSE/Aspose.Total.Java.lic")));
}catch(Exception ex)
{}

Pdf pdf = new Pdf();
pdf.bindXML("D:/pdftest/samplesource.xml",null);
// Save the document
pdf.save("d:/pdftest/Java_HelloWorld.pdf");

[XML]

<?xml version="1.0" encoding="utf-8" ?>
<Pdf xmlns="Aspose.Pdf">
<Section>
<Image File="d:/pdftest/axpssp_logo.png" Type="png">
PNG image
</Image>
</Section>
</Pdf>