使用Rotativa,底层使用wkhtmltopdf 组件进行转换,使用过程中也遇到一些问题,记录下: 首先,如果页面中有资源文件,需要使用的路径问题,必须使用全路径,http://xxxxx。
Linux系统,则需要安装wkhtmltopdf,并将wkhtmltopdf和wkhtmltoimage从/usr/bin拷贝到/CERVANTES_PATH/Cervantes.Web/wwwroot/Rotativa
内置了适用于 Windows、Linux 和 macOS 的 Rotativa 文件,因此可以无缝运行在多种环境中。 主要特点: • 支持多平台(Windows、Linux、macOS)。