+ Start a Discussion
Ashirbad PattanayakAshirbad Pattanayak 

Print option is ignoring the content in scroll view

In a lwc I have a  lightning-textarea control which is having a vertical scroll bar. And there is a Print button on click of which I am doing window.print() in the js. But if the content is more in the text box then the print window is displaying only the content which is visible while printing. I mean the content which you can see after scrolling down is not getting displayed in the print window. 

Can someone please help around this. How the print window will show all the contents which is there in the text box.
NitishNitish
Hi Ashirbad,

I dont think that is possible even i tried multiple ways to achive it. There is one work around if you want to print of content of specific component.

Create one new child component.
Style it as per your need. Display all the content as read only.
Create one @api method in child component.
 Pass all the details as a list in clild component on click of print button.
In @api method of child component assign all the values to proper variales which you have defined.

Thanks,
Nitish