Controlling the Barcode Width

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v6)  /  Controlling the Barcode Width

DynamicPDF CoreSuite for .NET (v6) Forum

 Oct 07 2013 4:38 PM
                        
HI All,
      I am trying to create Barcode in Code128 format using the below Code . But every time when i pass different set of strings(Changing length of Input strings), my barcode width changes,

barCodePageElement = new Code128("1|1.0.0", tmpX, 0, height, 0.2f, false);

Can anyone help me out to fix the width of the generated barcode without depending on the length of the Input text passed to create the barcode .

Thanks
Suren

                       
 Oct 08 2013 12:09 PM
Posted by a ceTe Software moderator
Hello Suren,

Yes, you can control the width of the Code128 barcode using the XDimension property of the Code128 class. You can also get the respective barcode width using GetSymbolWidth method. You can dynamically check for the width and accordinlgy reduce or increase the value for XDimenion so that it meets your requirement. You can refer the documentation on members of the Code128 class here.

If you face any problems while using our DynamicPDF product APIs then you can contact our support team by sending the compleate information so that they can help you further.

Thanks,
ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 9:59 AM.