neodynamic / JSPrintManager

Advanced Client-side Printing & Scanning Solution for Javascript
https://www.neodynamic.com/products/printing/js-print-manager/
248 stars 137 forks source link

I wan to print the logo to right #27

Closed nkaurelien closed 3 years ago

nkaurelien commented 3 years ago

That is what i do but only the text go to right, not the image

`

     JsBarcode(canvas)
          .options({font: "OCR-B"}) // Will affect all barcodes
          .CODE128(this.product.reference, {
              fontSize: 18,
              height: 85,
              marginRight: 0,
          })
          .render();

       this.code128Url = canvas.toDataURL();
       let logo = await escpos.ESCPOSImage.load(this.code128Url);

        var escposCommands = doc
            .align(escpos.TextAlignment.RightJustification)
            .image(logo, escpos.BitmapDensity.D24)
            .feed(1)
            .cut()
            .generateUInt8Array();

        // Set the ESC/POS commands
        cpj.binaryPrinterCommands = escposCommands;

        cpj.sendToClient();

`

neodynamic commented 3 years ago

Sorry but this issue is not related to JSPrintManager so please submit this to the right place