A good suggestion. It's now built in and will be in the next Studio update: https://feedback.objo.dev/feature/1407
Where to find it
- File > Print Source… (⌘P on macOS, Ctrl+P on Windows and Linux)
- Right-click one or more selected files in the Navigator and choose Print / Export PDF…
- File: Print Source… in the command palette
You can send the listing straight to a printer through the operating system's print pipeline, or use Export PDF… to write a PDF file. The PDF is real vector output - the text is selectable and searchable. It's not a screenshot of the editor.
What the listing includes
- Line numbers in the gutter using the same numbering as the code editor, so compiler and runtime diagnostics line references line up with the printout.
- A contents page listing every included item and its members, each with the page number where it starts.
- Automatic indentation computed from the block structure (two spaces per level), matching what the editor displays, so every
End Function, End Sub, and nested line lines up consistently.
- Syntax colours with three modes: Auto keeps your dark editor theme on screen but switches to a light, toner-friendly palette on paper; Editor theme prints the active theme's colours exactly; Monochrome prints plain black.
- Long lines can wrap onto the next row or be truncated at the printable width.
- Headers and footers are customisable templates with tokens —
{Solution}, {Project}, {Item}, {Method}, {Page}, {Pages}, {Date}, {Time}, {Version} — for example Page {Page} of {Pages} · {Date}.
Choosing what to print
The Print dropdown offers the current item, the selected items (multi-select files in the Navigator first), or the whole solution, grouped by project with shared code first. Scopes that have nothing to print are greyed out, and a live summary shows how many items, lines, and pages you're about to produce before you commit.
Page setup
Page Setup… chooses the printer, paper size, orientation, and margins, and your options and printer setup are remembered between sessions. Font size is configurable, and the typeface follows the editor font from Settings.