notepad-plus-plus icon indicating copy to clipboard operation
notepad-plus-plus copied to clipboard

Issues with printing selection since version 8.4

Open saua13 opened this issue 3 years ago • 14 comments

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

  1. Select some lines
  2. Print the selection (happens automatically if something is selected)
  3. 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 01-Example 02-Complete

Printing only some lines 03-Selection

8.4 and above 04-Selection_84

8.33 and below 05-Selection_833

saua13 avatar Jun 23 '22 06:06 saua13

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

saua13 avatar Jun 23 '22 06:06 saua13

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.

pryrt avatar Jun 23 '22 17:06 pryrt

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

rdipardo avatar Jun 24 '22 03:06 rdipardo

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

donho avatar Jun 28 '22 18:06 donho

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?

mosin44 avatar Jul 07 '22 15:07 mosin44

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?

pryrt avatar Jul 07 '22 15:07 pryrt

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.

mosin44 avatar Jul 07 '22 16:07 mosin44

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.

mosin44 avatar Jul 07 '22 16:07 mosin44

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.

techdan avatar Jul 12 '22 22:07 techdan

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.

alankilborn avatar Jul 13 '22 13:07 alankilborn

@donho, new upstream patch to try: https://sourceforge.net/p/scintilla/bugs/2335/#b237

rdipardo avatar Jul 21 '22 10:07 rdipardo

@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

donho avatar Jul 24 '22 01:07 donho

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

rdipardo avatar Jul 24 '22 04:07 rdipardo

Let's wait Scintilla v5.2.5 for updating, if the bug is fixed.

donho avatar Jul 24 '22 21:07 donho

@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

rdipardo avatar Aug 27 '22 20:08 rdipardo

Fixed by https://github.com/notepad-plus-plus/notepad-plus-plus/pull/12045

donho avatar Sep 20 '22 15:09 donho

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

mosin44 avatar Sep 20 '22 15:09 mosin44