如何在razorpdf中使用css [英] how to use css in razorpdf

查看:90
本文介绍了如何在razorpdf中使用css的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iam使用mvc4和razorpdf将我的视图转换为pdf,虽然工作正常,但css类正在使用的不适用于pdf,是否有任何解决方案..

iam using mvc4 and razorpdf to convert my view to pdf,everthing working fine but css classes what am using is not applying to pdf,is there any solution for this..

推荐答案

当然CSS不适用于PDF,因此您需要单独格式化每个文档。可能你需要解析和分析CSS。您应该清楚地理解PDF和HTML,Open XML等文档之间的区别。在某种程度上,PDF的创建是一个单向过程:它只创建一次而不是进一步支持;通常,这只是一个输出。此外,您无法将灵活流畅的HTML映射到刚性PDF,这更像是一堆固定大小的纸张。



-SA
Of course CSS is not applied to PDF, so you need to format each piece of document individually. Probably you need to parse and analyze CSS. You should clearly understand the difference between PDF and documents like HTML, Open XML and more. In a way, creation of PDF is a one-way process: it is created once and not further supported; normally, this is only an output. Besides, you cannot map flexible and fluid HTML to rigid PDF which is more like a bunch of sheets of paper of fixed size.

—SA


应用内部样式标记,即内联css
apply inside style tag i.e. inline css


这篇关于如何在razorpdf中使用css的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆