Class PdfCssMediaType
Defines which style-sheet should be rendered. 'Print' or 'Screen'. This matches the CSS3 Media Queries standard.
Inheritance
Namespace: IronPdf.Rendering
Assembly: IronPdf.dll
Syntax
public sealed class PdfCssMediaType : Enum
The PdfCssMediaType enumeration in IronPDF selects which CSS media-query stylesheet the renderer honors when converting HTML to PDF.
Part of the IronPdf.Rendering namespace, declared values are Screen and Print (2 total). The value is assigned to ChromePdfRenderOptions.CssMediaType, switching between on-screen layout and @media print rules such as repeating table headers and page-break hints.
See CSS screen and print for typical C# usage.
Fields
Use 'print' CSS media styles. Default behavior when viewing print dialog in a browser
Declaration
public const PdfCssMediaType Print
Field Value
| Type | Description |
|---|---|
| PdfCssMediaType |
Screen
Use 'screen' CSS media styles. Emulates the display of a browser window.
Declaration
public const PdfCssMediaType Screen
Field Value
| Type | Description |
|---|---|
| PdfCssMediaType |
value__
Declaration
public int value__
Field Value
| Type | Description |
|---|---|
| System.Int32 |