VueJS barcode39를 pdf로 변환해서 프린트 하려고 합니다.
추천0 비추천 0
페이지 정보
작성자 flexcheck 작성일 2024-02-01 10:51 조회 50회 댓글 0건제품 버전 : 5.20222.877
본문
관련링크
FlesGrid에서 정보를 가져와 barcode39를 생성해서 pdf안에 넣어 프린트하려 합니다.
그런데 예제에는 div에 들어가게 되어있어 pdf에 넣을 방법을 모르겠습니다.
barcode39를 pdf에 이미지로 들어가 인식이 되도록 하고 싶습니다.
const doc = new wjPdf.PdfDocument({ header: { height: 0, }, footer: { height: 0, }, pageSettings: { layout: wjPdf.PdfPageOrientation.Portrait, size: wjPdf.PdfPageSize.A4, // 595px*842px margins: { left: 20, right: 20, top: 20, bottom: 20, }, }, ended: function (sender, args) { let pdfFrameElement = document.getElementById("pdf-frame"); const objUrl = URL.createObjectURL(args.blob); if (!pdfFrameElement) { pdfFrameElement = document.createElement("iframe"); pdfFrameElement.id = "pdf-frame"; pdfFrameElement.style.display = "none"; document.body.appendChild(pdfFrameElement); } pdfFrameElement.src = ""; pdfFrameElement.src = objUrl; pdfFrameElement.onload = function () { pdfFrameElement.contentWindow.focus(); pdfFrameElement.contentWindow.print(); URL.revokeObjectURL(objUrl); pdfFrameElement.onload = null; }; }, });
댓글목록
등록된 댓글이 없습니다.