automatically adding numbers to serial number labels

Previous topic - Next topic

otmezger

Hi there,

I'm going to print many labels with scribus (like 40 per page). I already have a template for that. Each label are 2 lines, one with the serial number (something like this" TT_#.#_####_00001")

Is there a way for me to automatically change the number 00001 in all labels, increasing by one? I don't want to spend so much time just clicking and modifying the last digit manually...

thanks.

GarryP

I have a way of doing this but it's a bit complicated so I hope someone else has a better answer, but here it is anyway:

* On an unused page create a PDF text field and give it the name "start".
* For each label create another PDF text field, keeping a note of its name. (Change the display options if you don't want borders etc.)
* Then for each label text field (last step) edit the field properties and go to the Calculate tab.
* Select Custom Calculation Script and enter a calculation of:
this.getField("<this>").value = "S. No. : TT_#.#.####_" + (this.getField("start").value + <x>);
...where <this> is the name of the label text field and <x> is 0 for the first label, 1 for the second, and so forth.
* Once you've done this for each label export the file as a PDF. (You won't be able to see the result in Scribus.)
(Duplicating the first label text field may be a quicker way of getting the others but watch for "copy of" names and remember to increment the <x> value each time.)

Once you've got the PDF you should be able to change the value of the "start" field and the label fields should change their numbers automatically.

I've attached a quickly created sample SLA and PDF so you can see the idea working.

There's a bit of work to do but you only have to do it once. Every time you need more labels just open the document and change the "start" value.

I did say it was a bit complicated but it's pretty much just the same thing over and over again, copy/paste/duplicate with a few clicks and key presses. I really hope someone else comes up with a better way though.

[attachment deleted by admin]