timrs2998 / pdf-builder

PDF builder written in Kotlin with a statically typed DSL
https://timrs2998.github.io/pdf-builder/
GNU General Public License v3.0
58 stars 16 forks source link

TableElement cannot have elements below it #9

Closed timrs2998 closed 3 years ago

timrs2998 commented 7 years ago

Need to rewrite the height calculation for TableElement to support elements appearing after a table

geertijewski commented 3 years ago

It looks like in Document.kt renderInstance inside the children.fold() the adjustedStartY is added again, however in TableElement.kt the height starts with startY. So for all table elements the start Y position is added twice, pushing all elements below further down.

Compare e.g. to TextElement instanceHeight which does not add startY.