ITF14 - BorderWidth has no effect

Using v7.2. it doesn’t appear the BorderWidth property has any effect for the thickness of an ITF14 barcode border. The attached barcode was generated from the code below. The expectation is the bar on top/bottom would be sized based on the BorderWidth (which is set to double the xDimension), but the resulting image definitely has a larger size than that. In fact, it doesn’t matter what the BorderWidth is set to: the size of the bar never changes.



Is there another property? If there isn’t, there must be a way to change the thickness of the bar (and, if chosen the ITF14 frame). This affects readability of the barcode, so it’s important to have some control over that thickness.



BarCodeBuilder b = new BarCodeBuilder(“00850006000227”);

b.AutoSize = true;

b.SymbologyType = Symbology.ITF14;

b.ITF14BorderType = ITF14BorderType.Bar;

b.BorderWidth = 0.990f;

b.CodeTextFont = new Font(“OCR B Std”, 8.0f);

b.GraphicsUnit = GraphicsUnit.Millimeter;

b.xDimension = 0.495f;

b.BarHeight = 12.7f;

b.CodeTextSpace = 0.5f;

b.Resolution = new Resolution(1200.0f, 1200.0f, ResolutionMode.Customized);

b.Save(“ITF14 - Border Sizing.png”, BarCodeImageFormat.Png);

Hi Tony,


Thank you for contacting support. Please note, the BorderWidth property does not control bars thickness. It controls the barcode’s image border width. Unfortunately, there is no way to control thickness of top and bottom bars of ITF14 barcode. We have logged a feature request under ticket id BARCODENET-34265 in our issue tracking system. Your post has also been linked to this issue. We’ll keep you informed regarding any available updates. We’re sorry for the inconvenience caused.

Can you tell me how the thickness is calculated? The issue this causes is when you set the BarHeight, the bars at the top/bottom shorten the bars within the barcode itself. So it doesn’t meet the minimum height specification for ITF14 unless you add more to the BarHeight. If I know how the thickness is calculated, then I can work around that issue without guessing what the added height should be.

Hi Tony,


Thank you for the inquiry. In reference of issue id BARCODENET-34265, we have logged a feature request to control top / bottom bars thickness levels. However, regarding the calculation of the thickness level of bars, you can use any one of the free ruler applications available on the internet, and then set BarHeight property appropriately.

We hope, this helps. Please let us know in case of any ambiguity or questions.

The barcodes are generated dynamically, so using a ruler is not an option.

I understand the feature request is logged, because it’s not a settable property. Totally understand. But I’m looking for the calculation for the thickness that has to be done by the Aspose.Barcode code itself, so I can code around the missing feature, until it is ready. That calculation must be in there, and should be pretty simple.

Hi Tony,


Thank you for the clarification. We’re in communication with our product team and will get back to you early next week.

Hi Tony,


Thank you for being patient.
abadger:
Can you tell me how the thickness is calculated? The issue this causes is when you set the BarHeight, the bars at the top/bottom shorten the bars within the barcode itself. So it doesn’t meet the minimum height specification for ITF14 unless you add more to the BarHeight. If I know how the thickness is calculated, then I can work around that issue without guessing what the added height should be.
Sorry for bothering you for a clarification. We think, you are mixing ITF14 barcode height with ITF14 horizontal bars thickness because BarHeight property does not change the bars thickness. It’s only changing the length of vertical bars. Please clarify us on this. We’re calculating bars thickness by implementing an algorithm. Many other factors can influence it. However, we have asked our product team to provide some details. We’ll write back to you once an update is available from our product team.

Note: You are right in reference of not following the minimum height specification of ITF14 barcodes. We need to improve that area. We have logged an enhancement under ticket id BARCODENET-34274 in our issue tracking system. We’ll let you know once a significant progress has been made in this regard.

imran.rafique:
We think, you are mixing ITF14 barcode height with ITF14 horizontal bars thickness because BarHeight property does not change the bars thickness. It's only changing the length of vertical bars. Please clarify us on this. We're calculating bars thickness by implementing an algorithm. Many other factors can influence it. However, we have asked our product team to provide some details. We'll write back to you once an update is available from our product team.

What I am asking for is the calculation for the thickness of the bar/frame provided by the ITF14BorderType property. Because what happens is, whatever thickness that is, takes away from the height of the bars within the barcode itself.

Example excerpt from the first post:
b.ITF14BorderType = ITF14BorderType.Bar;
b.GraphicsUnit = GraphicsUnit.Millimeter;
b.xDimension = 0.495f;
b.BarHeight = 12.7f;

I want an ITF14 barcode, with the ITF14BorderType property of "Bar" to be 12.7mm. The resulting generated barcode is 12.7mm in height, however the barcode itself, within the ITF14 bars is NOT 12.7mm, but smaller. It is smaller by two times the thickness of the ITF14 bars. So, if the bars are, say, 1.98mm thick (4 times the xDimension), then the barcode itself is 8.74mm, which does not pass specifications.

What I am asking for is how the thickness of the ITF14 bars (or frame) is calculated. It does appear to be some factor of the xDimension. With that, I can calculate how much larger I need to make the BarHeight property to make the barcode pass specification. So, if in my example, I can do this:

b.ITF14BorderType = ITF14BorderType.Bar;
b.GraphicsUnit = GraphicsUnit.Millimeter;
b.xDimension = 0.495f;
b.BarHeight = 16.66f; // 12.7 + 1.98 + 1.98

Using the above logic, I get an ITF14 barcode, with the ITF14 bars on top/bottom, and the bars inside the bars will be 12.7mm in height, and pass specifications.

If I have this calculation, I can code around the issues you have logged as BARCODENET-34265 and BARCODENET-34274 for now, until those are implemented.

Hi Tony,


Thank you for clarifying your scenario. We have passed this information to our product team. Indeed, this will help in their investigations and the quest of a workaround. Please spare us a little time and stay tuned.

Hi Tony,

Thank you for being patient. We have a good news for you that the issue id BARCODENET-34274 has now been resolved. If there is no issue in the QA phase, then this fix will be included in the next version of Aspose.BarCode for .NET 7.3.0. We'll inform you via this forum thread as soon as the new release is published.

From the specifics of ticket id BARCODENET-34265, the size of the bars at the top and bottom is equal with wide-X-dimension. You can re-size borders and wide-X-dimension by setting WideNarrowRatio property of the BarCodeBuilder class object. Is it fine or you only looking to re-size borders? Please let us know about your feedback on this.

The issues you have found earlier (filed as BARCODENET-34274) have been fixed in Aspose.BarCode for .NET 7.3.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Using 7.3, I do not see any difference in the barcode rendered with the code above:



BarCodeBuilder b = new BarCodeBuilder(“00850006000227”);

b.AutoSize = true;

b.SymbologyType = Symbology.ITF14;

b.ITF14BorderType = ITF14BorderType.Bar;

b.BorderWidth = 0.990f;

b.CodeTextFont = new Font(“OCR B Std”, 8.0f);

b.GraphicsUnit = GraphicsUnit.Millimeter;

b.xDimension = 0.495f;

b.BarHeight = 12.7f;

b.CodeTextSpace = 0.5f;

b.Resolution = new Resolution(1200.0f, 1200.0f, ResolutionMode.Customized);

b.Save(“ITF14 - Border Sizing.png”, BarCodeImageFormat.Png);



The rendered barcode is identical. The height of the entire barcode, with the borders, is 12.7mm. Within the barcode, the height of the bars is 9.7mm. The expected result is the height within the barcode should be 12.7mm, not the overall height.



Can you tell me what is fixed in this release to resolve BARCODENET-34274, and how I could tell? One note: there is another bug being tracked (BARCODENET-34283) which deals with BarHeight for ITF-14 in general. I want to be sure when that one is fixed, the allowance is made for the thickness of the bars/frame for the ITF-14 barcodes that this fix should have had.



Also, for the enhancement (BARCODENET-34265) of allowing control over the thickness of an ITF-14 border, I am looking to directly control it, or at least that the software should follow the specification. Using WideNarrowRatio would invalidate the barcode itself. The GS1 spec says that for ITF14BorderType.Frame, the thickness should be 4.83mm. For ITF14BorderType.Bar, the thickness should be twice the width of the narrow bar (which is the xDimension). I can set that, or the software can. Doesn’t matter to me, the system default to the specification, and still allowing the developer some control makes sense to me.

Hi Tony,


Thank you for the inquiry. We’re working over your query and will get back to you soon.

Hi Tony,


Thank you for being patient. In reference of ticket id BARCODENET-34274, please use the sample code below and let us know your feedback on this:

[.NET, C#]
BarCodeBuilder b = new BarCodeBuilder(“00850006000227”);
b.AutoSize = true;
b.SymbologyType = Symbology.ITF14;
b.ITF14BorderType = ITF14BorderType.BarOut;
b.CodeTextFont = new Font(“OCR B Std”, 8.0f);
b.GraphicsUnit = GraphicsUnit.Millimeter;
b.xDimension = 0.495f;
b.BarHeight = 12.7f;
b.CodeTextSpace = 0.5f;
b.Resolution = new Resolution(1200.0f, 1200.0f, ResolutionMode.Customized);
b.Save(“ITF14 - Border Sizing.png”, BarCodeImageFormat.Png);
adabger:
One note: there is another bug being tracked (BARCODENET-34283) which deals with BarHeight for ITF-14 in general. I want to be sure when that one is fixed, the allowance is made for the thickness of the bars/frame for the ITF-14 barcodes that this fix should have had.
Please note, this ticket is about the investigation of unexpected behavior of BarHeight property. It does not deal with controlling bars/frame thickness. Furthermore, Aspose.BarCode APIs calculate border width as follows: “borderWidth = builder.WideNarrowRatio * builder.xDimension”. We hope, this helps.
adabger:
Also, for the enhancement (BARCODENET-34265) of allowing control over the thickness of an ITF-14 border, I am looking to directly control it, or at least that the software should follow the specification. Using WideNarrowRatio would invalidate the barcode itself. The GS1 spec says that for ITF14BorderType.Frame, the thickness should be 4.83mm. For ITF14BorderType.Bar, the thickness should be twice the width of the narrow bar (which is the xDimension). I can set that, or the software can. Doesn’t matter to me, the system default to the specification, and still allowing the developer some control makes sense to me.
We have logged this feedback against the ticket id BARCODENET-34265. We’ll let you know once the significant progress has been made in this regard.

Ah, I did not know there were new BorderTypes to use. I just checked them, and it does look good to go. Thanks for the info and adding some feedback to the BARCODENET-34265 ticket.

Hi Tony,

Thank you for the kind feedback. It's pleasant to know that it works perfect on your side. Kindly tell us in case of whatever other inquiry or inquiries regarding the Aspose APIs.

The issues you have found earlier (filed as BARCODENET-34265) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan