3

I'm making a web page designed to be printed out so the user can cut out a template of a specific physical size, essentially a 9 inch x 3.25 inch rectangle. I'm using HTML5 canvas to draw my design. I specified the size of the canvas element as 9in by 3.25in in my CSS, but the print preview seems to vary depending on the page orientation.

How can I ensure that, when printed on any printer, in any orientation, the rectangle is exactly 9 x 3.25 inches on paper?

CSS:

canvas#c1 {
    width:9in;
    height:3.25in;
  }

HTML:

<canvas id="c1" width="900" height="325" ></canvas>

0

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

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

Browse other questions tagged or ask your own question.