mPDF Manual – mPDF Variables

CSSselectMedia

(mPDF ≥ 4.4)

CSSselectMedia – Selects which media-dependent CSS stylesheets to use

Description

void CSSselectMedia

Selects which media-dependent CSS stylesheets to use. mPDF supports internal and external CSS stylesheets, if the media property is set to "all", or matches the value of $CSSselectMedia. The @media selector within stylesheets is also supported.

Values

$CSSselectMedia  

Values

  • "print"
  • "screen"
  • [any other valid CSS @media selector, except "all"]

Default: "print"

Changelog

Version Description
4.4 Variable was added.
Fork me on GitHub