What is the best practice for creating specific page breaks in SAPUI5 and is it actually possible?
Classical CSS atributes page-break-after
and page-break-before
doesn't seem to work in my case. For example, I have two sap.m.VBox
elements and I attached them a CSS class which specifies page-break-after: always !important;
when printing, but nothing happens. If I add
* {overflow-x: visible !important; overflow-y: visible !important;}
then it will break and continue to draw the content in next page if it doesn't fit in one page, but it doesn't work in IE.
I have tryed also adding an empty div
element that would work as a page break indicator, but still CSS wouldn't do anything. I guess that's because everything in SAPUI5 is put into one content div.
The "page-break-after" is ignored because the property display of SAPUI5 views is set to inline-block.
Simply override the CSS style for the corresponding class with a custom CSS and it should work:
.sapUiView { display: block; }
You can solve this by adding an empty element in between.
If you want a break that is 200 pixels high, your page content can look like this:
ofcourse you might want to set your panel background-color to transparent ;)