From 43ffb5b5c0872f8a8516c549bceef7ad2da47eb0 Mon Sep 17 00:00:00 2001 From: csh Date: Fri, 6 Sep 2024 17:18:34 +0800 Subject: [PATCH] fix bugs --- range/Advanced/TSPdfTableRange.tsf | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/range/Advanced/TSPdfTableRange.tsf b/range/Advanced/TSPdfTableRange.tsf index 2c80ec3..b258619 100644 --- a/range/Advanced/TSPdfTableRange.tsf +++ b/range/Advanced/TSPdfTableRange.tsf @@ -118,6 +118,9 @@ begin tc_x += cell_range.Width; end end + for pos,arr in vmerge_arr do + if ifarray(arr) then + cell_range_array_[arr[0]][pos].VMerge := arr[1]; // for i,arr in cell_range_array_ do // begin @@ -131,7 +134,7 @@ begin i := 0; vmerge_arr := array(); row_height := array(); - while i < length(cell_range_array_)-1 do + while i < length(cell_range_array_) do begin tc_y := {self.}EndY; max_height := 0; @@ -175,15 +178,14 @@ begin page_ := docx_to_pdf_.GetNextPage(page_); [x, y] := docx_to_pdf_.CalculateTextCoordinates(); {self.}EndY := y; - println("y = {}", y); recompute_flag := true; break; end if range.VMerge then vmerge_arr[j] := array(i, range.VMerge); if not range.VMerge and range.DynamicHeight > max_height then max_height := range.DynamicHeight; + if range.FixedHeight > max_height then max_height := tc_h; end if recompute_flag then continue; - if range.FixedHeight > max_height then max_height := tc_h; row_height[i] := max_height; for _,col_index in vmerge_flag_arr do begin