TIL: Set page margins to 0 on print preview

How to remove page margins when printing

2023-09-21
frontend
css

Just add this CSS code to your app:

@media print {
  @page {
    margin: 0;
  }
}

Print preview:

image image
Default margins No margins