I am using Nreco in mvc dotnet to export Html to Odt(Open office) file. But after getting exported image is not getting loaded in odt File. I have tried for Html to Pdf, which is working perfectly fine, but not in Html to Odt. Please look into the below code lines.
<div style="float:right; width:49%; text-align:right"><img
src="@(Url.Content("~/Content/img/logo.jpg"))" width="225"
height="44" alt="Logo" /></div>
Controller code:
HtmlToPdfConverter htmltoPdfObj = new HtmlToPdfConverter();
htmltoPdfObj.Orientation = PageOrientation.Default;
htmltoPdfObj.CustomWkHtmlArgs = "--margin-top 22 --header-spacing 10 --margin-bottom 20";
byte[] pdfContents = htmltoPdfObj.GeneratePdf(this.GetPDFScript() + htmlContractData + "</body></html>");
Response.Clear();
Response.Charset = "";
Response.ContentType = "application/vnd.oasis.opendocument.text";
string strFileName = "GenerateDocument" + ".odt";
Response.AddHeader("Content-Disposition", "inline;filename=" + strFileName);
Response.Write(htmlContractData);
Response.End();
htmlContractData > plane cshtml text with above div Image.
Please help me out with this Issue troubling me since long