Defect #18629

PDF Export removes separating space after tables

Added by @ go2null about 4 years ago. Updated almost 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:PDF export
Target version:2.6.1
Resolution:Fixed Affected version:2.6.0

Description

With the switch to the new PDF gem, the space after tables are removed resulting in the element after a table displaying immediately under the table.

Please see attached screenshots.
  1. html.png: this is what is displayed on the issue view.
  2. rbpdf.png: This is what is generated by the new pdf parser.
  3. rbpdf-no-remove-trailing-multiple-spaces.png: with the following change
    # /usr/lib/ruby/gems/1.9.1/gems/rbpdf-1.18.2/lib/rbpdf.rb
    
    -10667   html.gsub!(/<\/(table|tr|td|th|blockquote|dd|dl|div|dt|h1|h2|h3|h4|h5|h6|hr|li|ol|ul|p)>[\s]+</, '</\\1><')
    +10667   html.gsub!(/<\/(tr|td|th|blockquote|dd|dl|div|dt|h1|h2|h3|h4|h5|h6|hr|li|ol|ul|p)>[\s]+</, '</\\1><')
    
  4. pdf-export-with-p-element.png: with the following change
    # lib/redmine/export/pdf.rb
    
    +65   html.gsub!(/<\/table>/,'</table><p></p>')
    

rbpdf-no-remove-trailing-multiple-spaces.png (13.2 KB) @ go2null, 2014-12-12 19:41

pdf-export-with-p-element.png (13.3 KB) @ go2null, 2014-12-12 19:41

rbpdf.png (11.8 KB) @ go2null, 2014-12-12 19:41

html.png (9.08 KB) @ go2null, 2014-12-12 19:41

rbpdf-1.18.3.png (25.3 KB) Jun NAITOH, 2014-12-18 00:09

Associated revisions

Revision 13870
Added by Toshi MARUYAMA almost 4 years ago

Gemfile: update rbpdf version to 1.18.4 (#18629)

Revision 13871
Added by Toshi MARUYAMA almost 4 years ago

Merged r13870 from trunk to 2.6-stable (#18629)

Gemfile: update rbpdf version to 1.18.4.

History

#1 Updated by Jun NAITOH almost 4 years ago

This problem already fixed by rbpdf 1.8.3.

please bundle update

bundle update rbpdf

#2 Updated by Toshi MARUYAMA almost 4 years ago

  • Target version set to 2.6.1

#3 Updated by Toshi MARUYAMA almost 4 years ago

  • Status changed from New to Closed
  • Resolution set to Fixed

Explicitly updated rbpdf version to 1.18.4 in trunk r13870 and 2.6-stable r13871, thanks.

Also available in: Atom PDF