javascript - How to change width of a barcode in html -


I need to customize the width of the barcode. I have tried to use it, I jquery-barcode I am using the js plugin. ()

  $ ("# barcodeView") barcode ("123456789023F", // value barcode (depending on barcode type) "code128", // type (string) {barwidth: 1 , Twelvehit: 50});  

But it was customizing the width and height of the single bar. I need to adjust the width and height of a full barcode. It is my html

  & lt; Div class = "col-xs-12 col-md-6" & gt; & Lt; Div id = "barcode view" & gt; & Lt; / Div & gt; & Lt; / Div & gt;  

I was just going to the plugin that you are using. The bar code is composed of many divs represent the individual bar and therefore the entire container i.e. With the code "barcodeTarget" can not be just shaped according to your needs. You can explicitly set it to width , but it will not be able to resize the entire barcode like you.

Although the barwidth and barhit attributes are the width and height of all times only divs (representing the individual bar) Pixels). That's why you can set those attributes to anything and accordingly resize the entire barcode. You can clearly limit the width of the container as I have mentioned but it will not affect the width of the bar in bar code. I hope this will start you in the right direction.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -