Bug report #20546

Print composer tables add a line break to the last word with fixed column width

Added by Dan Isaacs about 1 year ago. Updated 12 months ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Map Composer/Printing
Affected QGIS version:3.4.1 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:28366

Description

Tables with fixed column widths and 'wrap text' options have the last word placed on a new line consistently. This rather makes the wrap text option redundant as it cannot be used in any professional report.

Associated revisions

Revision a774499b
Added by Marco Hugentobler 12 months ago

Don't add extra linebreak in print composer tables

Check if remaining text is short enough to go in one line. Fixes #20546

Revision b79e9e66
Added by Marco Hugentobler 12 months ago

Don't add extra linebreak in print composer tables

Check if remaining text is short enough to go in one line. Fixes #20546

(cherry picked from commit a774499b95177d7645bc84e4c5243fa7f2f0e530)

History

#1 Updated by Giovanni Manghi about 1 year ago

  • Status changed from Open to Feedback
  • Priority changed from High to Normal

Does it work as expected in 2.18?

#2 Updated by Dan Isaacs about 1 year ago

Giovanni Manghi wrote:

Does it work as expected in 2.18?

I don't actually have a copy of 2.18 any more, but I have just found this old Stack Exchange Question, so it seems to have been a problem back in August 2017.

https://gis.stackexchange.com/questions/251999/attribute-table-width-and-line-breaks?rq=1

#3 Updated by Giovanni Manghi about 1 year ago

  • Status changed from Feedback to Open

#4 Updated by Dan Isaacs about 1 year ago

Just for anyone coming across this dealing with the same problem, a rather messy workaround is to always make sure long text is suffixed with a double space. Layout interprets the second space as a new word and puts it on it's own line. You get a line break at the end of each section, but it's better than a mysterious trailing word.

#5 Updated by Marco Hugentobler 12 months ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF