BWIP-JS: 순수 자바스크립트로 만든 바코드 작성기

· 1년 전 · 479

100개 이상의 다양한 바코드 유형과 표준(단일 및 2차원 모두)을 사용하여 바코드를 생성할 수 있는 라이브러리입니다.

 

https://github.com/metafloor/bwip-js

 

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>Hello World!</title>
  </head>
  <body>
    Node.js <script>document.write(process.versions.node)</script>,
    Chromium <script>document.write(process.versions.chrome)</script>,
    Electron <script>document.write(process.versions.electron)</script>,
    bwip-js <script>document.write(bwipjs.BWIPJS_VERSION)</script>,
    and BWIPP <script>document.write(bwipjs.BWIPP_VERSION)</script>.
    <br><br><img id="myimg">
    <pre id="output"></pre>
  </body>

  <script>
    var bwipjs = require('@bwip-js/node');
    bwipjs.toBuffer({ bcid:'qrcode', text:'0123456789' }, function (err, png) {
        if (err) {
          document.getElementById('output').textContent = err;
        } else {
          document.getElementById('myimg').src = 'data:image/png;base64,' +
                                                 png.toString('base64');
        }
      });
  </script>
</html>

 

웹학교 무료강좌 / 웹학교 컨텐츠몰

PHP포탈 / 구인구직 솔루션

By 웹학교

|
댓글을 작성하시려면 로그인이 필요합니다.

365ok IT뉴스

+
제목 글쓴이 날짜 조회
1년 전 조회 569
1년 전 조회 383
1년 전 조회 413
1년 전 조회 437
1년 전 조회 392
1년 전 조회 342
1년 전 조회 407
1년 전 조회 349
1년 전 조회 360
1년 전 조회 344
1년 전 조회 427
1년 전 조회 417
1년 전 조회 462
1년 전 조회 357
1년 전 조회 480
1년 전 조회 435
1년 전 조회 346
1년 전 조회 424
1년 전 조회 409
1년 전 조회 480
1년 전 조회 405
1년 전 조회 466
1년 전 조회 413
1년 전 조회 427
1년 전 조회 361
1년 전 조회 343
1년 전 조회 469
1년 전 조회 464
1년 전 조회 511
1년 전 조회 416