Hi, in the new version of barcode.dll there’s a feature about GS1DATAMATRIX: Display2DText together with barcode image, see the example below.
My question is:
is it possible to setup a particular type of font regarding string displaytext ?
thanks
best regards
// For complete examples and data files, please go to GitHub - aspose-barcode/Aspose.BarCode-for-.NET: Aspose.BarCode for .NET examples, plugins and showcase projects
string CODICE = “(90)0843110730<<<<452287005001T8”;
string displayedText = “(90)0843” + Environment.NewLine +
“110730<<<<” + Environment.NewLine +
“452287” + Environment.NewLine +
“005001T8” + Environment.NewLine;
using (BarCodeBuilder builder = new BarCodeBuilder(CODICE, EncodeTypes.GS1DataMatrix))
{
builder.CodeLocation = CodeLocation.Right;
builder.Display2DText = displayedText;
Bitmap barcode = builder.GenerateBarCodeImage();
barcode.Save(dataDir + "Display2DText.png");
}
@davidecerea
If you are talking about the text displayed with code as in your case “(90)0843110730<<<<452287005001T8” then yes you can apply font and color as given below:
builder.CodeTextColor = Color.Red;
builder.CodeTextFont = new Font(“Pristina”, 14f);
But if you want to apply font on in your case the value of variable “string displayedText” then
it is not possible at the moment. We are looking into it and will get back to you with information once available.
ok thanks,
yes I would like to set up Font to variable “string displayedText”.
I’ll see if this will be possible later…
thanks
best regards
@davidecerea
This issue has been logged under Id “[BARCODENET-36983]”. You will automatically be notified once any update is available in this regard.
@davidecerea
Any Barcode contains only plain text or binary data. If you want to use this data special way then you have to use corresponded tools after scanning on their side.