itext repaint borders of a table - border

I write a pdfptable to a document and than I add an header table and a footer table using onStartPage events.
My problem is that if the main table has a top border this will partially overwritten by the header. The naive solution is to write the header onStartPage, but than I have the same problem with a bottom border in the header.
My idea was to rewrite the borders of all tables onEndPage, but it think this is not easy.
A solution would be to insert header and main table as nested table to another table, but this is not practicable in my case.
Any suggestions/experience in this area?

Related

Adding a subsection to a table [Angular]

I'm trying to sections to my table. The aim is to create a row similar to the header row of the table where this information will live.
I have already tried adding a separate header as an ng container.
I'm trying to avoid using a div and styling it to make it look similar to a table header.
I'd prefer for the "title" of the table to be a part of the table HTML.
Thanks!

How to make multiple left columns fixed and scroll the the rest columns in HTML table?

I am having trouble of freezing multiple columns or column-group and making the rest columns scrollable.
I tried the solution like
how do I create an HTML table with fixed/frozen left column and scrollable body?
but it only works for one column. If I try to freeze multiple columns, they overlapped each other.
I also do not want to use multiple tables which will be difficult for dynamic data binding.
Does anyone know a simple solution for this case only using CSS?
There is one jQuery Plugin "DataTable". This will help you to freeze any number of columns in your table.
Check the tutorials here.
http://www.datatables.net/extensions/fixedcolumns/
http://www.datatables.net/release-datatables/extensions/FixedColumns/examples/two_columns.html
Hope this solves your problem.

HTML table with raised column effect

I've got a bit of a challenge with an HTML table that we need to have raised columns. If you look at the attached image you'll see what I mean.
The purpose of these raised columns is to draw the user's attention to them.
The problem is:
To get the effect of the column raising above the other columns you
need some kind of element/height/margin to appear outside the
boundary of the table, which doesn't seem to work
Same goes for the bottom
To have the drop shadow appear correctly, it needs to be applied to all the cells in a column.
We did get this to work by splitting it up into multiple tables then applying the styles to the table that should be the raised column. The image I've attached is actually a live table working like this.
But, you loose all other needed features of tables...
Row heights don't match if the text wraps in table 1 but not in
table 2.
To deal with the row height issue we applied a fixed height to each table's rows, but then you have to force text to not wrap. If you then get text that's longer than the width you run into trouble.
Does anyone know how this can be achieved without splitting the tables?
Thanks,
jacques
Try having an extra row for the table above the header row (you may have to stop using any th tags) to give you the overbar at the top. Similarly for the bottom, an extra highlighting row.
Although you have to compromise the table a little to do that, it is better in my book than separating into 2 tables, as that defeats all the purposes of the table tag; to show a table, and have that table easily declared.
The effects inside the table are probably best done with jquery, unless the choice of highlighted columns is entirely static, in which case consider rendering a static html version by generating the html appropriately.

Add scroll to all rows in a table except for the first

I have a page with:
1 - header.
2 - table.
3 - footer.
The table has a first row which is like a title for each column. After that, all the data gets ordered by row and column.
I need to scroll all the rows except the first one in the top. I try and try and I got a headache.
This is the start position: Demo
And this is One of my attempts: Demo1
I can think a few solutions..
One would be using two tables, pulling the headers out and placing the lower part of the table in a div that you can scroll.
Second could be using waypoints (http://imakewebthings.com/jquery-waypoints/)to lock the table header in and target it with tr:first-child
A third could be using an image as the header and scrolling the content in it's own div tag.
(using position:fixed will keep something locked on a page in position)
Hope these help :)

Tables Alignment

I need some help with aligning two tables together, i.e: having the columns line up.
The first table has the headers, and the second table has the rows displayed. I'm doing this on ruby, so, I have to put the result in another table because the updating won't work otherwise(puts the data away from the parent table..) Is there a way, that I can have the two tables align, so the data for every row lines up with each header column.
Thank you
The easiest way would be to have fixed widths for the cells and make the widths be the same for both tables. Also make sure that you have the table properites be the same (i.e. the cellpadding, cellspacing and table widths )
can't you just remove the closing tag for the header and remove the opening tag for the content?
It’s not a great idea, HTML-wise. Heading cells and data cells should really be in the same table. Then you get the alignment for free.
“ I'm doing this on ruby, so, I have to put the result in another table because the updating won't work otherwise”
Are you entirely sure there’s no way for Ruby to update an HTML table that has header cells? Really?