CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Mailing Labels - multiline field: agree on left align instead of justify?
Pages: [1]

Author Topic: Mailing Labels - multiline field: agree on left align instead of justify?  (Read 2029 times)

obiuquido144

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 4
Mailing Labels - multiline field: agree on left align instead of justify?
August 21, 2010, 09:59:24 am
I'd like to suggest overriding TCPDF's default text justification for multiline data. IMO it's not good to have mailing labels looking like

Vodafone       Czech     Republic     a.s.,
Events, Promotions, Sponsoring
John Doe
123 Main Street
Prague 1, 110 00

In civicrm\CRM\Utils\PDF\Label.pdf around line 225
we now use
Code: [Select]
$this->MultiCell($this->width, $this->lineHeight, $texte, '', 'L');
instead of the original
Code: [Select]
$this->MultiCell($this->width, $this->lineHeight, $texte);
which gives us left-aligned mailing labels.

I want to make a bug for this, but would first like to get community agreement/hear possible opinions against this.

Thanks, Boris

Edit: FYI, in newer releases the variable above is '$var' instead of '$texte'.
« Last Edit: August 21, 2010, 10:06:10 am by obiuquido144 »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Mailing Labels - multiline field: agree on left align instead of justify?
August 21, 2010, 02:12:33 pm

hey boris:

how does the label show with your fix?

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

obiuquido144

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 4
Re: Mailing Labels - multiline field: agree on left align instead of justify?
August 21, 2010, 03:45:58 pm
Hi, the first line is aligned to the left (i.e. no wide spaces between words):

Vodafone Czech Republic a.s.,
Events, Promotions, Sponsoring
John Doe
123 Main Street
Prague 1, 110 00

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Mailing Labels - multiline field: agree on left align instead of justify?
August 21, 2010, 04:02:04 pm

can u file an issue for this and we'll fix in 3.2.3

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

obiuquido144

  • I post occasionally
  • **
  • Posts: 34
  • Karma: 4
Re: Mailing Labels - multiline field: agree on left align instead of justify?
August 24, 2010, 02:46:23 am
Bug added: http://issues.civicrm.org/jira/browse/CRM-6717

Thanks!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Mailing Labels - multiline field: agree on left align instead of justify?

This forum was archived on 2017-11-26.