Open TeaBough opened 6 years ago
I haven't delved too deeply into this, but it seems like the AddPage()
method in the example code may be called too soon.
Any insights, @flibustenet?
Never seen situation like that... But it's an interesting exercise !
I'm actually experiencing this problem with a project of mine, where the user has a textarea that gets transformed into a cell in a pdf. Sometimes users type a lot of text resulting in a cell bigger than a single page ...
There is the same problem with the Fpdf_SplitLines_tables
example. If you fill a cell with a text that makes the table fit on 2 pages, it creates more than 10 pages.
If you the take the
Fpdf_WrappedTableCells
example and instead of having :word := fmt.Sprintf("%d:%s", i, strings.Repeat("A", i%100))
you have :word := fmt.Sprintf("%d:%s", i, strings.Repeat("A", 400))
This means that one cell is bigger than a whole page and thus must be split into 2 pages. If you run the example with 400 A's you get an odd result. Does anyone have an idea of to handle proprely this case ?