Image path problem in xml

I have the following xml together with my cs code under http://localhost/pdf/

<Table><br>
<Row ID="bottom">
<Cell ID="image">
<Image File="../images/logo.jpg" Type="Jpeg" IsImageNotFoundErrorIgnored="true"></Image>
</Cell>
</Row>
</Table>

My logo.jpg is at http://localhost/images/

I noticed that the “Image File” path has to have the “…” to find the relative image location so if I move the xml and cs code to some folder like http://localhost/pdf/pdf/, I’ll have to change the path to “…/…/” again. I tried <Image File="/images/logo.jpg", but it couldn’t locate the absolute path. Is there a way to get around this problem? Many Thanks.

Jerry


Dear Jerry,

In my test it works. Here is my code:

[xml]


   string path = MapPath(".");
   Pdf pdf = new Pdf();
   pdf.BindXML(path + "/TestImagePath.xml",null);
   pdf.Save("output.pdf",Aspose.Pdf.SaveType.OpenInBrowser,Response);
   Response.End();

Please also make sure you are using the latest version.