File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -549,7 +549,7 @@ function PDFGenerator:drawTable(options, table_options)
549549 self .current_table .header_options = options .header_options
550550 self .current_table .data_options = options .data_options
551551
552- local first_line_height = self :calculateMaxHeight (options .header_columns )
552+ local first_line_height = self :calculateMaxHeight (options .header_columns or {} )
553553 if options .data_columns [1 ] then
554554 first_line_height = first_line_height + self :calculateMaxHeight (options .data_columns [1 ])
555555 end
@@ -613,7 +613,6 @@ function PDFGenerator:calculateTextHeight(column)
613613 local line_height = fontSize * 1.5 - (number_of_lines / 1.5 ) -- Standard line height
614614 local text_height = number_of_lines * line_height + padding_y * 2 -- Include padding
615615 -- Update max_height if this item is taller
616- -- if column.text then text_height = text_height + padding_y * 2 end
617616 column .lines = number_of_lines
618617 column .height = number_of_lines * line_height
619618
@@ -638,7 +637,6 @@ function PDFGenerator:calculateMaxHeight(columns)
638637 for _ , content in ipairs (column .content ) do
639638 if content .type == " text" then
640639 text_height = text_height + self :calculateTextHeight (content ) / 1.5
641- -- text_height = text_height / 1.5
642640 end
643641
644642 if content .type == " image" then
You can’t perform that action at this time.
0 commit comments