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.

Tue Sep 08, 2015 3:48 pm

Hi there,
How do I change the output image size and also the toptext font size / family?

Thanks

brownd92
 
Posts: 2
Joined: Sun Sep 06, 2015 5:59 pm

Wed Sep 09, 2015 2:40 am

Hello,

Thanks for your inquiry.
1) You can change the output image size by the below methods.
Code: Select all
BarCodeSetting.BarHeight = 88f;
BarCodeSetting.X = 1.5f;

2) You can change toptext font size / family with below method.
Code: Select all
Setting.TopTextFont = new Font("Arial", 30);


Best Regards,
Sweety
E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Wed Sep 09, 2015 11:21 am

Thanks for the reply.
I have a very specific size I need to output. What does the "f" mean in 8f?

Thanks

brownd92
 
Posts: 2
Joined: Sun Sep 06, 2015 5:59 pm

Thu Sep 10, 2015 6:22 am

Hello,

Thanks for your reply.
The "f" means float. The "88f" means the height of the barcode. Affected by Spire.Barcode.BarcodeSettings.Unit. For example, you can set the unit to pixel.
Code: Select all
Setting.Unit = GraphicsUnit.Pixel;
Setting.BarHeight = 88f;

Now the "88f" means the height of the barcode is 88 Pixel.

Best Regards,
Sweety
E-iceblue support team
User avatar

sweety1
 
Posts: 539
Joined: Wed Mar 11, 2015 1:14 am

Return to Spire.BarCode