When you print a document you don't see the preview
-
-
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?
-
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-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
-
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.
-
@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”)…