我使用Rotativa.ActionAsPdf将View转换为Pdf,它完美运行 但问题是如何从右向左改变文字方向?
这里是我的代码:
public ActionResult ExportPDF(ReportsModel RM)
{
string id = Session["Pat_id"].ToString();
string subPath = "~/Attachment/" + id;
string link;
bool exists = System.IO.Directory.Exists(Server.MapPath(subPath));
if (!exists)
System.IO.Directory.CreateDirectory(Server.MapPath(subPath));
return new Rotativa.ActionAsPdf("PhysicalExaminationSummaryToPDF", new { id = id })
{
FileName = "PhysicalExaminationSummary.pdf",
PageSize = Rotativa.Options.Size.Letter,
PageMargins = { Left = 0, Right = 0 }
};
}
答案 0 :(得分:0)
Finnaly我解决了 应添加视图样式方向:rtl
<style>
#status_quest {
direction:rtl;
}
</style>
将视图转换为Pdf时与CSS库无关