Boleto Bancaria - Convert digitable line to barcode?

0
  

Is it possible to convert the editable line of a bank slip into a barcode?

I looked into this subject and found nothing to help me with this question.

Example

I have the following line:

23793.13022 50831.414599 05006.305204 8 70010000002000

This line above displays the following bar code:

Nowimaginethefollowing:

Ihavethefollowingcode:

<h2id="numbers">23793.13022 50831.414599 05006.305204 8 70010000002000</h2>
  

Is there any way to get the numbers contained within this <h2> and generate a barcode? I realize that the most used is the generation of images in formats " data:image/png;base64 ", like the one of the image above that I inserted, that is equal to:

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZUAAAAyAQAAAAC8Tnt0AAAAU0lEQVR42u3LsQ3AIAwEQEYIhZUmHseipnKTDPESiAkRtSXKDJM9or/+kqs1iG7EM4vW5blf/TXdnlHaMInZgB6zrhte5MSReHh4eHh4eHh4fn8+fNcEXfLEaAgAAAAASUVORK5CYII=">

That is, to better define the question: take the numbers inside the <h2> and generate a bar code in the <img src="" > image format.

Is it possible to do this in PHP ? How?

    
asked by anonymous 03.12.2016 / 20:11

1 answer

-2

Yes, link

Enough

<div id="boleto"></div>
    <script>
      var number = '34195.00008 01233.203189 64221.470004 5 84410000002000';
      new Boleto(number).toSVG('#boleto');
    </script>'
    
14.06.2017 / 16:23