vandeseer / easytable

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

Row.getHeight() returns incorrect value when rowspan is involved #118

Open grasshopper7 opened 3 years ago

grasshopper7 commented 3 years ago

The getHeight() method which is used in the drawer to calculate row fitment and repeat header height returns false values if there is a row span involved.

The current getHeight() method filters out the rowspan greater than 1 which messes up the returned height.

https://github.com/vandeseer/easytable/blob/c5296c50a77663be986a36ef76151cc90056d94f/src/main/java/org/vandeseer/easytable/structure/Row.java#L45

https://github.com/vandeseer/easytable/blob/c5296c50a77663be986a36ef76151cc90056d94f/src/main/java/org/vandeseer/easytable/RepeatedHeaderTableDrawer.java#L41

https://github.com/vandeseer/easytable/blob/c5296c50a77663be986a36ef76151cc90056d94f/src/main/java/org/vandeseer/easytable/RepeatedHeaderTableDrawer.java#L62

vandeseer commented 3 years ago

Can you provide a minimum working example that illustrates the case? I see your point though. But the row spanning stuff is not as simple as it may look at first glance.