Hi Zach,
Thank you very much for considering Aspose.Pdf. To the problem you mentioned above, we can provide another workaround which definitely supports memory stream. We provide a parameter HtmlInfo.ImgUrl to set the basic directory for relative path of img. All you have to do is to set the parameter before you bind the html. The code should be like the below:
Pdf pdf1 = new Pdf();
pdf1.HtmlInfo.ImgUrl="c:/pdftest/Aspose_files";
byte[] by = System.Text.Encoding.UTF8.GetBytes(File.ReadAllText("C:/Memory.html"));
MemoryStream ms = new MemoryStream(by);
pdf1.BindHTML(ms);
I am sure it works well in this way. The ultimate path of image in html is equal to pdf1.HtmlInfo.ImgUrl concatenated with the src of <img> in html source. That is to say pdf1.HtmlInfo.ImgUrl provides the basic path of image and the property 'src' of <img> provides the relative path of image.
Sorry we have not provide a clear specification on this image path issue and we apologize for the inconvenience. If you have other problems with Aspose.Pdf, we are available anytime.
Cynthia Hu
Product Developer
Aspose Changsha Team
About Us Contact Us