0

I have a cards of tables , each table contain a numbers of chairs cards I need to display them with no cutting in cards after new page and complete de table i+1 just after table i how to fix this problem , i have to complete the current page by Table 7 and not skip to the current page to diplay It , and the cards should be not cutting by new page , any solution ?Thanks

Print page let a big space and skip to the next page

header {
  background: #563d7c;
  padding: 2em 1em;
  color: #fff;
  margin-bottom: 2em;
  h1 {
    font-weight: 200;
  }
}

.card {
  background: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  img {
    width: 100%;
  }
}

[class*="row"] {
  margin-bottom: 1em;
  justify-content: center;
}

[class*="col-"] {
  background: #efefef;
  border: 1px solid #ddd;
  padding-top: .75rem;
  padding-bottom: .75rem;
  width: 100%;
}

@media print {
  .container-fluid {
    page-break-inside: avoid;
  }
}
<header role="banner">
  <h1>Mc donald food
  </h1>
</header>

<div class="container-fluid" style="page-break-inside: avoid;page-break-after: avoid;" *ngFor="let table of tables">
  <h2>Table {{table.tableNumber}} :</h2>
  <div class="row" style="page-break-before: avoid;">
    <div *ngFor="let c of getArrayFromNumber(table.capacity);let j = index  ">
      <div class="card">
        <qrcode [qrdata]="urldata+'main/foodBusiness/'+food+'/orders/create?orderType=DineIn&tableId='+table.tableId+'&chairNumber='+inc(j)" [width]="widthCodeQr" [errorCorrectionLevel]="'M'"></qrcode>
        <div>
          <h4>{{ 'table.tablenum' | translate }} : {{table.tableNumber}}</h4>
          <p>{{ 'table.chair' | translate }}: {{j+1}}</p>

        </div>

      </div>
    </div>
  </div>
</div>
Cédric
  • 2,239
  • 3
  • 10
  • 28
  • Does this answer your question? [CSS Printing: Avoiding cut-in-half DIVs between pages?](https://stackoverflow.com/questions/907680/css-printing-avoiding-cut-in-half-divs-between-pages) – Gerard Nov 07 '22 at 08:45

0 Answers0