.controls, .dontprint, .inlinepie { display: none; } @page { margin: 2cm; } body > h1 { font-size: 1em; } #page-header, #page-footer { font-family: fixed; font-weight: bold; position: fixed; left: 1em; right: 1em; color: #aaa; font-size: 0.9em; } #page-header table, #page-footer table { width: 100%; border-collapse: collapse; border: none; } #page-header table { width: 80%; } #page-header td, #page-footer td { font-family: fixed; padding: 0; color: #aaa; width: 50%; } #page-header { top: 0.5em; border-bottom: 0.2pt solid #aaa; } #page-footer { bottom: 2.5em; border-top: 0.2pt solid #aaa; } @page { @bottom-right { content: counter(page) " of " counter(pages); } } .page-number { text-align: center; } .page-number:before { content: "Page " counter(page); } hr { page-break-after: always; border: 0; } .content { margin: 0; } body { margin: 1cm 1cm 1.5cm 1cm; }