使用css将HTML转换为PDF [英] HTML to PDF with css

查看:91
本文介绍了使用css将HTML转换为PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我使用iTextSharp.dll将html转换为带有样式的pdf。这个html是一个字符串变量。

使用样式表类iTextSharp仍然无法进行样式化。



是否有描述的链接如何在iTextsharp中使用样式表来应用css?





或者是否还有其他开源dll可以完成此任务。









谢谢。

Hi,

I am using iTextSharp.dll to convert html to pdf with styling. This html is in a string variable.
using Stylesheet class of iTextSharp still not able to make styling.

Is there any link that describe how to apply css with Stylesheet in iTextsharp?


Or is there any other open source dll that could accomplish this task.




Thanks.

推荐答案

不确定,但也许这个 [ ^ ]可以提供帮助。
Not sure, but maybe this[^] can help.


你可以查看这个



维护-css-styling-when-conversion- html-to-pdf-in-asp-net [ ^ ]
You can check this

maintain-css-styling-when-converting-html-to-pdf-in-asp-net[^]


尝试使用应用于页面元素本身的内联样式,而不是外部CSS文件。
Instead of external CSS files, try with inline styling applied to the page elements itself.


这篇关于使用css将HTML转换为PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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