Closed Thejipppp closed 3 years ago
Hey @Thejipppp,
thanks for reporting and thanks especially for providing an example for reproducing the issue.
I will have a look soon – but let me already say: Unfortunately the pdfbox-layout library won't be developed any further and this library depends on it. But well, you solved your markup issue already anyway :wink:
Secondly the whole wrapping approach is a bit experimental and a bit hacky. I simply didn't want to reinvent the wheel whilst still being able to allow for links and formatting. Personally I don't even have a use case for it, I just implemented this kind of as proof of concept since several people asked for it. So it doesn't surprise me that much that there are issues here :smile:
Anyway I will have a look and see if I can come up with a solution.
Best, Stefan
Thank you for the very quick response!
If I could help by providing an example of the weird multipage example, let me know 😃 Something I noticed is that when a normal cell would span multiple pages, an error is thrown if I remember correctly, but this was not the case for the first small long cell. Anyway, have fun debugging 😄
Kind regards, Jesper
I think I found the issue and fixed it on the develop
branch. At least it seems fine for your example. Maybe you can give it a go.
Regarding your problem of getting the height of a cell: From the top of my head I think you could create another table with one column of the same width as the one in your original table and only the cell in question. After you created that table you just do a table.getHeight()
which should be exactly the height of the cell.
Or like so: table.build().getRows().get(0).getCells().get(0).getHeight()
Both are quite some hacks though ... :smile:
Hope this helps, Stefan
What a nice simple fix 🥰 Thank you sir for the unbelievable fast service! You are a hero!
Kind regards Jesper
Thank you, sir! :wink:
I will release a new bugfix version soon (that will be 0.8.1).
Best, Stefan
Hi, firstly I would like to thank you for this great library! It is amazing!
However, I found some bugs when using the new ParagraphCells.
A first one is that text can not be underlined and strikethrough at the same time. I think the problem lies in the fact that they both have the same (ending) symbol which makes parsing really difficult. I personally fixed this by adapting the pdf-layout library and making strikethrough another symbol ("~~"). To be fair, I just copied the functionally of underlining and when both are needed, I make sure that I use ~~{0.25:} or ~~ {0.25:}, the symbols don't clash anymore and there isn't a problem anymore. I also notified PDF-Layout about this.
A second one bothers me a bit more. To get the height of a row, you have to build it (which is very logical). However, when you build a table twice with the same paragraphcells, the text is also doubled! This isn't the case for other cells, so I think this is a bug. Please, if there is a simple work around to get the height of a row, tell me ! 😋 I cracked my head to work around this, by making a new paragraph cell but with the same paragraph, which has the same behaviour. I even went further and tried to copy a new paragraph, but the markup isn't gettable, so that was also a dead end. The reason I needed the height was that my table behaves weird when it crosses multiple pages. I have one big cell in my first column and smaller ones in the next columns. I don't have time left to create a code example for that, but it looks like the image below, the lower right corner is not bordered. For a solution I wanted to get the height and split cells up to fit on a page.
The code beneath results in this table.
For my example, I dirty edited your test case, sorry for that 😄