Would be cool to see this fill in all of the labels on the sheet, not just the left most ones. Also, the ability to add more Avery label types would be great too.

Comments

acouch’s picture

The labels will fill the entire page, starting with the left ones first. If you are just seeing the left-hand labels then you either 1) don't have enough content for enough labels to fill the whole page, or 2) you have 'Items to Display' under 'Basic Settings' in the view set to a number that is too low to fill up the entire page.

Does that make sense?

Are there specific label types you would like to see?

kruser’s picture

Oh cool, I've only tested with limited data and expected it to go left to right, but yes makes sense now.

We use Avery 5164 and 5366 a lot.

acouch’s picture

Avery 5164 is supported.

Below are the measurements. If you are able to measure 5366 I can add it:

'5160' => array('name' => '5160', 'paper-size' => 'letter', 'metric' => 'mm',
'lMargin' => 4.7625, 'tMargin' => 12.7, 'NX' => 3, 'NY' => 10,
'SpaceX' => 3.96875, 'SpaceY' => 0, 'width' => 65.875, 'height' => 25.4,
'font-size' => 8),
'5161' => array('name' => '5161', 'paper-size' => 'letter', 'metric' => 'mm',
'lMargin' => 0.967, 'tMargin' => 10.7, 'NX' => 2, 'NY' => 10,
'SpaceX' => 3.967, 'SpaceY' => 0, 'width' => 101.6,
'height' => 25.4, 'font-size' => 8),
'5162' => array('name' => '5162', 'paper-size' => 'letter', 'metric' => 'mm',
'lMargin' => 0.97, 'tMargin' => 20.224, 'NX' => 2, 'NY' => 7,
'SpaceX' => 4.762, 'SpaceY' => 0, 'width' => 100.807,
'height' => 35.72, 'font-size' => 8),
'5163' => array('name' => '5163', 'paper-size' => 'letter', 'metric' => 'mm',
'lMargin' => 1.762,'tMargin' => 10.7, 'NX' => 2,
'NY' => 5, 'SpaceX' => 3.175, 'SpaceY' => 0, 'width' => 101.6,
'height' => 50.8, 'font-size' => 8),
'5164' => array('name' => '5164', 'paper-size' => 'letter', 'metric' => 'in',
'lMargin' => 0.148, 'tMargin' => 0.5, 'NX' => 2, 'NY' => 3,
'SpaceX' => 0.2031, 'SpaceY' => 0, 'width' => 4.0, 'height' => 3.33,
'font-size' => 12),

kruser’s picture

StatusFileSize
new12.73 KB

That's awesome thanks. I didn't think 5164 would be in there already since it doesn't have a dropdown item viewable (in mailing_label.module), but I added it in and works.

Attached are the specs for 5366,
'5366' => array('name' => '5366', 'paper-size' => 'letter', 'metric' => 'in',
'lMargin' => 0.53, 'tMargin' => 0.5, 'NX' => 2, 'NY' => 15,
'SpaceX' => 0.56, 'SpaceY' => 0, 'width' => 3.44, 'height' => 0.67,
'font-size' => 8),

Coincidentally, we just ran out of these labels so I didn't get a chance to test this yet :)

patcon’s picture

Haven't had time to look into the code, but would you see it as a huge undertaking to adapt the module so that we can create our own label types? Like if there was a form fields for a name and all your data above, which could be serialized, then saved to a new table with labid, name & data columns?

And just to be clear, I'm not asking you to do it, since I know that's huge, but can you see the practicality in this? Would you be up for adding a patch?

Anyhow, cheers, and great module!

acouch’s picture

@2440media2, that is great. I will include this as soon as I get a chance to, which prob won't be for a while unfortunately. I think once Views in D7 is ready I'll work on D6 and D7 versions.

@biocomp.pat it is possible to add your own label types in the code right now. setting up an administrative interface for that would be possible. To properly test it might take 10 hours, which I'm not going to do unless someone sponsors me. I would be willing to accept a patch if someone else is interested.

kruser’s picture

Found out they won't work unless they are in millimeters - with inches I would get blank pdfs.

'5164' => array('name' => '5164', 'paper-size' => 'letter', 'metric' => 'mm',
'lMargin' => 4.064, 'tMargin' => 12.7, 'NX' => 2, 'NY' => 3,
'SpaceX' => 4.826, 'SpaceY' => 0, 'width' => 101.6, 'height' => 84.582,
'font-size' => 12),

'5366' => array('name' => '5366', 'paper-size' => 'letter', 'metric' => 'mm',
'lMargin' => 13.462, 'tMargin' => 12.7, 'NX' => 2, 'NY' => 15,
'SpaceX' => 14.224, 'SpaceY' => 0, 'width' => 87.376, 'height' => 17.018,
'font-size' => 8),. 
letapjar’s picture

Here is the info for Avery 5167 - return address labels:

'5167' => array('name' => '5167', 'paper-size' => 'letter', 'metric' => 'mm',
'lMargin' => 7.62, 'tMargin' => 12.7, 'NX' => 4, 'NY' => 20,
'SpaceX' => 7.62, 'SpaceY' => 0, 'width' => 44.45, 'height' => 12.7,
'font-size' => 6),

This gets added to the array in mailing_label-ufpdf.php. You also have to add the 5167 option to the form in mailing_label.module in orde to select it.

letapjar’s picture

Status: Active » Closed (won't fix)

I'm closing this issue since the OP's issue was actually not an issue. (i.e. by design) -at leaset the multiple columns part of it.

@patcon and @2240media2 - if you'd like to see an admin interface for adding labels - please create a separate issue/feature request for this since it is not the same issue as the multiple columns - (each issue needs its own thread.) As mentioned, a sponsor for devel and testing will go a long way to seeing this actually implemented.

richardtmorgan’s picture

Status: Closed (won't fix) » Active
StatusFileSize
new6.55 KB

I've produced an administration interface for the module.

Attached zip file includes:

  • mailing_label.install - this creates a table to store label definitions in, and adds the existing label definitions to that table
  • mailing_label_settings.admin.inc - these are the admin pages. New labels can be created. Each label can be enabled/disabled and re-ordered. This is handy for me to have two versions of the same label but with different font sizes for example.
  • mailing_label.js - since my labels can be re-ordered, I need jQuery to make my weight column disappear for users with javascript enabled
  • mailing_label.module file - this changes the mailing_label_form() function to read the options for the mailing label drop down from the database and also adds the hook_menu() and hook_theme() functions and the function to pull the label information from the database

To add the adminstration interface, first uninstall the module, then overwrite the module file with the new module file and add the other three files. Then re-install the module.

To make the label top margin work, you will also need to patch the mailing_label-ufpdf.php file as described here: http://drupal.org/node/771094

I hope this is useful to other people.

patcon’s picture

Richard. You are amazing. I don't need this module right now, but I expect you'll be getting a lot of high-fives soon :)

Cheers

newToo’s picture

Great work! There is a bit of an issue though. I uninstalled the module, uploaded your files and reinstalled the module. Cleared the cache... In the admin section I'm getting this error.

user warning: Table .... .mailing_label' doesn't exist query: SELECT * FROM mailing_label ORDER BY weight in /... /mailing_label.module on line 114.

Any suggestions how to fix this?

Thanks for the admin addition.

richardtmorgan’s picture

Can you check that the table 'mailing_label' really doesn't exist (look at your database directly with phpAdmin or the like).

If it hasn't been created, then for some reason the module.install file was not called (which would have set the table up). Try uninstalling and re-installing the module. It is not as simple as just unchecking the module from the module list at admin/build/modules you must do this first and then uninstall it at admin/build/modules/uninstall.

If table was not created and going through the process of uninstalling and re-installing the module again does not create it, then that's weird - for some reason you are not allowed to alter the database structure of your database - but this should screw up the installation of every module that relies on creating database tables. Beyond my knowledge - perhaps check you are logged in as user 1?

If the table was created, then I don't know why you'd get the error saying the table doesn't exist.

Please let me know either way,

thanks,

Richard

acouch’s picture

hi richard:

I'd like to include your administrative interface but I need you to write a patch: http://drupal.org/patch/create

It is something that everyone needs to learn and will help you as you do more work with Drupal.

richardtmorgan’s picture

StatusFileSize
new32.85 KB

Better late than never...

When I checked the repository version of mailing_label out there was no 'mailing_label-ufpdf.php' file checked out (??) so the patch also creates that file (??).

bluegeek9’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.