Visual Studio Code Printer

Pieter P
This is a simple tool for printing code with line numbers and syntax highlighting.
  1. Select and copy the code in VSCode
  2. Paste the code in the “Raw HTML code” field
  3. Emphasize some lines or add line breaks if you want to (see below)
  4. Add a title and author to be included with the generated HTML
  5. Click “Print” to print the code, or copy the generated HTML

Emphasize code

You can use this tool to emphasize certain lines. Other lines will be grayed out.
  1. Add three asterisks (***) before the lines you want to emphasize
  2. Check the box below

Add page breaks

You can add a page break after a line by adding three dashes (---) at the end of the line.
By default, lines of code that only contain comments with lines (//--- or //=== or //___) will be replaced by page breaks as well.

Settings

Title:
Author:

Raw HTML code

Formatted HTML code

Result