Caption above picture instead of text

Dear support!


We are using <span style=“background-color: rgb(255, 255, 255); color: rgb(91, 91, 91); font-family: “Helvetica Neue”, Helvetica, Arial, sans-serif; font-size: 13px;”>Aspose.BarCode for .NET 17.4 . I can’t seem to find the option of putting a picture in the above caption of the barcode.

Can you help me achieve this?

Kind regards,

Katja
Hi Katja,

The feature you are looking for is not available. Simple text can be added as codetext. Please visit the link Managing BarCode Text Appearance for detail on handling and formatting barcode text.

Is there a chance that this could be added? Our clients need this feature.


Kind regards,

Katja
Hi Katja,

Thank you for writing us back.

We have logged the feature request in our system with ID BARCODENET-36572. Our product team will further look into it and provide feedback. We will update you with the feedback in the forum thread once available.

For now you may try the following code snippet as work around.

CODE:
using (BarCodeBuilder builder = new BarCodeBuilder("123456789012", EncodeTypes.EAN13))
{
using (Bitmap barcode = builder.GenerateBarCodeImage())
using (Bitmap picture = (Bitmap)Image.FromFile(@"path_to_your_picture.png"))
using (Bitmap output = new Bitmap(Math.Max(barcode.Width, picture.Width), barcode.Height + picture.Height))
{
using (Graphics g = Graphics.FromImage(output))
{
g.Clear(Color.White);
g.DrawImage(picture, new PointF(0, 0));
g.DrawImage(barcode, new PointF(0, picture.Height));
}
output.Save("output.jpg");
}
}

Hello!


Thank you for this, it’s not ideal, but it works :slight_smile:

I do hope, that this feature will be aded soon, it will simplify everything by a landslide.

Thank you again!

Kind regards,
Katja
Hi Katja,

Thank you for feedback. We will update as soon as any update is available on this feature.

Hello!

Just checking if there is any progress on this feature :slight_smile:

Kind regards,
Katja

@katja.suvajac,

The feature is now available. Please download the latest version of Aspose.BarCode and try it at your end. Visit the link Create Barcode with Image In Place of Codetext for details. Feel free to contact us in case of any query or comments.

Hello.

Thank you, but I think the link is not correct. The code there is the same as the workaround you posted a couple of posts back (on May 30th). I will add the screenshot.

Capture.PNG (104.6 KB)

Kind regards,
Katja

@katja.suvajac,

The link shared is correct one. The workaround is actually the fix that is available for this issue.

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