"The Javascript stops working when printed to physical paper."
You need to upgrade your paper that supports a minimum FR of 60hz.
come on, it's 2025, we need 240hz (to play Tetris with 30FPS).