There are a large number of options available that affect how printouts render.
Accessing Print Settings
The Document Title
The document title can optionally be displayed at the top of each page in a printer view. It is visible when the IPrintSettings.DocumentTitle property is non-null and the IsDocumentTitleMarginVisible property is
true, which is the default.
This code sets the document title that is displayed at the top of each page:
editor.PrintSettings.DocumentTitle = "My Document";
Turning Off Syntax Highlighting
Using a Custom Highlighting Style Registry
When syntax highlighting is on for printer views, it will use the IHighlightingStyleRegistry that is currently active in the editor. However when the editor is using a dark theme, this is not a desirable registry to use for printouts.
A IPrintSettings.HighlightingStyleRegistry property can be set to a custom IHighlightingStyleRegistry instance that will be used for printer output only, and is ideally set up with darker foreground colors and no backgrounds.
See the Highlighting Style Registries topic for more information on highlighting style registries.
Allowing Collapsed Outlining Nodes
Collapsed outlining nodes are automatically expanded in printer views when the IPrintSettings.AreCollapsedOutliningNodesAllowed property is set to
false, which is the default value. Set the property to
true to allow currently-collapsed outlining nodes in the document to render as collapsed in the printer view.