Community
    • Login
    1. Home
    2. Popular
    Log in to post
    • All Time
    • Day
    • Week
    • Month
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics

    • All categories
    • AlanRobbo 69A

      Is there a way to do a new Page Brake

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      2
      0 Votes
      2 Posts
      50 Views
      PeterJonesP
      @AlanRobbo-69 said: Hi, is there a way to do a new Page Brake in Notepad++ ? so at that point a New Page will be Printed. Thank You. So, the “positive” answer: to insert the ASCII 12 Form Feed (U+000C, which is the “page break” for old-fashioned printers), you can use the Edit > Character Panel, and double click on the FF. Depending on your Settings > Preferences > Editing 2 > Non-Printing Characters settings, you may or may not be able to enter that character by other means – with “Prevent control character (C0 code) typing into document” checkmarked, you cannot use the windows Alt+012 to enter that character, whereas if it’s not checkmarked, you can: but the Character Panel overrides that setting, and will still enter that character into the document. To be able to see that the character is there, you need to have View > Show Symbol > Show Control Characters and Unicode EOL enabled – if it’s enabled, you’ll see a FF in a reverse-text box; if it’s not enabled, you won’t see anything, but you will be able to use arrow keys to move left or right across the invisible character, and you’ll see the status bar column number change even though the typing caret appears to be in the same place. But (and it’s a big but), the printing algorithm that Notepad++ uses sends the Scintilla replacement boxed-FF glyph to the printer, instead of sending the actual character. (Furthermore, I think that modern Windows printer drivers don’t interpret the ASCII 12 as a “new page”). You might be able to copy the text file directly to the printer from the command line (or from Notepad++'s Run > Run… dialog) using old MS-DOS style commands, like Run > Run > COPY "$(FULL_CURRENT_PATH)" /B PRN (where PRN could be PRN or LPT1 or \\ComputerName\PrinterShareName), and that might bypass some of the printer drivers and instead send the raw ASCII to the printer, which your printer might interpret as a control to move to the next page … but if you do, then you lose the rest of Notepad++'s rendering (which means it won’t follow your Notepad++ font settings or line-numbering or headers or syntax highlighting). So the short summary: you can insert the form feed character, but Notepad++'s print algorithm doesn’t treat that form-feed character as a page break, so to get that character to behave as you want it to, you’d probably have to print using MS-DOS-era print commands, hoping that modern Windows still allows such. update: what I said here is essentially what I said in 2019 in this old discussion; that discussion concludes that the ability to handle form-feeds as page breaks would need to be implemented in the Scintilla library (which Notepad++ uses) before Notepad++ could offer it as a feature.
    • donhoD

      Notepad++ release 8.9.6

      Watching Ignoring Scheduled Pinned Locked Moved Announcements
      1
      0 Votes
      1 Posts
      258 Views
      No one has replied
    • Dev NullD

      Force single Reload from command-line?

      Watching Ignoring Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
      2
      0 Votes
      2 Posts
      95 Views
      PeterJonesP
      @Dev-Null , Notepad++ itself doesn’t have a command-line option to force reload of a file. However, with the -pluginMessage command-line-argument, you could set up a script for the PythonScript plugin that could handle that (search the forum for some of the recent posts on -pluginMessage, and you should find a script and instructions that gives an example of handling the -pluginMessage in PythonScript – or here’s a dummy test script that I made some time ago in response to this discussion). But since PythonScript has some reload commands, like notepad.reloadBuffer(bufferID): Reloads the given bufferID notepad.reloadCurrentDocument(): Reloads the current document notepad.reloadFile(filename): Reloads a filename. … then you could use the -pluginMessage hook to issue one of the reload commands.