Community
    • Login

    When you print a document you don't see the preview

    Scheduled Pinned Locked Moved Notepad++ & Plugin Development
    6 Posts 4 Posters 15.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Fer ScrichF
      Fer Scrich
      last edited by

      2023-11-11_122023.jpg

      When trying to print in the dialog box but the preview does not appear
      I use windows11 64bit
      Notepad+++ 8.5.8 64 bit
      Can you help me
      Thank you

      Alan KilbornA CoisesC 2 Replies Last reply Reply Quote 1
      • Alan KilbornA
        Alan Kilborn @Fer Scrich
        last edited by

        @Fer-Scrich

        but the preview does not appear

        It’s because Notepad++ doesn’t support print-preview. I suppose it doesn’t because there is limited value – the screen is already WYSIWYG, so it is its own preview. If you really need to preview before actually printing, print to a PDF printer and look at the generated file before committing to printing on paper?

        8c390e48-9b7e-41bb-8450-ca5bed85a9e4-image.png

        mkupperM 1 Reply Last reply Reply Quote 3
        • CoisesC
          Coises @Fer Scrich
          last edited by

          @Fer-Scrich

          TLDR: This appears to be a Microsoft bungle.

          Many applications are having trouble with the new print dialog introduced in Windows 11 22H2.

          From what I’ve seen, users find that the print preview window shows “No preview available” for all native desktop Windows applications. (I think it might work for Windows Store applications.) And after searching (because, as a programmer, I’m curious) I can find no guidance at all from Microsoft about what developers should do to support the new dialog — just complaints from developers that it is confusing their users and ignoring some settings that worked with the old dialog.

          I gather some settings from the old dialog are either missing, hard to find or not working. (I’m still on Windows 10, so I have no direct experience.)

          If the application is supposed to provide the preview, I can find no documentation regarding how it would go about doing that. If Windows (or more likely, the printer driver) is supposed to do it, I’ve seen nothing explaining why it isn’t.

          The only “solution” I’ve seen offered is a way for the user to revert system-wide to the old printer dialog with a registry change; example:

          https://www.winhelponline.com/blog/restore-legacy-print-dialog-windows-11/

          Alan KilbornA 1 Reply Last reply Reply Quote 3
          • mkupperM
            mkupper @Alan Kilborn
            last edited by

            @Alan-Kilborn I have sometimes wished for print-preview as I’m interested in knowing where the page breaks are and/or if there is any unexpected line wrapping.

            Via experimenting I know that for my printer that a printed page from Notepad++ is 67 lines and that it can have up to 94 characters per line.

            The Microsoft print to PDF thing that comes with Windows seems to have smaller margins than the defaults provided by the printer. Print to PDF allows for 69 lines per page with 97 characters per line. Granted, someone could print to PDF and use that as their “preview” of what it will look like should they print the PDF.

            A while back I reverted my Windows 11 system to the old print dialog box referencing:

            • https://community.notepad-plus-plus.org/topic/23719/print-error-0x80040003/10
            • https://github.com/notepad-plus-plus/notepad-plus-plus/issues/14109#issuecomment-1730172732
            • https://www.winhelponline.com/blog/restore-legacy-print-dialog-windows-11/?expand_article=1

            I used:

            reg add "HKCU\Software\Microsoft\Print\UnifiedPrintDialog" /v "PreferLegacyPrintDialog" /d 1 /t REG_DWORD /f
            
            Alan KilbornA 1 Reply Last reply Reply Quote 2
            • Alan KilbornA
              Alan Kilborn @Coises
              last edited by

              @Coises

              This type of issue (in Notepad++) predates any Microsoft bungling. Users have complained before that there is no Print Preview with Notepad++, long before Windows 11 came along.

              1 Reply Last reply Reply Quote 1
              • Alan KilbornA
                Alan Kilborn @mkupper
                last edited by

                @mkupper said in When you print a document you don't see the preview:

                for my printer that a printed page from Notepad++ is 67 lines and that it can have up to 94 characters per line

                Interesting.

                I’d think that if someone used a pdf printer to “preview” a Notepad++ document print, wouldn’t they just then print the pdf (and thus get what they saw in the “preview”)…

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors