Marius Vasile

Marius Vasile

  • 1.1k
  • 1.1k
  • 26.7k

asp.net core razor print on landscape a4

Aug 29 2021 8:06 AM

I am trying to print a Razor view in landscape mode but if I try to use

 

<style type="text/css" media="print">
 

/* @page {size:landscape}  */ 
@media print {

    @page {size: A4 landscape;max-height:100%; max-width:100%}

    }

</style>

the eroor is that @page can be only used once. What other alternative I have?


Answers (4)