Printing HTML5 Canvas in the correct size

前端 未结 3 1732
迷失自我
迷失自我 2021-02-06 13:30

Is there a correct way to specify the size of a canvas element in for example millimeters so that if I print it out it will have the correct size?

I\'ve tried this simpl

3条回答
  •  青春惊慌失措
    2021-02-06 14:30

    Don't use style to declare the width and height. Declare it in pixels in the element, like this:

    Should work.

提交回复
热议问题