In this demo you learn how to change the CSS properties of a HTML document based on media type selection. By default the HTML to PDF converter will render the HTML document for 'screen', but this can be changed when another media type is assigned to HtmlToPdf.MediaType property.

For example, when this property is set to 'print' the CSS properties defined by the '@media print' rule will be used when the HTML is rendered instead of the CSS properties defined by the '@media screen' rule.
HTML Code
Select Media Type: