Project

General

Profile

Patch #30919 » 0001-fix-pdf-generation-of-full-width-layout.patch

Apply over previous patches to fix pdf export (wide) - Frederico Camara, 2021-08-23 21:12

View differences:

lib/redmine/export/pdf/issues_pdf_helper.rb
116 116
              while values.present?
117 117
                if values[0].custom_field.full_width_layout?
118 118
                  while values.present? && values[0].custom_field.full_width_layout?
119
                    heights = []
119 120
                    value = values.shift
120 121
                    pdf.SetFontStyle('B',9)
121
                    pdf.RDMCell(35, 5, "#{value.custom_field.name}:", 'L', 0)
122
                    heights << pdf.get_string_height(35, "#{value.custom_field.name}:")
123
                    pdf.SetFontStyle('',9)
124
                    heights << pdf.get_string_height(155, show_value(value, false))
125
                    height = heights.max
126

  
127
                    pdf.SetFontStyle('B',9)
128
                    pdf.RDMMultiCell(35, height, "#{value.custom_field.name}:", border_first, '', 0, 0)
122 129
                    pdf.SetFontStyle('',9)
123
                    pdf.RDMCell(155, 5, show_value(value, false).to_s, 'R', 1)
130
                    pdf.RDMMultiCell(155, height, show_value(value, false), border_last, '', 0, 2)
131
                    
132
                    pdf.set_x(base_x)
124 133
                  end
125 134
                else
126 135
                  lr_values = []
(22-22/24)