Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images don't render #71

Closed
MarlonnLima opened this issue Jan 8, 2025 · 1 comment
Closed

Images don't render #71

MarlonnLima opened this issue Jan 8, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@MarlonnLima
Copy link

Description
this bug occurs on the version 3.3.0+, basicly when the preview from virtual ZPL Printer, tries to render an images it fails and this image is not showed

Steps to reproduce the behavior:

  1. Send the following zpl to Virtual ZPL Printer
    ^XA
    ^FO50,50^GFA,32768,32768,64,kJ01IFE,kI0MF8,kG01OFC,k01QF8,k0SF,jY07SFE,jX01UF8,jX0VFE,jW03WF8,jW0XFE,jV03YF,jV0gFC,jU03gGF,jU07gGF8,jT01gHFC,jT03gHFE,jT0gJF8,jS01PFCI01OFC,jS07OF8L0NFE,jS0OF8N0NF,jR01NF8O01MF8,jR07MFCQ07LFC,jR0NFR01LFE,jQ01MFCS07LF,jQ03MFT01LF8,jQ07LFCU07KF8,jQ0MFV03KFC,jP03LFCV01KFE,jP07LF8W07JFE,jP0LFEX03KF,jO01LF8X01KF8,jO03LFg0KF8,jO07KFEg07JFC,jO0LF8g03JFE,jO0LFgG01JFE,jN01KFEgH0KF,jN03KFCgH0KF,jN07KFgI07JF8,jN0KFEgI03JF8,jM01KFCgI01JFC,jM03KF8gI01JFC,jM03KFgK0JFC,jM07JFEgK0JFE,jM0KFCgK07IFE,jL01KF8gK07JF,jL01KFgL03JF,jL03JFEgL03JF,jL07JFCgL01JF8,jL0KFCgL01JF8,jL0KF8gL01JF8,jK01KFgN0JF8,jK03JFEgN0JFC,jK03JFCgN0JFC,jK07JFCgN07IFC,jK0KF8gN07IFC,jK0KFgO07IFC,jJ01JFEgO03IFE,:jJ03JFCgO03IFE,jJ07JF8gO03IFE,:jJ0KFgP03IFE,jJ0JFEgP03IFE,jI01JFEgP03IFE,jI01JFCgP03IFE,jI03JF8gP01JF,:jI07JFgQ01JF,jI0KFgQ01JF,jI0JFEgQ01JF,jI0JFCgQ01JF,jH01JFCgQ01JF,jH01JF8gQ01JF,jH03JF8gQ03IFE,jH03JFgR03IFE,jH07JFgR03IFE,jH07IFEgR03IFE,jH0JFEgR03IFE,jH0JFCgR03IFE,jG01JFCgR03IFE,jG01JF8gR03IFE,:jG03JFgS07IFE,jG03JFgS07IFC,jG07IFEgS07IFC,::jG0JFCgS0JFC,jG0JFCgS0JF8,j01JF8W07IFR0JF8,j01JF8P03PFEQ0JF8,j01JF8I01XF8O01JF8,j03gMFCO01JF8,iV03gQFEO01JF,iP0gYFO03JF,iJ0hKF8N03JF,iI0hLFCN03IFE,iH03hLFCN07IFE,iH07hLFCN07IFE,iH0hMFEN07IFE,iG01hMFEN0JFC,iG03hMFEN0JFC,iG07hMFEN0JFC,iG0hNFEM01JF8,i01hFEJ07FFEM01JF8,i03gTF8P07FFEM03JF,i07gMFCW07FFEM03JF,i0gIFEgH0IFEM07JF,hY01UF8I07IFEgH0IFEM07IFE,hY03MF06P07IFEgH0IFEM0JFE,hY07JF8T0JFEgH0IFEM0JFE,hY0KFU0JFCgH0IFEL01JFC,hX01JFEU0JFCgH0IFEL01JFC,hX03JFCU0JFCgH0IFEL03JF8,hX07JF8T01JF8gH0IFEL03JF8,hX0KFU01JF8gH0IFEL07JF,hW01JFEU01JF8gH0IFEL07JF,hW03JFCU01JF8gH0IFEL0JFE,hW07JF8U03JFgI0IFEL0JFE,hW0KFV03JFgI0IFEK01JFC,hV01JFEV03JFgI0IFEK01JFC,hV03JFCV03JFgI0IFEK03JF8,hV07JF8V03IFEgI0IFEK07JF8,hV0KFW07IFEgI0IFEK07JF,hU01JFEW07IFEgI0IFEK0KF,hU03JFCW07IFEgI0IFEJ01JFE,hU07JF8W07IFEgI0IFEJ01JFE,hU0KFX0JFCgI0IFEJ03JFC,hT01JFEX0JFCgI0IFEJ03JF8,hT03JFCX0JFCgI0IFEJ07JF8,hT07JF8X0JFCgI0IFEJ0KF,hT0KFY0JFCgI0IFEJ0KF,hS01JFEY0JF8gI0IFEI01JFE,hS03JFCX01JF8gI0IFEI03JFC,hS07JF8X01JF8gH01IFEI03JFC,hS0KFY01JF8gH01IFEI07JF8,hR01JFEY01JF8gH01IFEI0KF8,hR03JFCY01JFgI01IFE001KF,hR07JF8Y01JFgI01IFE001JFE,hR0KFg03JFgI01IFE003JFE,hQ01JFEg03JFgI01IFE007JFC,hQ03JFCg03JFgI01IFE00KF8,hQ07JF8g03JFgI01IFE01KF,hQ0KFgG03JFgI01IFE01KF,hP01JFEgG03IFEgI01IFE03JFE,hP03JFCgG03IFEgI01IFE07JFC,hP07JF8gG07IFEgI01IFE0KFC,hP0KFgH07IFE0EgG01IFE1KF8,hO01JFEgH07NFY01IFE3KF,hO03JFCgH07NFEX01IFE3JFE,hO07JF8gH07OFCW01IFE7JFE,hO0KFgI07PF8V01IFCKFC,hN01JFEgI07PFEV01IFDKF8,hN03JFCgI0RF8U01OF,hN07JF8gI0RFEU01NFE,hN0KFgJ0SFU01NFE,hM01JFEgI03SF8T01NFC,hM03JFCgI07SFET01NF8,hM07JF8gI0UFT01NF,hM0KFgI01UF8S01MFE,hL01JFEgI03UFCS03MFE,hL03JFCgI07UFES03MFC,hL07JF8gI0WFS03MF8,hL0KFgI01LFEI07LF8R03MF,hK01JFEgI03KFEK07KFCR03LFE,hK03JFCgI07KF8K01KFER03LFC,hK07JF8gI07JFEM07JFER03LF8,hK0KFgJ0KF8M01KFR03LF,hJ01JFEgI01KFO0KF8Q03KFE,hJ03JFCgI03JFCO03JFCQ03KFC,hJ07JF8gI03JF8O01JFCQ03KFC,hJ0KFgJ07JFQ0JFEQ03KF8,hI01JFEgJ07IFEQ07IFEQ03KF,hI03JFCgJ0JFCQ03JFQ03JFE,hI07JF8gJ0JF8Q01JFQ03JFC,hI0KFgJ01JFS0JF8P03JF8,hH01JFEgJ01JFS0JF8P03JF,hH03JFCgJ03IFES07IFCP03IFE,hH07JF8gJ03IFCS07IFCP03IFC,hH0KFgK03IFCS03IFCP03IF8,hG01JFEgK07IF8S01IFEP03IF8,hG03JFCgK07IF8S01IFEP03IF8,hG07JF8gK07IFU0IFEP03IF8,hG0KFgL0JFU0IFEP03IF8,h01JFEgL0JFU0JFP03IF8,h03JFCgL0JFU0JFP03IF8,h07JF8gL0IFEU07IFP07IF8,h0KFgM0IFEU07IFP07IF8,gY01JFEgM0IFEU07IFP07IF8,gY03JFCgL01IFEU07IFP07IF8,gY07JF8gL01IFEU07IF8O07IF8,gY0KFgM01IFCU03IF8O07IF8,gX01JFEgM01IFCU03IF8O07IF8,gX03JFCgM01IFCU03IF8O07IF8,gX07JF8gM01IFCU03IF8O07IF8,gX0KFgN01IFCU03IF8O07IF8,gW01JFEgN01IFCU03IF8O07IF8,gW03JFCgN01IFCU03IF8O07IF8,gW07JF8gN01IFEU07IF8O07IF,gW0KFgP0IFEU07IFP07IF,gV01JFEgP0IFEU07IFP07IF,gV03JFCgP0IFEU07IFP07IF,gV07JF8gP0IFEU07IFP07IF,gV0KFgQ0JFU0JFP07IF,gU01JFEgQ0JFU0JFP07IF,gU03JFCgQ07IFU0IFEP07IF,gU07JF8gQ07IF8S01IFEP07IF,gU0KFgR07IF8S01IFEP07IF,gT01JFEgR07IFCS03IFEP07IF,gT03JFCgR03IFCS03IFCP07IF,gT07JF8gR03IFES07IFCP07IF,gT0KFgS03IFES07IFCP07IF,gS01JFEgS01JFS0JF8P0JF,gS03JFCgS01JF8Q01JF8P0JF,gS07JF8gT0JF8Q01JFQ0JF,gS0KFgU0JFCQ03JFQ0JF,gR01JFEgU07IFEQ07IFEQ0JF,gR03JFCgU07JFQ0JFEQ0JF,gR07JF8gU03JF8O01JFCQ0IFE,gR0KFgV03JFEO07JFCQ0IFE,gQ01JFEgV01KFO0KF8Q0IFE,gQ03JFCgW0KF8M01KFR0IFE,gQ07JF8gW07JFEM07JFER0IFE,gQ0KFgX07KF8K01KFCR0IFE,gP01JFEgX03LFK0LFCR0IFE,gP03JFCgX01LFEI07LF8R0IFE,gP07JF8gY0WFS0IFE,gP0KFh07UFES0IFE,gO01JFEh03UFCS0IFE,gO03JFCh01UF8S0IFE,gO07JF8hG0UFT0IFE,gO0KFhH03SFCT0IFE,gN01JFEhH01SF8T0IFE,gN03JFChI0SFU0IFE,gN07JF8hI03QFCU0IFE,gN0KFhK0QFV0IFE,gM01JFEhK03OFCV0IFE,gM03JFChL0OFW0IFE,gM07JF8hL03MFCW0IFE,gM0KFhN03KFCW01IFC,gL01JFEhO07IFEX01IFC,gL03JFCiR01IFC,gL07JF8iR01IFC,gL0KFiS01IFC,gK01JFEiS01IFC,gK03JFCiS01IFC,gK07JF8iS01IFC,gK0KFiT01IFC,gJ01JFEiT01IFC,gJ03JFCiT01IFC,gJ07JF8iT01IFC,gJ0KFiU01IFC,gI01JFEiU01IFC,gI03JFCiU01IFC,gI07JF8iU01IFC,gI0KFiV01IFC,gH01JFEiV01IFC,gH03JFCiV01IFC,gH07JF8iV01IFC,gH0KFiW01IFC,gG01JFEiW01IFC,gG03JFCiW01IF8,gG07JF8iW01IF8,gG0KFiX01IF8,g01JFEiX01IF8,g03JFCiX01IF8,g07JF8iX01IF8,g0KFiY01IF8,Y01JFEiY03IF8,Y03JFCiY03IF8,Y07JF8iY03IF8,Y0KFj07IF8,X01JFEj0JF8,X03JFCiY01JF8,X07JF8iY03JF,X0KFj07JF,W01JFEj0KF,W03JFCiY01JFE,W07JF8iY03JFE,W0KFj07JFC,V01JFEj0KF8,V03JFCiY01KF,V07JF8iY03JFE,V0KFj07JFC,U01JFEj0KF8,U03JFCiY01KF,U07JF8iY03JFE,U0KFj07JFC,T01JFEj0KF8,T03JFCiY01KF,T07JF8iY03JFE,T0KFj07JFC,S01JFEj0KF8,S03JFCiY01KF,S07JF8iY03JFE,S0KFj07JFC,R01JFEj0KF8,R03JFCiY01KF,R07JF8iY03JFE,R0KFj07JFC,Q01JFEj0KF8,Q03JFCiY01KF,Q07JF8iY03JFE,Q0KFj07JFC,P01JFEj0KF8,P03JFCiY01KF,P07JF8iY03JFE,P0KFj07JFC,O01JFEj0KF8,O03JFCiY01KF,O07JF8iY03JFE,O0KFj07JFC,N01JFEj0KF8,N03JFCiY01KF,N07JF8iY03JFE,N0KFj07JFC,M01JFEj0KF8,M03JFCiY01KF,M07JF8iY03JFE,M0KFj07JFC,L01JFEj0KF8,L03JFCiY01KF,L03JF8iY03JFE,L07JFj07JFC,L0JFEj0KF8,K01JFCiY01KF,K01JF8iY03JFE,K03JFj07JFC,K03IFEj0KF8,K07IFEiY01KF,K07IFCiY03JFE,K0JF8iY07JFC,K0JFj0KF8,J01JFiY01KF,J01IFEiY03JFE,J01IFEiY07JFC,J01IFCiY0KF8,J03IFCiX01KF,J03IF8iX03JFE,J03IF8iX07JFC,J07IF8iX0KF8,J07IFiX01KF,J07IFiX03JFE,J07IFiX07JFC,J07FFEiX0KF8,J07FFEiW01KF,J07FFEiW03JFE,J07FFEiW07JFC,J07FFEiW0KF8,J0IFEiV01KF,J0IFEiV03JFE,J0IFEiV07JFC,J07FFEiV0KF8,J07FFEiU01KF,J07IFiU03JFE,J07IFiU07JFC,J07IFiU0KF8,J07IFiT01KF,J07IFiT03JFE,J07IF8iS07JFC,J03IF8iS0KF8,J03IF8iR01KF,J03IFCiR03JFE,J03IFCiR07JFC,J01IFEiR0KF8,J01IFEiQ01KF,J01JFiQ03JFE,K0JFiQ07JFC,K0JF8iP0KF8,K07IFCiO01KF,K07IFEiO03JFE,K03IFEiO07JFC,K03JFiO0KF8,K01JF8iM01KF,K01JFCiM03JFE,L0JFEiM07JFC,L0KFiM0KF8,L07JF8iK01KF,L03JFCiK03JFE,L01JFEiK07JFC,M0KFiK0KF8,M07JF8iI01KF,M07JFCiI03JFE,M03JFEiI07JFC,M01KFiI0KF8,N0KF8iG01KF,N07JFCiG03JFE,N03JFEiG07JFC,N01KFiG0KF8,O0KF8hY01KF,O07JFChY03JFE,O03JFEhY07JFC,O01KFhY0KF8,P0KF8hW01KF,P07JFChW03JFE,P03JFEhW07JFC,P01KFhW0KF8,Q0KF8hU01KF,Q07JFChU03JFE,Q03JFEhU07JFC,Q01KFhU0KF8,R0KF8hS01KF,R07JFChS03JFE,R03JFEhS07JFC,R01KFhS0KF8,S0KF8hQ01KF,S07JFChQ03JFE,S03JFEhQ07JFC,S01KFhQ0KF8,T0KF8hO01KF,T07JFChO03JFE,T03JFEhO07JFC,T01KFhO0KF8,U0KF8hM01KF,U07JFChM03JFE,U03JFEhM07JFC,U01KFhM0KF8,V0KF8hK01KF,V07JFChK03JFE,V03JFEhK07JFC,V01KFhK0KF8,W0KF8hI01KF,W07JFChI03JFE,W03JFEhI07JFC,W01KFhI0KF8,X0KF8hG01KF,X07JFChG03JFE,X03JFEhG07JFC,X01KFhG0KF8,Y0KF8gY01KF,Y07JFCgY03JFE,Y03JFEgY07JFC,Y01KFgY0KF8,g0KF8gW01KF,g07JFCgW03JFE,g03JFEgW07JFC,g01KFgW0KF8,gG0KF8gU01KF,gG07JFCgU03JFE,gG03JFEgU07JFC,gG01KFgU0KF8,gH0KF8gS01KF,gH07JFCgS03JFE,gH03JFEgS07JFC,gH01KFgS0KF8,gI0KF8gQ01KF,gI07JFCgQ03JFE,gI03JFEgQ07JFC,gI01KFgQ0KF8,gJ0KF8gO01KF,gJ07JFCgO03JFE,gJ03JFEgO07JFC,gJ01KFgO0KF8,gK0KF8gM01KF,gK07JFCgM03JFE,gK03JFEgM07JFC,gK01KFgM0KF8,gL0KF8gK01KF,gL07JFCgK03JFE,gL03JFEgK07JFC,gL01KFgK0KF8,gM0KF8gI01KF,gM07JFCgI03JFE,gM03JFEgI07JFC,gM01KFgI0KF8,gN0KF8gG01KF,gN07JFCgG03JFE,gN03JFEgG07JFC,gN01KFgG0KF8,gO0KF8Y01KF,gO07JFCY03JFE,gO03JFEY07JFC,gO01KFY0KF8,gP0KF8W01KF,gP07JFCW03JFE,gP03JFEW07JFC,gP01KFW0KF8,gQ0KF8U01KF,gQ07JFCU03JFE,gQ03JFEU07JFC,gQ01KFU0KF8,gR0KF8S01KF,gR07JFCS03JFE,gR03JFES07JFC,gR01KFS0KF8,gS0KF8Q01KF,gS07JFCQ03JFE,gS03JFEQ07JFC,gS01KFQ0KF8,gT0KFCO01KF,gT07JFEO03JFE,gT03KFO0KFC,gT01KFCM01KF8,gU0KFEM07KF,gU07KF8K01KFE,gU03LFK0LFC,gU01MFI07LF8,gV0WF,gV07UFE,gV01UFC,gW0UF8,gW07SFE,gW03SFC,gW01SF8,gX07RF,gX01QFC,gY07PF,gY01OFC,h0OF,hG0MF8,hG01KF8,hI07FE,^FS

^FX Fourth section (the two boxes on the bottom).
^FO50,900^GB700,250,3^FS
^FO400,900^GB3,250,3^FS
^CF0,40
^FO100,960^FDCtr. X34B-1^FS
^FO100,1010^FDREF1 F00B47^FS
^FO100,1060^FDREF2 BL4H8^FS
^CF0,190
^FO470,955^FDCA^FS

^XZ

The result must be:
image

But when you put the same ZPL code on https://labelary.com/viewer.html it can renders.

Expected behavior
I hope this bug report can improve the application.

Desktop (please complete the following information):

  • OS: Win11
  • Browser: Edge, Chrome
@MarlonnLima MarlonnLima added the bug Something isn't working label Jan 8, 2025
@MarlonnLima
Copy link
Author

I found a solution, it's occurs because i'm using the print api from javascript to send it, with this code block:

<script type="text/javascript"> function printZpl(zpl) { var printWindow = window.open(); printWindow.document.open('text/html') printWindow.document.write(zpl); printWindow.document.close(); printWindow.focus(); printWindow.print(); printWindow.close(); } </script>

The cause of this error is the size of page printed, if zpl code pass the limit of the page the data will be truncated.

Solucion:
Change zpl on method printZpl to <pre style="font-size: 0.1px; max-width: 100%">${zpl}</pre> this code works very fine, and if necessary it's possible to use the lowest scale of print api (10%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants