Printing Region on Separate Page
788948Aug 2 2010 — edited Aug 14 2010Hello, I'm new to APEX but gradually becoming more familiar with it.
Issue: I have a page made up of 4 HTML regions. In APEX, it shows up on one page. When I print the page, I'd like to get each region to appear on it's own page. So basically I'd like to have a page break after/before each region so each region prints on a separate page. So far I've tried the following unsuccessfully:
<DIV style="page-break-after:always"></DIV>
<style>.break { page-break-after: always; }</style>
I've tried putting the above code (either line didn't matter) in the User Interface - Region HTML table cell attributes and also Header and Footer - Region Footer for Region 1. Region 2 still printed out on same page as Region 1.
Also tried putting javascript in the header and calling it onLoad:
<script language="javascript">
function makeBreaks(){
for (i=0; i<document.getElementsByTagName("H2").length;i++){
document.getElementsByTagName("H1").style.pageBreakBefore="always"}
}
</script>
Region 2 still printed out on same page as Region 1.
Can someone please help? Does anyone know if it is possible to add a page break to a HTML region?
Much Thanks,
-John