angular-gridster2 icon indicating copy to clipboard operation
angular-gridster2 copied to clipboard

gridster ui on print getting unexpected page break

Open rajratnamaitry opened this issue 4 years ago • 2 comments

        page-break-after: always;
        page-break-inside: avoid;

this css is not working on gridster item

steps to reproduce. 1 create multiple gridster items with height:800px and page-break-after: always; page-break-inside: avoid; each 2 press ctrl + p to print preview page 3. unexpected gridster item page break

rajratnamaitry avatar May 12 '21 12:05 rajratnamaitry

Firstly you need to take a screenshot of dashboard using NGX-CAPTURE then for the print, you need to use NGX-PRINT. then you can achieve gridster dashboard print.

DEMO: https://stackblitz.com/edit/ngx-capture-example-2rjn5r?file=src%2Fapp%2Fapp.component.css

malikfaizanhaider avatar Aug 03 '21 10:08 malikfaizanhaider

@rajratnamaitry how did you end up fixing the unexpected page break?

To be honest, I doubt that the solution proposed by @malikfaizanhaider works because of all screen capturing implementations for the client I've seen so far, all of them create an image (as expected), and any subsequent tools to print that image cannot be aware of the gridster items and prevent them to be cut off on page break.

niklaas avatar Apr 11 '23 10:04 niklaas