This is extremely bizarre. It’s new, and it’s 100% reproducible for me.
When I create an invoice or a statement or a report and print it to the built-in PDF printer in the Print dialog (not by clicking Manager’s “PDF” button, but by clicking the “Print” button and selecting “Save as PDF” as the printer), the PDF file is created in the selected folder as expected. But then when I eventually exit Manager, all the PDF files it created during the session are silently deleted, every time. They don’t go to the Recycle Bin; they’re just suddenly gone and not recoverable.
Interestingly, if I select a different virtual PDF printer that I have installed, the file isn’t deleted when I exit. The deletion only happens when I use the default “Save as PDF” virtual printer.
Also interestingly, if I change the filename of the PDF file after it’s created but before I quit Manager, it isn’t deleted. If I change the filename and then change it back again to its original name, it does get deleted. It’s almost as if Manager (or, perhaps more likely, Edge) is keeping track of what it thinks are temporary files and doing destructive garbage collection when exiting.
I’ve lost a huge amount of work because of this bugundocumented auto-delete feature, although I hadn’t noticed it before. I’m spending my morning today re-creating all my missing invoices and statements.
Windows 11 ver 24H2 build 26100.3915.
Manager ver 25.3.29.2206 > just updated to ver 25.4.17.2256 > issue persists
Edge ver 135.0.3179.98.
(I don’t know how to find a version number for “Save as PDF”; I believe this virtual printer is built into Windows or Edge, rather than existing as a distinct driver.)
I mention Edge only because it appears that Manager for Windows uses the Edge printer dialog, so I assume it uses Edge as a display engine or something like that. As I wrote, Edge itself doesn’t exhibit this behavior, nor does any other software I’ve encountered. To me, this is Manager-specific.
This looks like the root cause, something to do with WebView2, which if I’m not mistaken is what Manager uses to display its pages. I can’t claim to understand it, but hopefully @Lubos can take a look and update the WebView2 component packaged with Manager, or whatever it is that needs to be done.
Incidentally, the version of WebView currently running on my machine is 135.0.3179.98, which appears to be the latest production version.
Just a thought, but when you create the PDF, does it then open that file in Edge, so that you can view it? If so, it is a temporary file at that stage. You then need to save it in Edge. It’s a quirk of Edge I think. There may be an option in the many settings in Edge to stop it.
I can confirm now that Microsoft has released the fix to WebView2. In the newest version of WebView2 Runtime (Build 136.0.3240.50), the PDF files are not longer deleted when quitting Manager.
I believe WebView2 Runtime will update itself eventually, but it seems it’s possible to trigger the update manually by downloading the “Evergreen Bootstrapper” found on the Microsoft website, and using the “Run as Administrator” option.