Index: vendor/plugins/rfpdf/lib/tcpdf.rb =================================================================== --- vendor/plugins/rfpdf/lib/tcpdf.rb (revision 8000) +++ vendor/plugins/rfpdf/lib/tcpdf.rb (working copy) @@ -3532,11 +3532,11 @@ @page = base_page; @x = base_x + @tdwidth; @y = base_y; + elsif (@pre_state == true and element.length > 0) + Write(@lasth, unhtmlentities(element), '', fill); elsif (element.strip.length > 0) - if @pre_state != true - element.gsub!(/[\t\r\n\f]/, ""); - element.gsub!(/ /, " "); - end + element.gsub!(/[\t\r\n\f]/, ""); + element.gsub!(/ /, " "); Write(@lasth, unhtmlentities(element), '', fill); end end