Spire.Barcode is a professional barcode library specially designed for .NET developers (C#, VB.NET, ASP.NET, .NET Core) and Java developers (J2SE and J2EE) to generate, read and scan 1D & 2D barcodes.

Thu Nov 21, 2013 4:25 am

Hello,

I have downloaded your demo project and tested it. It was awesome. May i know is there away to automatically save the barcode image in a folder instead of prompt open the image? How does the code writes and works?

Apprieciate you could provide me the sample code.

Thank you.

Regards,
Cath

cath
 
Posts: 6
Joined: Thu Nov 21, 2013 4:15 am

Thu Nov 21, 2013 5:42 am

Dear Cath,

Thanks for your interested in Spire.BarCode component.
Please kindly try the following code.
Code: Select all
this.barCodeControl1.SaveToFile("D:\\images\\test.png",ImageFormat.Png);


Best regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Thu Nov 21, 2013 6:51 am

Hi Amy,

Thank you so much for your fast response. Your suggested code works. I have another question. Are you able to add additional information on top of the barcodes, so that user is able to read? Kindly refer to the attachment image as below?

test.png


Once again, thank you.

Cath

cath
 
Posts: 6
Joined: Thu Nov 21, 2013 4:15 am

Thu Nov 21, 2013 9:05 am

Dear cath,

Thanks for your further inquiry.
Please kindly try the below code.
Code: Select all
  this.barCodeControl1.TopText = "SC:XXXX";
  this.barCodeControl1.ShowTopText=true;


Best regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Thu Nov 21, 2013 9:35 am

Hi there,

I have tried your suggested code. It seems like not working and it still does not display the top text. Kindly advise..

Thank you.

cath
 
Posts: 6
Joined: Thu Nov 21, 2013 4:15 am

Fri Nov 22, 2013 3:08 am

Dear Cath,

Sorry for the inconvenience. I have posted the issue to our dev team. We will inform you as soon as the issue is resolved.

Best regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Fri Nov 22, 2013 8:12 am

Dear Amy,

Thank you for escalating my question to your dev team. Hope to hear the result from you soon.

Thank you.

Regards,
Cath

cath
 
Posts: 6
Joined: Thu Nov 21, 2013 4:15 am

Wed Dec 04, 2013 1:42 am

Hi Amy,

Any updates on the top text barcode? Hope you can get back to me as soon as possible.

Thank you.

Regards,
Cath

cath
 
Posts: 6
Joined: Thu Nov 21, 2013 4:15 am

Wed Dec 04, 2013 3:01 am

Dear Cath,

Thanks for your inquiry.
I just asked our dev team, sorry that the issue has not been resolved.
We will inform you as soon as there is any update.

Best regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Fri Apr 18, 2014 3:56 am

Hello,

Sorry for the long delay.
To show the TopText, you have to remove the logo “E-ICEBLUE” first. Please refer to this to remove it:
http://www.e-iceblue.com/Misc/how-to-re ... rcode.html
You are welcome to download the newest version Spire.BarCode(hotfix) for .NET version:1.2.3 to test the following code to do your work:
Code: Select all
//Spire.Barcode.BarcodeSettings.ApplyKey("…");

BarcodeSettings barsetting = new BarcodeSettings();

barsetting.HasBorder = true;
barsetting.BorderWidth = 0.5F;

barsetting.Data = "545865815645456187773";
barsetting.Data2D = "545865815645456187773";

//generate EAN-Code 128
barsetting.Type = BarCodeType.EAN128;

barsetting.ShowTextOnBottom = true;
barsetting.TopTextColor = Color.Green;
barsetting.TopText = "SKU:XXXXXXX";
barsetting.TopTextAligment = StringAlignment.Center;
barsetting.ShowTopText = true;

BarCodeGenerator bargenerator = new BarCodeGenerator(barsetting);
Image barcodeimage = bargenerator.GenerateImage();
barcodeimage.Save("barcode.png");

System.Diagnostics.Process.Start("barcode.png");

The result "barcode.png" is in the attachment.
If you get any questions, welcome to get it back to us.

Thanks and Regards,
Benjamin
E-iceblue support team
User avatar

Benjamin Du
 
Posts: 82
Joined: Thu Jul 25, 2013 2:38 am

Return to Spire.BarCode