AsposeTest.zip (2.3 MB)
I am trying to convert HTML to PDF and I am having large image within my HTML
Image is getting cropped out from the very first page and rest image is shown in rest of the page
I am attaching sample HTML, image and output PDF file with following code snippet
var objMemoryStream = new MemoryStream();
var writer = new StreamWriter(objMemoryStream);
writer.Write("<html><head></head><body><img src=\"http://dnndev.me/Portals/0/download.png\" width=\"1200\"/></body></html>");
HtmlLoadOptions objHtmlLoadOptions = new HtmlLoadOptions("styles/assets/");
PageSize.A4.IsLandscape = true;
using (Document objPDFDocument = new Document(objMemoryStream, objHtmlLoadOptions))
{
objPDFDocument.Save(Server.MapPath("output.pdf"));
}