HTML – onbeforeprint Event
The onbeforeprint event fires when a page is about to start printing or the dialogue box appears.
The onbeforeprint event fires when a page is about to start printing or the dialogue box appears.
The orphans property specifies the minimum number of lines that must be left at the bottom of a page or column. The following uses the @media Rule to specify a style only for pages sent to a printer.
The page-break-after property adds a page-break after a specified element, defining how an element should behave when printed.
The page-break-after property adds a page-break before a specified element, defining how an element should behave when printed.
The page-break-inside property sets whether a page-break should be avoided inside a specified element, defining how an element should behave when printed.
The widows property specifies the minimum number of lines that must be left at the top of a page or column.
The @media Rule describes CSS media queries to be used to define style rules for specific device types or a wide range of screen sizes and capabilities.
Using jQuery, a “print page” link can be created on the page which will open the browser’s print dialog box when clicked.