How Did Not Zoom Content On Printing When Browser Zoom?
how did not zoom content on printing when browser zoom? on zoom browser printing(use iframe) should not changed i try: document.body.style.transformOrigin = 'top left'; document.bo
Solution 1:
This could help to disable zooming overall.
<metacontent='width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;'name='viewport'>
Solution 2:
I use next code:
constupdateSizePrintPage = () => {
let scale = 1 / window.devicePixelRatio;
document.getElementById('print-page').style.transform = 'scale(' + scale + ')';
document.getElementById('print-page').style.transformOrigin = 'top left';
};
window.addEventListener('resize', updateSizePrintPage )
and it works for me.
Post a Comment for "How Did Not Zoom Content On Printing When Browser Zoom?"