Forum Discussion
Printing off center using the window.print(); java script
Hi- did we get any feed back on this? I was using the following Java script within my slide when click the button it triggers the javacscript. I have imported the flash file print.swf- worked abosultely fine in storyline 2, but in storyline 360 I am getting half the page missing when publishing to HTML5. Anyone with any ideas?
if (document.location.href.indexOf('html5') < 0) {
GetPlayer().printSlide()
} else {
if(!window.hasPrintStyle){
window.hasPrintStyle = true;
var css = "@media print {div.controls.grid-row.inflexible,div.area-secondary.cs-left.inflexible,header.header-primary.centered-title.extended-height,div.presentation-wrapper:after {display:none !important; visibility:hidden !important;}}";
head = document.head || document.getElementsByTagName('head')[0];
style = document.createElement('style');
style.type = 'text/css';
if (style.styleSheet){
style.styleSheet.cssText = css;
} else {
style.appendChild(document.createTextNode(css));
}
head.appendChild(style);
}
window.print();
file.print();
}