TPPDF - table cell at bottom of page cut off - swift

This is my first question on stackoverflow so forgive me if I'm missing anything.
I'm having a problem with a table cell being cut off at the bottom of the page when using the TPPDF cocoapod in a swift 4 app for i-pad. Only part of the cell shows with no text
I'm creating a series of tables in my document. Because the column widths are variable I'm adding a new table for each row.
Is there a way to either prevent this from happening or to determine when to add a page break?

Related

NSCombobox in view-based NSTableView problems

So I had a view based TableView with 3 text columns. TableView is editable and I can tab across columns to edit. I then decided I needed a "type" for each column which could let user select a fixed set of types.
I deleted the NSTextField and replaced it with NSComboBox. I made sure it was Behavior="Editable" in IB and I gave it 3 static values in IB as well. Can't get it to work.
First, nothing shows up in the column. I cannot select it. When I hit <tab> key while editing it just skips over that column to the next column. It's like TableView does not know it's there.
I must be missing something very fundamental. Appreciate any pointers.

Jface Table row validation

Background:
I have a Jface table on which I have set Editing support with text cell editor for each column. There are around 20 columns.
Problem:
I want to highlight invalid row field text with dark red color and whole row with light red color.
What I tried as of now:
1. I have highlighted invalid field(single cell of row) using label providers getBackgroundColor() and getForgroundColor().
2. I tried CellEditors setValidator() method to add a validator, but I don't want to clear invalid text from a cell, I just want to highlight it.
3. I have one approach to use a flag for each cell to check the validity of that cell if any of the flags is true will highlight all cells of that row(can be achieved using label providers). But, I think this approach will impact performance for my table.
4. I am not sure performance impact of table updatatestrategy of Jface. So I am not using it.
Reason of highlighting the whole row of the table is: Table have 20+ columns and user don't want to scroll the table to find out problem location.
Please suggest if you know any better solutions.
Using label providers to for the colors is the way to do this.
The label provider is only asked for the color when the row is created or refreshed - by calling one of the viewer refresh or update methods, so this should not impact performance.

How to auto center the table after hiding few columns in jasper report

I have been hiding my columns in the table based on the columns I want to hide by passing parameters boolean value to false. It is all working fine, but the problem is when I hide the columns the whole table look likes it has moved to the left and it appears even more weird when I try hide 3 or more columns. I some how need to figure it out and bring the table to the center of the containner after hiding the columns that needs to be hidden. I not able to find any properties to make this change in jaspersoft. Please help me do this.
MY TABLE WITHOUT HIDING
AFTER HIDING THE COLUMNS
How could I make my table center align to the container of that respective band

Y position while composing a PdfPTable

I'm building a pdfptable thru ItextSharp, but I need to know, while I'm adding cells, my Y position in the page. Cells have a variable height.
I need to know it to avoid tu put a new 'Breaking title' in the table if this would go on the last table row, as it should go on a new page (on cust request).
I tried writer.getverticalPosition() but it seems not reliable in composing a table.
Is there a way to know it ?
There's a contradiction in your question. Let me explain what doesn't make sense.
You create a PdfPTable, let say you have an object named table. when you add cells to table, the object grows. Plenty of data is stored into memory.
Now you say: I want to know the Y position of the rows on the page while I'm adding cells.
Which page? There may not even be a page? As long as you build the table object, there is no page, there are no Y positions. One table could be 200pt heigh when added to a page with a width of 400pt. The same table could be 400pt heigh when added to a page with a width of 200pt. It isn't until you add the table object to a Document that the table gets its shape.
If you want to make sure a "title" isn't the last row on a page, you should break up your table in smaller parts. Create a subtable and add it to the document. Now use getVerticalPosition() and check how much space is left. If there isn't sufficient space for the first X rows of the next subtable, move to a newPage() and add the next table there, otherwise add the table on the current page.
If you define the widths correctly, nobody will see that you've been adding more than one table: it will look as if you added one large table instead of different small ones. If you don't know how to calculate the height of the rows in the subtables, please note that you need to define the total width of the table and lock the widths. For the reason explaiined above, no software can calculate the height of a table if it doesn't have any info about its width.

Customize column of table view

Is it possible to customize the column of table view.
By default table view contains 1 column, But according to my requirement I want 4 column in table.
Means I want table like we create in MS-word/excel.
Thanks.
http://dewpoint.snagdata.com/2008/10/31/drawing-a-grid-in-a-uitableview/
ad
http://usxue.is-programmer.com/posts/14176.html
will help you
No there is no such method to do that ..... but for sure u can make a subclass of UITableViewCell such that it has 4 parts in it and all parts are seperated by a fine line (a kind of bordered image as background will do the job). You can manage your data accordingly and it may create an illusion of MS-word/excel.
But I am sure you are aware of column and row of UITableView, so you can manage all your data is this format. If you want to represent data in tabular fashion like MS-word/excel you don't have enough space as width on iPhone and If you incorporate a tableView in a scroll view, two scroll will not be user friendly.
So i suggest you to go with TableView's native behaviour for such type of task.