@media print {
    @page {
        /* Half-Letter - for booklets */
        padding: 0;
        margin: 20mm 12mm 10mm 12mm;
        size: 5.5in 8.5in;
    }
    body {
        /* A5 - for A4 and US-Letter booklets */
        font-size: 9pt;
        line-height: 1.4em;
    }
    img {
        max-width: calc(5.5in - 24mm);
        max-height: calc(8.5in - 30mm);
    }

    @page :left {
        @top-left {
            content: counter(page) "        " string(chapter);
            margin-bottom: -5mm;
        }
    }
    @page :right {
        @top-right {
            content: string(section) "        " counter(page);
            margin-bottom: -5mm;
        }
    }
}
