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 label format
Pages: [1]

Author Topic: Mailing label format  (Read 2528 times)

twowheeler

  • I post occasionally
  • **
  • Posts: 115
  • Karma: 11
    • Harrisburg Christian Performing Arts Center
  • CiviCRM version: 4.3.4
  • CMS version: Drupal 7.22
  • MySQL version: 5.1
  • PHP version: 5.3
Mailing label format
October 28, 2007, 10:47:11 pm
We used civicrm's ability to print mailing labels recently, and found that the standard 5160 label format suffers from a small amount of label "creep".  The first label at the top is positioned correctly, but each subsequent label down the page moves up a bit because they are slightly short, until the last label at the bottom is printed halfway across the seam between the 9th and 10th labels.  Same thing happens horizontally, the labels are slightly too small and creep across the seams.
After some experimenting we figured out how to fix this by inserting spaces like {  } at the top and sides of the label formats in CiviCRM.  Is there a better way to deal with this problem?
We have not tried any of the other label formats.  The 5160 is the most common one for mailing addresses.
Thanks.

speleo

  • Ask me questions
  • ****
  • Posts: 396
  • Karma: 28
  • CiviCRM version: 4.3.1
  • CMS version: J! 2.5,9
  • MySQL version: 5.1
  • PHP version: 5.3.24
Re: Mailing label format
October 29, 2007, 04:56:42 am
The positioning of mailing labels is defined in CRM\contact\form\task\label.php and And in CRM\Utils\Pdf\Label.php

I added the L7160 awhile ago. You may want to take a look at http://www.nabble.com/Mailing-Labels-tf2532205s15986.html#a7055894

The 5160 is defined as:

'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),

you may want to review these settings.

twowheeler

  • I post occasionally
  • **
  • Posts: 115
  • Karma: 11
    • Harrisburg Christian Performing Arts Center
  • CiviCRM version: 4.3.4
  • CMS version: Drupal 7.22
  • MySQL version: 5.1
  • PHP version: 5.3
Re: Mailing label format
October 29, 2007, 05:13:17 pm
After testing on two different PCs, printers and brands of 5160 stock, it is clear that there is some variation due to hardware & labels.  However the following seems to work better in general.

Quote
u39851308:~/home/sites/all/modules/civicrm/CRM/Utils/PDF > diff Label.php.orig Label.php     
62,63c62,63
<                                'lMargin' => 1.762, 'tMargin' => 10.7, 'NX' => 3, 'NY' => 10,
<                                'SpaceX' => 3.175, 'SpaceY' => 0, 'width' => 66.675, 'height' => 25.4,
---
>                                'lMargin' => 4, 'tMargin' => 12.7, 'NX' => 3, 'NY' => 10,
>                                'SpaceX' => 4, 'SpaceY' => 0, 'width' => 66.675, 'height' => 25.6,


Thanks very much for your pointer.

renee

  • Guest
Re: Mailing label format
September 01, 2010, 01:53:22 pm
I found that the above code was still slightly but fatally off for me but found this to work after experimentation:

 '5160' => array('name' => '5160', 'paper-size' =>  'letter', 'metric' => 'mm',
                              'lMargin' => 4, 'tMargin' => 12.7, 'NX' => 3, 'NY' => 10,
                              'SpaceX' => 7, 'SpaceY' => 0, 'width' => 67, 'height' => 27,
                              'font-size' => 8),

Finally!  Yes! 

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Mailing label format

This forum was archived on 2017-11-26.