Issues with printing selection since version 8.4
Description of the Issue
Since version 8.4 the text background on a print (only while printing selection) is pink, it's unusable if you're going to print it on a b/w printer.
Steps to Reproduce the Issue
- Select some lines
- Print the selection (happens automatically if something is selected)
- As I said, since version 8.4 the background is pink (I tested that with the portable versions too)
Please add an option to change the background while printing a selection or change it back to no background.
Debug Information
Notepad++ v8.4 (64-bit) Build time : Apr 20 2022 - 03:31:06 Path : C:\Program Files\Notepad++\notepad++.exe Command Line : Admin mode : OFF Local Conf mode : OFF Cloud Config : OFF OS Name : Windows 11 (64-bit) OS Version : 2009 OS Build : 25126.1000 Current ANSI codepage : 1252 Plugins : ComparePlugin.dll mimeTools.dll NppConverter.dll NppExport.dll
Example Screenshots
Printing the complete document

Printing only some lines

8.4 and above

8.33 and below

Sorry, forget to add a scan of the printed page:

this Forum post came after, but seems to be related. The user in the Forum added the information that Settings > Preferences > Print had Colour Options = Black on White.
Notepad++ v8.4.2 (64-bit)
Build time : May 29 2022 - 16:47:30
Path : C:\usr\local\apps\npp\npp.8.4.2.portable.x64\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : ON
Cloud Config : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 20H2
OS Build : 19042.1586
Current ANSI codepage : 1252
Plugins :
BetterMultiSelection (1.5)
mimeTools (2.8)
NppConverter (4.4)
NppExport (0.4)
NppTaskList (2.4)
PythonScript (2)
Screenshot of NPP
Screenshot of Preferences
Screenshot of PDF in PDF viewer

I definitely agree that it's a bug if the settings are set to Black on White but it still prints selected text with a background color.
The current version of SciTE does not have this problem in black-on-white printing mode:
#~ %USERPROFILE%\SciTEUser.properties
print.colour.mode=2
Only difference I can see is that SciTE stores the selected text in an instance of Sci_RangeToFormatFull — since 5.2.3: https://sourceforge.net/p/scintilla/scite/ci/default/tree/win32/SciTEWinDlg.cxx#l625
N++ could do the same after #11734 is merged, but the benefit would be nil as they already enlarged the printable range beyond 2 GiB in 961a133, and swapping in Sci_RangeToFormatFull made no difference when I tried it.
It should be fixed in Scintilla newest version which is now merged in Notepad++ master:
Fix pink selection background when printing by making it completely transparent.
ref: https://www.scintilla.org/ScintillaHistory.html
As of 9 days ago, the bug is proclaimed to have been fixed. However, there is apparently no updated release of N++. When should we expect the build that includes this bug fix?
As of 9 days ago, the bug is proclaimed to have been fixed. However, there is apparently no updated release of N++. When should we expect the build that includes this bug fix?
The release candidate 8.4.3 includes the upgrade to Scintilla 5.2.3. Have you tried that version yet?
Thank you for a really quick response. I'll try that release candidate.
However, I am also interested in the expected schedule for non "candidate" release, as I am a regular user, not a developer.
I just installed the RC and tested printing a selection. The result certainly does not match my expectations.
My expectation is syntax-highlight colored text on NO background (that is what I selected).
The result is that the selection is printed with a gray background. Depending on the syntax highlighting (e.g. text literals in light gray), the printed output is quite difficult to read.
Selection highlighting is NOT a component that one would expect to print, no matter the color scheme.
My print options are set to "No background color". This option is clearly being ignored.
Confirmed that 8.4.3 does not resolve this issue.
Now rather than printing the highlighted selection with a purple background, it prints with a grey background. All previous versions of NPP prior to 8.4 printed with NO background.
Please revert this change.
I am also interested in the expected schedule for non "candidate" release, as I am a regular user, not a developer.
There has never been a published "expected schedule" before, so I don't think there will be one now. You just have to wait and see like the rest of us.
@donho, new upstream patch to try: https://sourceforge.net/p/scintilla/bugs/2335/#b237
@rdipardo
Got these errors:
$ git apply --check /c/Users/xxxx/xxxxxx/HidePrinting.patch
error: patch failed: scintilla/src/EditView.cxx:2357
error: scintilla/src/EditView.cxx: patch does not apply
Got these errors
Use the --ignore-whitespace option and try this git-ified version (actually a unified diff of four related changesets [1]):
HidePrinting.git.patch.4.npp.txt
Or just wait for Scintilla 5.3.0, since upstream has already committed the fix.
[1]:
- https://sourceforge.net/p/scintilla/code/ci/746451d83613c8ec143dc8e6def060bcf9be5098
- https://sourceforge.net/p/scintilla/code/ci/fc46d7ed1f9393b8f0a577d72016c3c4da9c465c
- https://sourceforge.net/p/scintilla/code/ci/ac7c97b3df20316a75fd20d1392d8bc9570be516
- https://sourceforge.net/p/scintilla/code/ci/3a40bb79a28176cc458dc181de6ad8e26e5af24b
Let's wait Scintilla v5.2.5 for updating, if the bug is fixed.
@techdan, @mosin44, @saua13
This development build may resolve the printing issue: https://ci.appveyor.com/project/donho/notepad-plus-plus/builds/44597613/job/9mii1ux7a1w0w0ht/artifacts
Fixed by https://github.com/notepad-plus-plus/notepad-plus-plus/pull/12045
@techdan, @mosin44, @saua13
This development build may resolve the printing issue: https://ci.appveyor.com/project/donho/notepad-plus-plus/builds/44597613/job/9mii1ux7a1w0w0ht/artifacts
I tested with this build, and verify that the problem appears to be finally resolved.
Thanks to all involved.