문제

Is there exists CSS selector that works only when transforming html to pdf with flying saucer, and doesn't work when opening this html? I need something like this

@page OnlyForFlyingSaucer {
    body {
        font-size: 16px;
    }
}

Thanks!

도움이 되었습니까?

해결책

Generating PDF with flying saucer is treated as "print" media, see the CSS 2.1 specification section on media types.

The syntax will be:

@media print {
    body {
        font-size: 16px;
    }
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top