2

I'm trying to print a receipt using PrintJS, however, I can't seem to be able to print a receipt that ends after the data end, instead, it acts as A4 paper.

      printJS({
        printable: "printable",
        type: "html",
        targetStyles: "*",
        style: `@page { margin: 0mm; size: 80m 80m; } @media print { body { margin: 0mm; width: 80mm; height: 80mm } }`,
      });

This is what the element looks like.

enter image description here

This is what the paper is printed like(which is essentially an A4 paper).

enter image description here

This is the height of the paper regardless of size/height I set by the way, the width adapts okay but the height just simply refuses to change.

1 Answer 1

0

new paper

you need add new paper, in Control Panel.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.