What is the algorithm solve this in FPDF?
I am going to generate report by using FPDF.
My Problem Like this the horizontal data is too long to display in A4 or A3 :
V -> H1 -> H2 -> H3............> HTotal
v1 -> 1 2 3 ..........> 1+2+3+..n
v2 -> 1 2 3 .........> 1+2+3+..n
v3 -> 1 2 3 .........> 1+2+3+..n
.......................................
Vtotal 1*n 2*n 3*n...........> (1+2+3+..n)*n
Example
V -> H1 -> H2-> H3 -> H4 -> TOTAL
v1 1 2 3 4 10
v2 1 2 3 4 10
v3 1 2 开发者_运维技巧 3 4 10
v4 1 2 3 4 10
VT 4 8 12 16 40
so my PDF can be output like (split the display pages)
V -> H1 -> H2
v1 1 2
v2 1 2
v3 1 2
v4 1 2
VT 4 8
V -> H3->H4
v1 3 4
v2 3 4
v3 3 4
v4 3 4
VT 12 16
V -> TOTAL
v1 10
v2 10
v3 10
v4 10
VT 40
so even if the data it too long I still got the data display.
Could anyone help me:
- solve this problem ?
- or suggest to me the solution using FPDF?
- or suggest an algorithm in PHP?
Of Course that you cant put 100 columns at a A4, but to by more space, you may like to write columns vertically, (just column headers), as i see data that you are putting at your columns are numbers, so the only issue is header of it, like TOTAL, you may write it vertically like: T O T A L
精彩评论