Printing And Exporting

From Notepad++ Wiki
Jump to: navigation, search
Turning text into print matter or some other form of text

Basically, printing some text means creating a temporary file of binary data a given printer can understand and render in an expected way. On primitive OSes, the file may be implicit as characters would be sent right over the parallel cable. When printing to a file, or to a PDF/PostScript printer, the file being created is not temporary.

For this reason, printing is hardly different from exporting to some format. However, there is some specific terminology that applies to printing, because it was known long before the other methods.


There are two commands, located on the File menu. Print... invokes the standard Windows dialog for choosing a printer. Print Now! skips this step and prints one copy of the whole document to the default printer.


Two tabs on the Settings -> Preferences dialog control the way Notepad++ prints a document: Print - Colour and Margin and Print - Header and Footer.

The former lets you choose the four margins, in centimeters. There are also four colour schemes to choose from:

  • actual colours
  • inverted actual colours
  • black on white
  • actual foreground on white.

Additionally, there is a checkbox to toggle printing of line numbers.

The latter tab has two frames, the top one for defining the header and the bottom one to define the footer. They are otherwise identical.

The header and footer are split into a left, central and right part, the text of which can be entered in text fields. The font face, size and attributes for the whole header/footer can be chosen below these text fields.

While any text may be entered, it can be enriched with some variable quantities. The list of available variables appears above the two frames. To add a variable, select it on the dropdown list and click the Add button. The available variable quantities are:

  • Full file name path : the fully qualified file name
  • File name : the file name without ny folder name
  • File directory : the file path, without any name
  • Page : the page number, in arabic digits
  • Short date format
  • Long date format
  • Time

Unsupported print features

The following are not supported as of version 6.6.6:

  • Print all opened files
  • Insert a page break (you can try inserting form feed characters, but most modern printers will not act upon it).

Exporting to some format

The NppExport plugin can export the current document/selection as RTF or HTML. The export may go either to a file or to the clipboard. There is an extra command to Copy all formatss to clipboard.