Preferences : Formatted Printing (PDF)

Formatted Printing and PDF generation

The settings made in this section affect the following functions available from the menu bar:

Compatibility

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.

Page setup

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.

Basic settings for text

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.

Explanation of other options:

Make page break for headings.
By activating this option, a page break is performed beforehand for a corresponding heading, so that the corresponding heading is placed at the top of a new page. However, there is a special case for heading level 1
The first heading of type level 1 ignores this setting. Since typically Level 1 headings are placed at the very beginning of a document, such a setting would inevitably result in an empty first page.
Make hyperlinks visible
Using this option, formatted links that appear in the text as clickable text are additionally visualized. This is done behind the formatted link in the form of <http://www.example.com>. It should be noted that this applies to all formatted links, regardless of whether the corresponding link itself is displayed in the text or not.
Avoid page breaks in tables and elements
This option tries to prevent page breaks directly in tables and elements as far as the system can resolve. For this purpose, the corresponding element is placed on the next page. The term elements refers primarily to images and graphics.
Perform hyphenation Hyphenation is performed by internal macOS routines. Suitable sections of a word are searched for, where hyphenation usually makes sense and is possible.


Use your own CSS file

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; } }