feat: barcodes printing

This commit is contained in:
2025-10-10 20:47:44 +04:00
parent 8af4fcce2f
commit 73e3fd4ba2
14 changed files with 313 additions and 13 deletions

11
src/utils/base64ToBlob.ts Normal file
View File

@ -0,0 +1,11 @@
function base64ToBlob(base64: string, type: string) {
const binaryString = window.atob(base64);
const len = binaryString.length;
const bytes = new Uint8Array(len);
for (let i = 0; i < len; ++i) {
bytes[i] = binaryString.charCodeAt(i);
}
return new Blob([bytes], { type });
}
export default base64ToBlob;