Printing margins off

i am developing an app thatll alow the user to print the page on their screen, but whenever i try to print the elements are all cut off and out of the frame, but ive fixed all the elements to scale correctly when i shrink the window screen and increase its size, so im wondering how would i approach this problem?

example: