我正在使用Rotativa在我的mvc4应用程序中创建pdf。问题是我如何在pdf上显示页码。Rotativa PDF MVC3 Paging
1
A
回答
3
通过向Rotativa * AsPdf添加CustomSwitches属性,您应该能够利用wkhtmltopdf中的页脚选项。 看看http://madalgo.au.dk/~jakobt/wkhtmltoxdoc/wkhtmltopdf-0.9.9-doc.html
2
这段代码会给你页脚中心的页码。
return new Rotativa.ViewAsPdf()
{
CustomSwitches = "--page-offset 0 --footer-center [page] --footer-font-size 8"
}
使用 - 页面偏移选项来设置起始页码。 将页面偏移量设置为0,页码将从1开始(这也是默认选项)。 可以通过指定--footer-font-size选项来控制字体大小。
相关问题
- 1. 模型中的Rotativa PDF - ControllerContext
- 2. 使用Rotativa将PDF文件保存为字节数组或流使用Rotativa
- 3. JavaScript Paging
- 4. BDC Paging
- 5. Reportviewer Paging
- 6. Doctrine Paging
- 7. Rotativa ViewAsPDF CSS大小/尺寸
- 8. Ajax没有运行Rotativa ViewAsPdf
- 9. Rotativa ActionAsPdf()非常慢
- 10. rotativa对SSL
- 11. GridView Databinding and Paging
- 12. ExtJs 4 Grid Paging
- 13. OpenJPA Paging(setMaxResults/setFirstResult)
- 14. extjs listview和paging
- 15. RestKit ResponseDescriptors for Paging
- 16. LINQ to SQL Paging
- 17. JQWidgets jqxGrid:Dataadapter和Paging
- 18. Azure Blob List Paging
- 19. 将Rotativa HTML转换为ASP.NET MVC上的PDF:如何将PDF创建为景观?
- 20. 的头,我已经通过创建一个Rotativa PDF页脚
- 21. Rotativa pdf在服务器上不起作用
- 22. 使用rotativa创建pdf并保存到Azure blob
- 23. 使用C#和Rotativa生成PDF后,移除状态消息
- 24. C#ASP.NET MVC从视图Rotativa或iTextSharp创建PDF?
- 25. 使用Rotativa或RazorPDF将MVC4视图转换为PDF时出错
- 26. 设置.pdf名称,但阻止与Rotativa一起下载
- 27. 在rotativa pdf生成中不能识别指数数字4
- 28. 如何使用Rotativa将内容缩小到单个PDF页面?
- 29. 如何在服务器上保存Rotativa PDF
- 30. 无法在MVC4中使用Rotativa下载PDF文件
up votes for include an link to docs in your answer。很好的接触。 –