Configuring Notepad++ to Permanently Print with a Smaller Font Size



  • Re: How can I control font when printing?

    A very good solution (the best solution IMO) is to change the print font size by using a script. You must have the NppExec plug-in installed.
    To install the NppExec plugin (if not already installed):

    1. Go to menu Plugins > Plugin Manager > Show Plugin Manager.
    2. Select NppExec.
    3. Click Install.
    4. After the installation finishes, restart Notepad++ to enable the plugin.

    To reduce the size of the printing font, create a “script”:

    1. Go to Plugins > NppExec > Execute.
    2. Type the following two lines on separate lines. The first line (NPP_CONSOLE) tells Notepad++ to disable console output. The second line (SCI_SENDMSG) tells it ++ to reduce the font size (2146) by 2 levels (-2). Ensure both commands are on separate lines. Specify -3 or -4 for an even smaller font size.
    NPP_CONSOLE 0
     SCI_SENDMSG 2146 -2
    
    1. Click “Save…”
    2. Assign the script a descriptive name;e.g., PrintSmallerFontSize.
    3. Click OK.

    To make this change permanent:

    1. Go to menu Plugins > NppExec > Advanced Options…
    2. Go to “Execute this script when Notepad++ starts“.
    3. Select your script by its assigned name from the drop-down list.
    4. Click OK.

    Now Notepad++ will always print with a reduced font size so you can fit more text or code on each printed page.

    If you desire, you can create another script (e.g., PrintNormalFontSize) that restores the default printing font size; just replace the -2 with 0.



  • For those who don’t want to deal with scripting plugins: You can do the same using my ExtSettings plugin, it’s available via Plugins Admin. See also >>> here <<<.