How to print a page break

  • Nobody/Anonymous

    Nodepad ++ offering a very nice formatted display! However, if we inserts the code ascii 12, 0x0C which is the FF "Form feed", it prints "FF" instead of the desired page break.
    How to insert a page break in the text so he realy switch the page, rather than view the code and print everything on the same page?

    • Harry

      Harry - 2007-11-29

      Notepad isnt designed for this because its a code editor, the only way you can get the behaviour atm is adding a lot of newlines.

      • Nobody/Anonymous

        Yep, code usually doesn't need page( break)s.

        But try to format your files using the syntax highlighting utility.

    • Nobody/Anonymous

      I think it would be nice to have form-feeds/page-breaks work.  For one, I like to use the same editor for stuff besides coding (which for me is why I use Notepad++ anyway) like data analysis.  And even with code (which doesn't get printed all that often) when you print you may be doing so to have someone else review - in which case having neat pages is a big help.

      But since it's not going to happen (any time soon) in Notepad++ - I found this is an alternate solution (and weak at that since you'll have to print from Word or something like it):

      Use the hex-editor plugin to make the form-feeds.  First (before switching to hex view) I would put some character (like `) where I wanted form-feeds.  Then view/edit in hex and find/replace all ' (60) with FF (0c) and switch back to ascii.  Or insert somehting like control-e in ascii and replace that with formfeed when in hex.

      Then save the file and open in Word (where you could have inserted the formfeeds in the first place) and print.  (preview and all)

      Maybe not such a good solution.

    • Nobody/Anonymous

      I agree, Notepad++ should not need to support page break characters.  However, I think it would be nice to be able to view where page breaks will occur, perhaps via a dotted line across the screen.  There was another thread about this.  The author pointed out that being able to see the page break is useful during code reviews.  Any chance of seeing this feature in the future?

    • M. B. Huffman

      M. B. Huffman - 2008-04-30

      Type the hexadecimal code for formfeed (0C) where you want the line break
      highlight the 2 characters
      TextFX -> TextFX Convert -> Convert Hex to text

      Here are the Action elements and attributes from the Macros section of shortcuts.xml when saved as a macro (I removed angle brackets to avoid formatting issues):

        Action type="1" message="2170" wParam="0" lParam="0" sParam="0"    
        Action type="1" message="2170" wParam="0" lParam="0" sParam="C"    
        Action type="0" message="2305" wParam="0" lParam="0" sParam=""     
        Action type="0" message="2305" wParam="0" lParam="0" sParam=""     
        Action type="1" message="2170" wParam="0" lParam="0" sParam=""     
        Action type="1" message="2001" wParam="1" lParam="0" sParam=""

      However, it seems to work just fine if, after saving the macro, you delete all the lines except the last one, which does the actual writing. Be sure to edit shortcuts.xml with something other than Notepad++, otherwise it won't get saved.


      • Nobody/Anonymous

        Menu_____ : TextFX
        Submenu__ : TextFX Tools
        Option___ : Insert ASCII Chart or Character

        Copy the _FF_ character/symbol on the line starting with the number 12.
        Press CTRL+Z to remove the chart again and paste the _FF_ wherever you want.

        • Nobody/Anonymous

          You can also type it in: while pressing and holding down the left ALT button, press 012 (or 0012) on the numeric keypad. Release the ALT button et voilà!

          • Nobody/Anonymous

            Its also in the shortcutmapper: under scintilla, look for SCI_FORMFEED or something like that. Itll insert FF.

            • Nobody/Anonymous

              Yes, it is.

              Menu_____ : Settings
              Option___ : Shortcut Mapper...
              Button___ : Scintilla commands
              Line 12__ : SCI_FORMFEED

              Double click on this line 12 and you can set a shortcut to your liking to easily insert a Form Feed / Pagebreak into your document.

              You could set it to ALT+Enter, for example.

              • HaveFun2000

                HaveFun2000 - 2008-12-12


                I tried it: ALT + 012 inserts a FF, but on printing, it doesnt make a page break. It prints just a FF, like seen on screen.

                How to insert a pagebreak on printed page?

              • M. B. Huffman

                M. B. Huffman - 2008-05-03

                SCI_FORMFEED mapped to Ctrl+Enter: Excellent solution; much better than my hack.
                The expanded shortcut mapper was a great addition!


      • M. B. Huffman

        M. B. Huffman - 2008-05-01

        I forgot to add: you will not be able to actually print the page break with Notepad++; save the file and print from Windows WordPad to have the pages break where you inserted the formfeed characters. An added item in the Run menu is handy for this.



Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks