Print pdf using ctrl + p , page-breaks aren't working

The structure is like there is an main screen , and web blocks are placed inside that screen which is imported from different module

Trying to achieve the feature for the print pdf via chrome , tried adding the styles via style section for the container and also via creating a class and adding it to the container . Out systems is converting that style into some other style internally .

Also tried using the JavaScript on initialize of the component with the following code .

document.getElementsByClassName("page-break-div").style.pageBreakAfter = "always";

This is also not working and throwing error "Cant set properties of undefined (setting page break after)".


Please help me here to achieve page breaks in print pdf feature via ctrl + P. 

Thanks




Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.