vandeseer / easytable

Small table drawing library built upon Apache PDFBox
MIT License
239 stars 91 forks source link

Paragraph Cell removed #165

Closed Chemmic closed 2 months ago

Chemmic commented 2 months ago

Hey there,

are Paragraph Cells removed in Version 1.0.0? I can find them in 0.8.5 but they are missing in 1.0.0.

I couldnt find any changelog why they got removed, but maybe I just missed it.

Is there any other way to mix font Size / diffrent fonts in general in the same TextCell in version 1.0.0?

Sincerely, Chemmic

vandeseer commented 2 months ago

Hey @Chemmic,

Unfortunately not. The paragraph cells had to be removed since they were only a wrapper around another library that is not maintained any longer and doesn't support PDFBox 3.0.0.

It shouldn't be too hard though to come up with a custom cell type that allows for mixing fonts and font sizes. I didn't put any research into it myself though because I don't use the library myself anymore (I try to keep the dependencies up to date though for other users).

Best Stefan

Chemmic commented 2 months ago

Hey @vandeseer,

thanks alot for the reply! I will take a look into it, I guess a solution for it won't really work with the builder pattern since I can't set multiple text/colors etc right?

Also, a bit off-topic, I didn't want to open another request - I hope that's okay: I need a table which overflows on the same page and has a header set per lane. I figured theres OverflowOnSamePageTableDrawer and RepeatedHeaderTableDrawer but no mix of both correct? I might need to make a custom solution here as well then.

Also is it possible to configure the OverflowOnSamePage Drawer, that the tables start at the same height? For me after the Overflow, the position is off: grafik

Should I open a pull request if I add the 2 mentioned features?

Anyways, thank you for the support and this small but awesome project! It would've been pain to create all those tables without it.

Best Chemmic

vandeseer commented 2 months ago

Hey @Chemmic,

For this new cell type, you can get some inspiration from those gists here maybe: https://gist.github.com/vandeseer (don't remember exactly if I had something similar there, but custom cell types should be included I'm pretty sure).

Feel free to open a PR for this new feature you need! Please note: generally speaking it's best if you just create entirely new classes instead of trying to squeeze something in into existing classes. It might also work that way, but I value backwards compatibility and secondly it's normally less complex to modify if the code is more modular.

I'm currently not having much time.for helping out,.but I'm totally willing to accept a PR! :)

Best Stefan

vandeseer commented 2 months ago

This issue you mentioned with the overflow position: feel free to open a bug issue, if it really seems like a bug. Could be the case.