Jump to content

IMpB for Parcels


dreimer

Recommended Posts

Has anyone used Fusion Pro to create the Intelligent Mail Package Barcode. I have attached a PDF of how one would look. This barcode became a requirement as of July 2, 2012. Thanks for the heads up Post Office. So now if I don't have one of these I will be charged an additional $.08 per piece in postage. I mail thousands of these things a month so I need a way to generate it. Any help would be greatly appreciated.

IMPB Example.pdf

Link to comment
Share on other sites

I haven't seen a job making one of those, but it should be doable. The barcode itself in the middle is just a GS1-128, or EAN-128, barcode, which you can make with the MakeEAN128Barcode function in a rule. The rest is just text. If you need to output the top and bottom bars as well, you can put the whole thing in a table cell with thick top and bottom rulings.
Link to comment
Share on other sites

I have to frequently produce these for Priority Mail projects. As Dan said, you can use the MakeEAN128Barcode function to create the barcode itself. One thing you may have to tweak is what data you feed into the rule. We format it as needed (a barcode field and a separate human readable field) in our data files, but the formatting could be done with JavaScript in FusionPro.

 

The barcode is actually two codes combined (the ZIP code routing and the package code). The USPS just wants the package code (formatted with spaces between groups of numbers) now for the human readable. But the barcode can still have ZIP routing in it.

 

From your example...

ZIP routing: 42020026

Package code: 9402805213683062522920

 

Now the first parts of each code (420 for the ZIP & 94, in this case, for the package code) are actually "application identifiers". I've found that you need wrap the application identifiers in parentheses () before running through a barcode rule. Below are the two formats to use (either feed in your data, or format with rules/functions).

 

Barcode:

(420)20026(94)02805213683062522920

 

Human Readable:

9402 8052 1368 3062 5229 20

 

Here's an example of the actual barcode rule. I place this in a text box and format with the IDAutomationC128L font.

 

var barcodeData = Field("USPS PACKAGE SERVICES BARCODE");

if (barcodeData == "")
{
   return barcodeData;
}
else
{
   return NormalizeEntities(MakeEAN128Barcode(barcodeData));
}

Link to comment
Share on other sites

Perfect, thanks for the reply David.

 

Dan could you also help me with this one for adding the parenthesis like you helped me with the spaces in the other thread where David has added them in a rule in Fusion Pro. My data is one long string of 30 characters and need it formatted just as he has it. I apologize, I just don't know how to write JavaScript.

 

Thanks everyone for the help!!

Link to comment
Share on other sites

Dan could you also help me with this one for adding the parenthesis like you helped me with the spaces in the other thread where David has added them in a rule in Fusion Pro. My data is one long string of 30 characters and need it formatted just as he has it. I apologize, I just don't know how to write JavaScript.

var s = "420200269402805213683062522920";
return s.replace(/(\d{3})(\d{5})(\d{2})/, '($1)$2($3)');

Link to comment
Share on other sites

Perfect, looks like it worked!!!

 

Dan, Is there a place in any of the manuals that I can find on how to create tables, so I can create the black identification bars.

 

David, can you tell me the font and point size you use for the Priority Mail jobs you do?

 

Again, Thank you both for all your help, saving me life right now or at least my job!!!!

Link to comment
Share on other sites

Dan, Is there a place in any of the manuals that I can find on how to create tables, so I can create the black identification bars.

Tables are covered in the Tags Reference Guide. There are examples in the Frodo Travel Tutorial. Basically, though, you want to do something like in this thread:

var table = new FPTable; table.AddColumns(50000); // set width here
table.AddRow();
table.Rows[0].Cells[0].SetBorders("Thick", "Black", "Top", "Thick", "Black", "Bottom" );
table.Rows[0].Cells[0].Content = "the rest of the barcode stuff here";
return table.MakeTags();

Or, instead of a table, you could output a string of "block" characters from a symbol font, like so:

return '<f name="Webdings">' + Array(50).join('g');

Or just select "Webdings" and type the letter 'g' a bunch of times in the Text Editor.

Link to comment
Share on other sites

Oh nice, tried the table and that works good except my text ends up underneath my top and bottom solid bars. Here is my code:

 

 

var table = new FPTable; table.AddColumns(26000); // set width here

table.AddRow(3);

table.Rows[0].Cells[0].SetBorders("Thick", "Black", "Top", "Thick", "Black", "Bottom" );

table.Rows[1].Cells[0].Content = "USPS TRACKING #";

table.Rows[2].Cells[0].Content = Rule("Human Readable")

return table.MakeTags();

Link to comment
Share on other sites

David, can you tell me the font and point size you use for the Priority Mail jobs you do?

 

I use 21pt for the font size, but you may have to play around with that size (and the S, M, L, or XL font version) depending on where you're trying to fit the barcode. Of course, make sure it meets the USPS specs. I recommend doing a test mailing if you can.

 

Also, I take a cruder approach to getting the bars and other text around the barcode. I just make separate text boxes for everything and position to keep all of the spacing required between elements. Yes, even the bars are two empty text boxes with black background and the height I need. It's not elegant, but I know what everything is doing and position precisely. Screenshot is attached.

Priority Barcode Screenshot.pdf

Link to comment
Share on other sites

That is awesome, If I can't get the table to work I am for sure going to do it the way you did it.

 

I can't get the barcode to come out correctly though, it ends up huge. Here are my rules:

 

var s = Field("IMpb Commercial");

return s.replace(/(\d{3})(\d{5})(\d{2})/, '($1)$2($3)');

 

That rule gets my data to look like this:

(420)01001(92)78990109139100000084

 

I then call the rule into this rule for the barcode:

return '<f name = "IDAutomationC128M">' + NormalizeEntities(MakeEAN128Barcode(Rule("Zip Code For Barcode New")));

 

The barcode ends up not tall enough and way to long. Any advice?

 

Again, thank you both for all your help.

Link to comment
Share on other sites

Also, I take a cruder approach to getting the bars and other text around the barcode. I just make separate text boxes for everything and position to keep all of the spacing required between elements. Yes, even the bars are two empty text boxes with black background and the height I need. It's not elegant, but I know what everything is doing and position precisely. Screenshot is attached.

Yeah, that seems a lot simpler than what I was suggesting. There's often more than one way to skin a cat with template-building. Sometimes it's easy to overlook the simple solution.

Link to comment
Share on other sites

  • 8 months later...

Gentlemen,

 

I could not generate the IMPB code correctly. I must misunderstood the procedures. Would you please review my steps and advise me?

 

1) I created a new rule as 'C128L Barcode Rule' with Field (input 34 characters IMPB as the followings, and IDAutomationC128L as font. e.g. input IMPB value = (420)200042908(92)5890951800100000018 or

420200042908925890951800100000018

 

2) Create a Text Frame with IDAutomationC128L with Font size 23, and "C128L Barcode Rule" as variable.

 

My project is due in couple weeks. I really need your advice desperately and appreciate any help.

Edited by NewKid
Link to comment
Share on other sites

I can't tell much from what you have described, but here are a few suggestions...

 

1) The digits of a combined code when using Zip+4 in routing portion (i.e. after the 420), should be 34 characters (38 once you add 2 sets of parentheses). Your example is 33 characters (37 with parentheses), so it appears there may be a digit missing from your package code.

 

2) I'm not sure if you used a template for the barcode rule or started with an empty text rule and added JavaScript. If it is an text rule with JS, make sure "Treat returned strings as tagged text" is checked at the top.

Link to comment
Share on other sites

Hi David,

Sorry for not having a detail description earlier. I will try it again.

In FP Desktop 6.2P1A version:

 

1) Read in the IMPB code = (420)200042908(92)45890951800100000018

 

2) Create a Rule template as "C128L Barcode Rule" with these parameters:

Field = IMB-NUM (value as in step 1)

Font = IDAutomationC128L

 

3) Create a Text Frame template:

Font Name = IDAutomationC128L

Font Size = 14 or 16

Variable = C128L Barcode Rule (as step 2)

 

The barcode looks very different from the client's sample. I hope these information help. Thank you so much.

Link to comment
Share on other sites

What you describe seems OK for producing the code itself. As for matching customer art, you may have to play around the font (e.g. IDAutomationC128M instead of IDAutomationC128L font or whatever) and try different point sizes. Also, you may have to expand the text box more than you think to truly see the results.

 

More importantly, you have to make sure what you produce is acceptable to the USPS.

 

All I can say is that I use IDAutomationC128L set at 21pt in a text box, and happen to use only the Zip (not Zip+4) in the routing portion. That it has been mailable for Priority Mail. I have attached a sample.

Priority Mail Label Test.pdf

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...