Forum Discussion
Print Slide Gets Cut Off
Hello everyone,
At the end of my module, I would like learners to print a certificate proving that they have successfully completed the course.
I am having trouble with the print functionality. The certificate gets cut off on the right only.
Here is how the certificate looks like: https://360.articulate.com/review/content/d989e524-1dc7-4d83-a396-10881302489f/review
This is the JavaScript that I used:
var styles = `@media print {
body, * { visibility: hidden; }
html, body { overflow: hidden; transform: translateZ(0); }
#slide {
transform: scale(1) !important;
}
#wrapper {
transform: scale(1) !important;
}
#slide,
#wrapper {
width: 100% !important;
height: 100% !important;
overflow: visible !important;
}
#frame {
overflow: visible !important;
}
.slide-transition-container {
overflow: visible !important;
}
@page {size: A4 landscape;max-height:99%; max-width:85%}
.slide-container, .slide-container * {
visibility: visible !important;
margin-top: 0px !important;
margin-left: 0px !important;
margin-right: 0px !important;
margin-bottom: 0px !important;
}
#outline-panel {
display: none !important;
}
}
}`
var stylesheet = document.createElement('style');
stylesheet.type = 'text/css';
stylesheet.innerText = styles;
document.head.appendChild(stylesheet);
window.print();
I am not an expert in JavaScript. I copied and pasted this code from another forum post. Does anyone have any suggestions?
Thanks,
Olivia
- SabrinaPorterCommunity Member
I'm also experiencing the same issue, where the right side of the page is cut off no matter how the user adjusts the print settings. Would be really great to have a solution or workaround soon!
- GavinInnes-bc70Community Member
I experienced this today. My solution was, delete the JavaScript about printing the slide, and instead use the built in Storyline trigger for printing a slide.