Jump to content

Truncate UPC Barcode


akappycanfieldtack.com

Recommended Posts

UPC codes need to be no smaller than 80% of size. Using the barcode rule and the IDAutomation, we can create an 80% size by setting the font size to 16pts.

 

Our problem is that we haven't found any way to truncate the height of the barcode. The customer supplied art allowed for a UPC that was only a bit over 1/2" high. We can't reduce the font size and horizontally scale (setwidth) as that will cause the UPC to fail verification.

 

This project was printing on shells and we were able to lay a white block on top to hide the excess height. I'm looking for a solution that will work when we are not suppressing the background but printing full color output.

 

Andy Kappy

Link to comment
Share on other sites

Andy,

UPC like several of the other Barcode fonts has different heights that can be used. However, you do need to indicate which one to use. Here is the list of the different height versions:

 

IDAutomationUPCANL - this is the Large and displays the number too

IDAutomationUPCANM - this is the Medium and displays the number too

IDAutomationUPCANS - this is the Small and displays the number too

IDAutomationUPCANXSnoHR - this is the Extra Small, no number

 

Try changing the font used and see if it fixes the issue.

Link to comment
Share on other sites

Andy,

 

What FreightTrain states is true, for the IDAutomation you can choose from a set of specific font heights. Most (if not all) the IDAutomation fonts have this feature...if you happened to have purchased the full set. Luckily FusionPro comes with all these pre-loaded in the software. However, what would happen if you had a barcode font that does not have the luxury of multiple font heights already included in the set? Or what would happen if you only have a pirated :eek:... uhh "borrowed" :o copy of just one specific barcode font?

 

You can still use a copyfit function on this. Select the frame that you want to "shrink" or "truncate" the barcode text and change to copyfit by selecting the "Adjust text to fit" option of Overflow. You will see a rule in the rules editor called "OnCopyFit". If you open that you will see the FusionPro rule that will allow it to gradually shrink the point size of the font until it fits the frame. However, you stated that you didn't want the text to get smaller, just shorter. Therefore, change the wording within the first line of the rule from "text" to "textheight" so that it now reads...

 

if (!Copyfit(new MagnifyAttributes("textheight", 25, 400, 6, 72)))

 

This will "globally" change the copyfit rule to not shrink the point size of the text, but the height of the font itself. I've tested it out and it put a 48pt C128 barcode into an opening with a height of .3 inches. I also made a test text box to compare the size and width of the bars that was full sized and height. The two bars in the boxes had the same width, thickness and gap spacing, and the over length of the barcode was the same.

 

If you do not want to globally affect all the copyfit rules in this manner you can conditionally change the OnCopyFit rule to only affect a specific named text box...

 

if (FusionPro.Composition.CurrentFlow.name == "BarcodeBox") {
   if (!Copyfit(new MagnifyAttributes("textheight", 25, 400, 6, 72)))
   ReportWarning("Could not copyfit text in flow " + 
           FusionPro.Composition.CurrentFlow.name);
}
else {
   if (!Copyfit(new MagnifyAttributes("text", 25, 400, 6, 72)))
   ReportWarning("Could not copyfit text in flow " + 
           FusionPro.Composition.CurrentFlow.name);
}

This would only shrink the height if it was called from a box named "BarcodeBox". All other text boxes chosen to "copyfit" would gradually shrink in point size as FusionPro normally does by default. A bit more reading on the OnCopyFit function will show you that there are many ways that FusionPro can shrink the copy within a textframe and give you more control as to setting just "how far" you want it to shrink until FurionPro crys "uncle" and the rule errors out.

 

Hopes this helps. Gook Luck.

.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...