iTextSharp PdfPCell border style
Just a quick note about global styles in PDF documents created with iTextSharp, that may save someone a lot of time and experimenting.
I have a document which is divided into three vertical regions or partitions with a dashed line, like that:
Later, in each of the partitions, I have a table, where some of table’s cells need to have solid border. All my cells had dashed border instead of solid:
I wasted quite a lot of time before I realized that the state of DirectContent
is preserved for a document and I set the dashed style in DrawDashedLines
method. Resetting the style in the following manner fixed my issue and my table cells have solid borders again.