首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Rotativa页脚图像不工作

Rotativa页脚图像不工作
EN

Stack Overflow用户
提问于 2016-11-01 20:36:59
回答 1查看 677关注 0票数 0

它返回没有任何内容的空pdf。

代码语言:javascript
复制
string customSwitches = string.Format( "--header-right \"text\" --footer- html {0}",
         Url.Action("Footer", "Competition", new { area = "" }, "http"));

return new ActionAsPdf("Pdf", new { compId = compId, personId = personId })
{
    //FileName = "Report.pdf",
    CustomSwitches = customSwitches
};

视图

代码语言:javascript
复制
<div style="text-align:center;font-size:11px;border-top:2px solid black;height:20%;padding-bottom:300px">
   <img style="width:12px" src="~/images/e_lg.jpg" />
</div>
EN

回答 1

Stack Overflow用户

发布于 2017-02-10 18:58:58

你必须把这个放在你的视图上:

代码语言:javascript
复制
src="@Server.MapPath("~/images/e_lg.jpg")"
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40360222

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档