css to avoid table content shifting to next page on printing to pdf (HTML2PDFConvert)

Hi , 

I am using HTML2PDFConverter component to export my grids to pdf, in one of the case i have 3 grids to be exported in on pdf, but my first 2 grids are having not much records and 3rd grid s having enough records that is cannot be accommodated in the same page with rest of the 2 grids .

How can i avoid my 3rd table content through CSS, shifting to next page on printing to pdf, so that its starts from same page and breaks when 1st page ends.

Screenshot attached.

Hi Nitesh,

Questions about a specific component can best be asked in that component's subforum.

Kilian Hekhuis wrote:

Hi Nitesh,

Questions about a specific component can best be asked in that component's subforum.

Hi Kilian ,

I think i have an generic issue , as how can i format my html in such a way so that it content doesn't start from next page , leaving white spaces on previous page. I want a solution for it through css in outsystems.


Hi Nitesh,

Check the component's FAQ. Most specifically, "Q) How can I keep my content from splitting from one page to the other?"

You can use certain printing rules to apply only when printing

@media print {

   .Element {

       page-break-after: avoid;//auto|always|avoid|left|right|initial|inherit;

       page-break-before: avoid;//auto|always|avoid|left|right|initial|inherit;

       page-break-inside: avoid;//auto|always|avoid|left|right|initial|inherit;

   }

}


https://www.w3schools.com/cssref/pr_print_pageba.asp

Joey Moree wrote:

You can use certain printing rules to apply only when printing

@media print {

   .Element {

       page-break-after: avoid;//auto|always|avoid|left|right|initial|inherit;

       page-break-before: avoid;//auto|always|avoid|left|right|initial|inherit;

       page-break-inside: avoid;//auto|always|avoid|left|right|initial|inherit;

   }

}


https://www.w3schools.com/cssref/pr_print_pageba.asp

Hey Joey ,

 I have already tried playing with these css on my html but.. no success. Clueless right now, wht to do .