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) »
  • Editing Mail Label Formats
Pages: [1]

Author Topic: Editing Mail Label Formats  (Read 1557 times)

organicathlete

  • Guest
Editing Mail Label Formats
August 08, 2007, 11:54:22 am
Hello,
When I try to print the 5160 labels, the first couple of character of the far left column gets cut off.  So I tried to add a few spaces to the mailing label format via Global Settings --> Addresses --> Mailing Label Format like this:
{ }   
{ }{ }{ }{contact_name}
{ }{ }{ }{street_address}
{ }{ }{ }{supplemental_address_1}
{ }{ }{ }{supplemental_address_2}
{ }{ }{ }{city}{, }{state_province}{ }{postal_code}
{ }{ }{ }{country}

However, when I create new mailing labels, the format is exactly the same as the original:
{contact_name}
{street_address}
{supplemental_address_1}
{supplemental_address_2}
{city}{, }{state_province}{ }{postal_code}
{country}

What I am leaving out?

Thanks
-Bradley

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Editing Mail Label Formats
August 09, 2007, 04:13:55 am
Bradley:

We are using updf for generating labels. Looks like updf is stripping those spaces.

kurund
Found this reply helpful? Support CiviCRM

organicathlete

  • Guest
Re: Editing Mail Label Formats
August 09, 2007, 09:18:27 am
Hi Kurund,

I tried once to put {. } at the front of each line to see what would happen, but a period did not show up in the output. 

-Bradley

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Editing Mail Label Formats
August 10, 2007, 12:54:17 am
Bradley:

{contact_name}, etc are used to specify fields that need to be displayed in Mailing Label. I guess for formatting you might have to customize 5160 label as per your need.

Check CRM/Utils/PDF/Label.php, approx. line 55
 
Quote
  protected  $averyLabels =
         array (
                '5160' => array('name' => '5160', 'paper-size' => 'letter', 'metric' => 'mm',
                               'lMargin' => 1.762, 'tMargin' => 10.7, 'NX' => 3, 'NY' => 10,
                                'SpaceX' => 3.175, 'SpaceY' => 0, 'width' => 66.675, 'height' => 25.4,
                               'font-size' => 8),

Adjust it according to your need. You might want to increase lMargin.

HTH

kurund
Found this reply helpful? Support CiviCRM

organicathlete

  • Guest
Re: Editing Mail Label Formats
August 17, 2007, 08:22:26 pm
Thanks! That worked.

-Bradley

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Editing Mail Label Formats

This forum was archived on 2017-11-26.