Jump to content

Formatting for Sequential Numbering


PMKoenig

Recommended Posts

:confused: I have a document that I want to number sequentially from 2000-2999. This works great. However I need to make the number 2 print in yellow and the last three digits print in red. I know how to change the color of all of the digits, but is there a way to make the color for just the first digit different than the rest?

 

This is probably really easy, but we have never had to do it and I can't find it. So Help and Thanks!

 

Here is my current numbering rule:

 

var start = "2000";

var LeadingZero = "000";

 

new_val = start-1

 

return '<z newsize="250"><setwidth newsize="120">' + FormatNumber(LeadingZero, new_val + CurrentRecordNumber());

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...

I have been using this and it works great!

 

But is there a way to make the span color the same color as the paper? I want to print lots of pages with just the first number and the rest blank spaces. I want to run these in bulk.

 

Then I am going to run these shells through a sheet fed machine and number and personalize them. So I need to be able to make the colors "null" or "no fill" or "nothing" is that possible???

 

var start = 2000;

var LeadingZero = "000";

new_val = start - 1;

var num = FormatNumber(LeadingZero, new_val + CurrentRecordNumber());

return '<z newsize="250"><setwidth newsize="120"><span color=yellow>' +

num[0] + '</span><color name=Red>' + num.substr(1);

 

 

Thanks!!!!!

Link to comment
Share on other sites

But is there a way to make the span color the same color as the paper? I want to print lots of pages with just the first number and the rest blank spaces. I want to run these in bulk.

 

Then I am going to run these shells through a sheet fed machine and number and personalize them. So I need to be able to make the colors "null" or "no fill" or "nothing" is that possible???

I don't know what a "null" or "no fill" or "nothing" color is. If you want a part of the text to not appear, then it seems pretty obvious what to do: Don't output it at all. Or am I missing something?

 

So, if you want just the first digit without the rest of the number, then just output that and nothing else:

var start = 2000;
var LeadingZero = "000";
var new_val = start - 1;
var num = FormatNumber(LeadingZero, new_val + CurrentRecordNumber());
return num[0];

Or, equivalently, since really what you're doing is just getting the index of whichever group of 1000 your current record is in:

var start = 2000;
var num = start - 1 + CurrentRecordNumber();
return Math.floor(num / 1000);

Insert this rule in whatever size and color you want in the Text Editor.

Link to comment
Share on other sites

I need to leave a space to print it later. I am printing shells numbered 000-999.

 

Later I will be adding personalization and a number in front of the 000-999.

 

So my end product would be personalized and numbered 7000-7999 or 3000-3999

Link to comment
Share on other sites

I want to print thousands of shells numbered " 000" to " 999"

 

Then when my customers order these I will add their personalization and a number in front of the " 000"

 

The end product would have my customer's information and be numbered from 2000-2999 by simply adding the "2" in front of the " 000" to " 999"

 

Hopefully this makes a little more sense.

Link to comment
Share on other sites

I need to leave a space to print it later. I am printing shells numbered 000-999.

 

Later I will be adding personalization and a number in front of the 000-999.

 

So my end product would be personalized and numbered 7000-7999 or 3000-3999

Sorry, I'm trying to figure out exactly what you're asking. It wasn't obvious from your other post which part of the number you want to "leave a space for." I'm also not sure what two other things this "space" is supposed to be between. Sometimes a picture is worth a thousand words.

 

Anyway, if it's the first digit you want to "space," then just don't output that first digit, like so:

var start = 2000;
var LeadingZero = "000";
var new_val = start - 1;
var num = FormatNumber(LeadingZero, new_val + CurrentRecordNumber());
return num.substr(1);

Or if you really do want to leave a space (though I'm still not sure about the answer to "between what?"), then you can literally put out a space, i.e. " ":

var start = 2000;
var LeadingZero = "000";
var new_val = start - 1;
var num = FormatNumber(LeadingZero, new_val + CurrentRecordNumber());
return " " + num.substr(1);

Again, you can put this in whatever color and size you want in the Text Editor.

Link to comment
Share on other sites

So I want to create 2 sets of files for my printer. The first one would be numbered " 000" to " 999" and that's it.

 

The second file would only have the "thousands' digit" and the personalization.

 

So I thought that if I made the first number "invisible" and ran the numbered shells for the 000 - 999. This is what I would run several thousand sets of.

 

Then I was going to number 1 sheet keeping the "000" to "999" invisible and printing just the thousands digit (with the personalization). Then the two would line up when we printed on them the second time.

 

It would look like they were printed digitally and numbered from the beginning.

Link to comment
Share on other sites

So I want to create 2 sets of files for my printer. The first one would be numbered " 000" to " 999" and that's it.

Do this in a rule and put it in a text frame:

return FormatNumber("000", CurrentRecordNumber() - 1);

The second file would only have the "thousands' digit" and the personalization.

Do this in a rule:

return CurrentRecordNumber();

Or just insert the $inputrecordnumber variable directly into the Text Editor, without any rule.

 

Put this in another text frame, overlapping the first one. Turn on Preview and adjust the positions of the two frames so that the number "1000" appears correctly. Save the template.

So I thought that if I made the first number "invisible" and ran the numbered shells for the 000 - 999. This is what I would run several thousand sets of.

Delete the frame with the single digit, then on the Input tab of the Composition Settings dialog, set the record range to 1 to 1000 and compose.

Then I was going to number 1 sheet keeping the "000" to "999" invisible and printing just the thousands digit (with the personalization). Then the two would line up when we printed on them the second time.

Undo the deletion of the single digit frame. Now delete the other frame, set the record range to however many you want, and compose again (to a different output file).

It would look like they were printed digitally and numbered from the beginning.

Yep, that should do it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...