vandeseer / easytable

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

Question/Feature Request: Cell to be vertically or horizontally split into more small cells #167

Open FlyingDutchmanLQY opened 2 months ago

FlyingDutchmanLQY commented 2 months ago

Hello! Can a cell be split vertically or horizontally into more small cells? Or multiple cells merged into big one like excel does?

something like below image

vandeseer commented 2 months ago

Hi,

Yes, you can merge cells. Please check the examples, there you can also find some code for it.

Theoretically you can also create tables within single cells, but I wouldn't necessarily recommend that approach.

Best Stefan

FlyingDutchmanLQY commented 2 months ago

Sorry, bad English. Didn't fully understand the meaning of 'span'. The example is great. But with regard to merge, can I merge cells after all the cells and rows being added, which means after the table builder finishes building. I have to add cells and rows in a loop and after that merge some of the cells.

vandeseer commented 2 months ago

No, that doesn't work. It also would render the builder useless. You would need to keep track of the cells to be merged before building.

Best, Stefan