@media print {
  * {
    background: #0000 !important;
    box-shadow: none !important;
    color: #000 !important;
    text-shadow: none !important;
  }
  h2,
  h3,
  img {
    page-break-after: avoid;
  }
  h2,
  h3,
  p {
    orphans: 3;
    widows: 3;
  }
  a,
  a:visited {
    text-decoration: underline;
  }
  a[href]:after {
    content: " (" attr(href) ")";
  }
  img {
    max-width: 100% !important;
  }
  @page {
    margin: 0.5cm;
  }
}
