简体   繁体   English

如何在iTextSharp中制作双线表边框?

[英]How to make a double line table border in iTextSharp?

I have to make a double line table border in iTextSharp so far I manged to make a border appear only on special places with this code: 到目前为止,我必须使用此代码在iTextSharp中制作一个双线表边框,以便使边框仅出现在特殊的地方:

cell.Border = Rectangle.TOP_BORDER | Rectangle.BOTTOM_BORDER;

but the border is a single line, is there a method that can create double line table border. 但是边框是单行,有没有一种方法可以创建双线表边框。 I tried to put make it like this: 我试图把它变成这样:

cell.Border = Rectangle.TOP_BORDER | Rectangle.BOTTOM_BORDER | Rectangle.TOP_BORDER |  Rectangle.BOTTOM_BORDER ;

but doesn't work. 但不起作用。 Thanks. 谢谢。

What about using nested tables? 那如何使用嵌套表呢? here's an example: http://www.ujihara.jp/iTextdotNET/examples/Chap1010.pdf 这是一个示例: http : //www.ujihara.jp/iTextdotNET/examples/Chap1010.pdf

You can possibly try to nest your table in a 1x1 parent table. 您可以尝试将表嵌套在1x1父表中。

Here's the code for the above PDF: http://www.ujihara.jp/iTextdotNET/examples/Chap1010.cs 这是上述PDF的代码: http : //www.ujihara.jp/iTextdotNET/examples/Chap1010.cs

From this page: http://www.ujihara.jp/iTextdotNET/en/examples.html 从此页面: http : //www.ujihara.jp/iTextdotNET/en/examples.html

What version of iTextSharp are you using? 您正在使用哪个版本的iTextSharp?

这工作正常:

cell.Border = Rectangle.TOP_BORDER + Rectangle.BOTTOM_BORDER;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM