TPPDF icon indicating copy to clipboard operation
TPPDF copied to clipboard

Add fixed row height to table (with text truncation)

Open davidhakki opened this issue 6 years ago • 14 comments

Is there any way to disable word wrapping, and either making it so it has ..., reduce text size or nothing at all.

davidhakki avatar Aug 20 '19 11:08 davidhakki

Basically limiting the height of a cell an truncating the text?

philprime avatar Aug 22 '19 13:08 philprime

Yes i knew there was a word for it, does such options exist presently?

davidhakki avatar Aug 22 '19 16:08 davidhakki

No it does not exist yet, but this sounds like a useful setting, as I am working on an improved table algorithm anyways (#41) therefore I will convert this issue in a feature request

philprime avatar Aug 23 '19 10:08 philprime

What's the progress on this? I'm trying to find a way to create a table with square cells, and it doesn't seem like there's currently a way to do this since the cell heights can't be set.

96kaitlinburke avatar Feb 04 '20 14:02 96kaitlinburke

As of now, the new table logic is pre-release/released in 2.0.0. Therefore this is where we could start of implementing this feature

philprime avatar May 19 '20 12:05 philprime

@philprime Is this something you're still interested in? I need something similar like this, so I've started working on a solution, if you want I can create a draft PR with it. Basically, I've added the heights property to the table similar to widths, so that you can set relative row heights for a full-page table.

marioradonic avatar Mar 26 '21 15:03 marioradonic

I am always happy to review PRs :)

philprime avatar Mar 29 '21 07:03 philprime

@philprime @marioradonic Did you two make it any further on this feature? Is there an example or branch somewhere I can take a look at? We also need this functionality so I'd be happy to contribute to this feature if either of you pointed me in the right direction.

Edit: I found a commit here that looks like it https://github.com/marioradonic/TPPDF/commit/19a13793efbe80048782ce157cb78f7d0c6fcdc2

theolampert avatar Dec 06 '21 13:12 theolampert

Hi @theolampert there hasn't been any progress from my side, but still I am happy to review PRs or guide any contribution :)

philprime avatar Dec 07 '21 08:12 philprime

@philprime Looking into the problem a bit more today I would actually need to support fixed width and height cells for a specific label printing spec rather than relative heights and widths. I'm thinking that TPPDF might not the right library to try to do this and rather implement the functionality with Core Graphics.

theolampert avatar Dec 07 '21 08:12 theolampert

Hello, how is this issue going?

CodeSales avatar Nov 24 '22 02:11 CodeSales

I would also love this feature. Could the code from @marioradonic be merged in with master?

brendand avatar Nov 25 '22 18:11 brendand

I am happy to review any proposed solutions, and even using existing code ideas to implement this. Where can I find the progress of @marioradonic?

philprime avatar Dec 03 '22 14:12 philprime

I am happy to review any proposed solutions, and even using existing code ideas to implement this. Where can I find the progress of @marioradonic?

I found it a bit higher up in the thread:

https://github.com/marioradonic/TPPDF/commit/19a13793efbe80048782ce157cb78f7d0c6fcdc2

brendand avatar Dec 03 '22 19:12 brendand