My mind is exhausted after days of trying:
function prtDiv( o ) {
var css = 'body {font:normal 10px Arial;}' ;
var wo = window.open('','print','width=600,height=600,resizable=yes');
wo.document.write( '<head><meta name="viewport" content="width=device-width, initial-scale=0.5 user-scalable=1"/> <style>'+css+'</style><body>'+ o.innerHTML+'</body>');
wo.focus();
}
I attempted changing the body style and using an URL to replace a token with the div-content in various browsers like chrome, opera, firefox, edge...
However, all variations resulted in the same font display, without user-scalability, only accepting font-name with font-size missing.
Your assistance would be greatly appreciated. Thank you.
At this point, I suspect it's because the content is loaded via XHR (Ajax).
It seems impossible to format HTML content written to a new window when the content was loaded via XHR.
I resorted to creating a PDF instead :((