• Login
Community
  • Login

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

Scheduled Pinned Locked Moved General Discussion
print font sizemodifychangefont sizeprinter
2 Posts 2 Posters 1.7k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G
    Gary Brown
    last edited by Oct 30, 2019, 8:08 PM

    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.

    1 Reply Last reply Reply Quote 3
    • D
      dinkumoil
      last edited by Oct 31, 2019, 11:56 AM

      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 <<<.

      1 Reply Last reply Reply Quote 2
      2 out of 2
      • First post
        2/2
        Last post
      The Community of users of the Notepad++ text editor.
      Powered by NodeBB | Contributors