🏫 TECH/🖼️ Front [Solved] Failed to apply font family when saving image with html2canvas 728x90 Hello bro I faced this problem that html2canvas font-family is not working (。•́︿•̀。) In my case... [Problem] Failed to apply font family when saving image with html2canvas [Solution 1] I use the latest version of html2canvas. => There is news that the bug has been fixed. [Solution 2] I used CORS and allowTaint Option. => I annotated these and they worked !! function test(){ html2canvas(document.getElementById('printDiv'), { //allowTaint: true, //useCORS: true, //foreignObjectRendering: true, }).then(canvas => { var fileNm = Math.random(); downloadURI(canvas.toDataURL(), "myImage.png"); }); } function downloadURI(uri, name){ var link = document.createElement("a") link.download = name; link.href = uri; document.body.appendChild(link); link.click(); } I hope this experience will help you. reference : https://html2canvas.hertzen.com/ 반응형 공유하기 URL 복사카카오톡 공유페이스북 공유엑스 공유 게시글 관리 구독하기팀드모네 IT Blog 저작자표시 비영리 변경금지 '🏫 TECH > 🖼️ Front' 카테고리의 다른 글 [javascript] 웹페이지 접속 기기가 PC인지 모바일인지 판단하는 방법 (0) 2024.06.27 F12 및 개발자 도구를 막는 방법 (0) 2023.07.30 [오류 해결 방법] Component name "header" should always be multi-word (0) 2023.01.24 VSCode에서 vue를 개발할 때, 꼭 설치해야 하는 확장 프로그램 TOP4 (2) 2023.01.24 [오류 해결 방법] vue 이 시스템에서 스크립트를 실행할 수 없으므로 vue.ps1 파일을 로드할 수 없습니다 (0) 2023.01.24 Contents 당신이 좋아할만한 콘텐츠 [javascript] 웹페이지 접속 기기가 PC인지 모바일인지 판단하는 방법 2024.06.27 F12 및 개발자 도구를 막는 방법 2023.07.30 [오류 해결 방법] Component name "header" should always be multi-word 2023.01.24 VSCode에서 vue를 개발할 때, 꼭 설치해야 하는 확장 프로그램 TOP4 2023.01.24 댓글 1 + 이전 댓글 더보기