我想从MVC视图中生成一些PDF文件,这已经相当不错了。我终于跨越this来了,想使用它,但它具有如下这种奇怪的标记(它是基于iTextSharp的):这是什么样的标记?
<row>
<cell borderwidth="0.5" left="false" right="false" top="false" bottom="true">User Name</cell>
<cell borderwidth="0.5" left="false" right="false" top="false" bottom="true">Description</cell>
<cell borderwidth="0.5" left="false" right="false" top="false" bottom="true" horizontalalign="right">Lucky Number</cell>
<cell borderwidth="0.5" left="false" right="false" top="false" bottom="true" horizontalalign="right">Doubled</cell>
</row>
所有我真的想在这一点上做的是设置列的宽度(单元格,因为它在这里被称为),但cell
不接受我的style: width
或width
或任何东西。
我该如何使用这个东西?有没有更好的方法来从MVC视图呈现PDF?
这似乎很烦人......我觉得设置元素的宽度就像是最简单的事情;它不应该那么困难。 – user1477388 2013-03-08 15:30:22
iTextSharp是IMO,很难合作。如果你在C#中使用它,那也不是那么简单。 – Jamie 2013-03-08 15:33:05
有什么建议吗?我正在尝试使用wkhtmltopdf,但是我遇到了.EXE问题,并希望我可以使用.DLL,而不是http://stackoverflow.com/questions/15285363/running-exe-from-mvc – user1477388 2013-03-08 15:44:35