I am having a strange issue with Arial font when the size is set to 10 or 12.
If the code text is more than 9 characters the last character does not show in the displayed text.
So the value 12312312345 will display 1231231234 but the bar code is encoded with the full text.
If I set the font size to any other value it displays correctly.
I am applying the license we purchased so it is not an evaluation issue.
Here is my code:
Font font = new Font("Arial", Font.PLAIN, 12);
BarCodeBuilder builder = new BarCodeBuilder();
builder.setSymbologyType(Symbology.Code128);
builder.setCodeText("12312312345");
builder.setCodeLocation(CodeLocation.Below);
builder.getCaptionAbove().setTextAlign(StringAlignment.Center);
builder.setCodeTextFont(font);
builder.getCaptionBelow().setVisible(true);
FileOutputStream fos = new FileOutputStream(new File("c:/testCodes//testDisplay.png"));
ByteArrayOutputStream baos = new ByteArrayOutputStream();
builder.save(baos, BarCodeImageFormat.Png);
baos.writeTo(fos);
I also tried setting the font by using builder.getCaptionBelow().setFont(font) but that ignores the font all together.
This is a common font setting that will be used in our application so this issue will need to be resolved.
We are using the Java Bar code library.
Thank you
Fred
Hi Fred,
Thank you for contacting support. We have tested your sample code against the latest build of Aspose.BarCode 6.8.0 and managed to replicate the problem said. We have logged this issue under ticket id BARCODJAVA-33513 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.
The issues you have found earlier (filed as BARCODJAVA-33513) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.