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

· 1년 전 · 420

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년 전 조회 492
1년 전 조회 309
1년 전 조회 346
1년 전 조회 380
1년 전 조회 333
1년 전 조회 285
1년 전 조회 333
1년 전 조회 279
1년 전 조회 310
1년 전 조회 298
1년 전 조회 363
1년 전 조회 356
1년 전 조회 401
1년 전 조회 311
1년 전 조회 421
1년 전 조회 381
1년 전 조회 285
1년 전 조회 376
1년 전 조회 353
1년 전 조회 429
1년 전 조회 358
1년 전 조회 414
1년 전 조회 359
1년 전 조회 372
1년 전 조회 311
1년 전 조회 282
1년 전 조회 413
1년 전 조회 381
1년 전 조회 437
1년 전 조회 357
🐛 버그신고