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,
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,
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,
Hi Tony,
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.
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,
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,
Hi Tony,
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.
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.
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.
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