Trying to print on thermal printer using print.js

Viewed 24

Trying to print a pdf receipt, but it adds empty spaces on top and bottom.

const responseBlob = new Blob([pdfBlob], {
    type: 'application/pdf'
  });
  const fileURL = URL.createObjectURL(responseBlob);
  setPreview(false);
  // printJS(fileURL);
  printJS({
    type: 'pdf',
    printable: fileURL,
    honorMarginPadding: true,
    style: '@page { size: 80mm 50mm }'

  });

But I am getting print like this.

enter image description here

PDF file

enter image description here

0 Answers
Related