Printing files based on line numbers

  • Hi ,

    I am notepad++ user and wonder is there a facility to print files based on varied range of line numbers.

    Example: 150-168 , 220-240 , 320-355

    At present i am printing by selection but this means that i need to print in 3 seperate sheet. I do not want to copy the range of selection contents into a single file because i need retain the line numbers.

    Any help would be appreciated.



  • @Shanmuga-Velu
    This is a possible method to help you overcome the issue of requiring line numbers in the selected print jobs.

    Notepad++ provides the ability to insert numbers in any column of the file that is opened. So if you were to select the first row and the first column and click the mouse so it shows a flashing cursor there. Then use the Column Editor (Alt and C keys). Use “number to insert”, start with 1 (if you want line 1 to show as 1), increase by 1 and may I also suggest tick the “leading zeros” (so all lines align). Have “Dec” selected and click OK.

    So now every line in the file with have the line number inserted into the start of every row.

    Now you can easily remove the lines you don’t wish to print. The result will be lines with the line number at the start. If you need to pretty the lines a bit, perhaps a space between the number and the text use the column editor to insert a space first, then do the number insert afterwards.


Log in to reply