Get the Last "Y" value on Table on DynaPDF

Hi all!

How can I know the last value of value of Y axis on a DynaPDF Table?

So I draw a table, but the content of the table always be different, sometimes will have smaller text inside the table, sometimes will have more text inside the table.
So I wanna get the last value of Y of this table, in order to draw a new table below the last one.

Any Ideas?

Thanks in Advance

Did you ever figure this one out? I too would like to add more text underneath a table created in DynaPDF, where the length of the table can vary. And I have the same conundrum: how to determine the position on the y-axis where the table ends.

GetTableHeight :
https://www.monkeybreadsoftware.de/dynapdf/dynapdf_093.shtml
https://monkeybreadsoftware.net/dynapdf-dynapdftablembs-method.shtml#18

…using this function you can calculate the next y position

Use a DynaPDFTableMBS

Draw your table.
When it is complete, use

table.GetNextHeight
or
table.getTableHeight

GetTableHeight - just the ticket. Many thanks Oliver and Jeff!

great seeing you guys help yourself :slight_smile:

Ok, I prove it in order to know where is the last Y position the table.

So, Now i got a question.
What if I want to know the Last “Y” value of a row?

Example: I have a table with four rows the size of the rows are 9.0.
But when the text of a cell exceed the dimensions of the row, so then the dimension of the row will grow up ignorer to fit to the text.

Cuz of this I want to know where is “Y” after this.

I tried something like this:

    dim nextrow as integer
    dim h as Double
    For i as Integer = 0 to tblPDFConceptos.GetNumRows
      h = tblPDFConceptos.GetNextHeight(210.00, i)
      Msgbox h.ToText
    Next

Notice that h pretends to be where the value of y be stored.

And use this value to draw a line each time H value will be different

If I remember right, than GetTableHeight is taking care of calculating the complete height, therefor you would not need to sum up the heights of the rows yourself.

You cant.
The power of DynaPDFTable is you allow it to do the table for you.
There is no callback row by row.

You can force text to not increase the size of the row (ktfNoLineBreak)
But if you want total control over the table, go back to drawing it using a loop and rectangles around the text you want to display.

Where do you want the line?
Could you use an extra empty cell, and only draw the bottom line of the border?

Ive reached the point where I really need this ‘row placement’ functionality myself.
I can set text and I can set font.
But I really need to place graphics and glyphs ‘where the cell hits the page’ and I cannot get that information from the DynaPDFTableMBS

If it had an event per cell (like a listbox) then it would be straightforeward.

Does anyone have any reliable sample code for a multi-page table in DynaPDF that DOESN’T use DynaPDFTableMBS?