vandeseer / easytable

Small table drawing library built upon Apache PDFBox
MIT License
246 stars 94 forks source link

Long cell text not handled in draw method of TableDrawer #55

Closed reenanagdev closed 4 years ago

reenanagdev commented 4 years ago

Long cell text spanning into multiple pages is not handled. Code gets stuck into infinite loop.

vandeseer commented 4 years ago

Do you have a minimum working example where this happens @reenanagdev? And could you try to run your code with the latest develop branch?

I think this is related to https://github.com/vandeseer/easytable/issues/28 A fix is already in the develop branch, but this is not yet released.

reenanagdev commented 4 years ago

Yes, Issue I am facing is same as #28. Can you please share the fix for same?

reenanagdev commented 4 years ago

I took the latest code from develop branch. However, I see that you are throwing an exception when row is too high to be displayed on single page. But it still does not display the required long text in pdf and generate it.

reenanagdev commented 4 years ago

My requirement is allow 4000 characters in single cell. Only ~1400 characters are getting displayed as of now which is maximum what can be accommodated on single page in the cell.

vandeseer commented 4 years ago

I took the latest code from develop branch. However, I see that you are throwing an exception when row is too high to be displayed on single page. But it still does not display the required long text in pdf and generate it.

Well, yes: The "fix" is just to avoid the infinite loop. There is no mechanism to automatically split the text so that it fits in the page and the table continues on the next one. As of now I am also not planning to implement it, because I think that's very hard, especially given row and cell spanning. Users will need to split the texts themselves before drawing the table.

If you have ideas how to implement this I am very open to see the concept. The same holds for pull requests, of course ... 😉