Formatted printing settings are internally effective only in macOS 11 or newer. Older macOS versions will fall back to an alternative generation.
Note: The Formatted Printing Preferences can also be used by older macOS versions by using the "View converted document in an external browser" function from the toolbar and the print function of the corresponding browser. However, care must be taken to ensure that a browser version is used that implements the appropriate document printing features.
In the upper section of the preferences, you can set up specifications for the page. Page dimensions are specified in dots, a unit of measurement also used internally for print generation.
Note: If the page margins exceed the actual paper size, a warning message will be displayed and when attempting to print with these incorrect settings, the operation will be aborted. Also in this case, an additional error message will be displayed again.
Note: Using CSS to set your own paper formats will be ignored by the system. macOS will fall back to its own paper format settings in any case.
The appearance of the document to be printed can be set via the preferences for formatted printing. In addition to setting the font, font size, text alignment and spacing within the text, the sizes of the headings can also be set as a percentage of the set general font size.
It is possible to further adapt the display of the print to your own wishes using your own CSS file. For this purpose, the option "Use own CSS file for printing" must be selected in the Preferences for Formatted Print under the item Layout and accordingly an own CSS file must be selected via the "Select" button.
When creating your own CSS file, there are a few points to consider. The most important point here is that the corresponding formatting code is correctly included for printing.
Note: When creating an individual formatting code, it should always be checked whether the corresponding instructions are also supported. The internal webkit system is used to generate the print result, which does not support all formatting options in the print output. For example, the formatting instruction for generating text columns is currently not supported.
@media print {
/* Your personal CSS code */
}
Below is a complete example as used in this application:
@media print {
*{
-webkit-hyphens:auto;
hyphens:auto;
text-align:right;
}
p, h1, h2, h3, h4, h5{
font-family:"Helvetica Neue";
font-size:14pt;
}
p{
orphans:3;
widows:4;
margin-top:4pt;
margin-bottom:4pt;
line-height:autopt
text-indent:40pt;
}
h1{
break-before:page;
font-size:250%;
}
h1:first-child{
break-before:avoid;
}
h2{
break-before:page;
font-size:200%;
}
h3{
break-before:avoid;
font-size:150%;
}
h4{
break-before:avoid;
font-size:130%;
}
h5{
break-before:avoid;
font-size:120%;
}
h6{
break-before:avoid;
font-size:110%;
}
h1, h2, h3, h4, h5, h6{
break-after:avoid;
}
table, figure {
break-inside:auto;
}
img{
break-before:auto;
break-after:auto;
break-inside:auto;
display:block;
max-width:100%;
height:auto!important;
}
}