microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
111.38k stars 6.56k forks source link

Provide PDF Preview for File Explorer and Outlook for Windows #3548

Closed TheAndyMac closed 3 years ago

TheAndyMac commented 4 years ago

Summary of the new feature/enhancement

Add a PDF Previewer and Icon Generator for Windows Explorer, and ideally also so that Outlook Desktop can also use it --- like the new explorer additions of SVG and Markup Previews, it would be really useful to enable PDF Previews in Explorer.

DavidGretzschel commented 4 years ago

With the Preview Pane there already is a a way to get PDF previews, though. You can try it for yourself by pressing alt, v, p. I used to have it disabled, because it made a list of PDFs unscrollable (previews added lag), but they fixed that now.

image

Edit: Spoke too soon. Performance is still extremely bad. Does look very pretty though.

truefalsename commented 4 years ago

Slightly OT (apologies), but would it be possible to have all these preview appear in a pop up windows, for instance after pressing spacebar?

I know there are some programs on MS store that add this functionality, but it would be kinda neat if this was integrated in the OS already at the level of power toys. For pdfs and images it would be nice if the preview pane/pop up window supported the usual inking options.

Jay-o-Way commented 4 years ago

For pdfs and images it would be nice if the preview pane/pop up window supported the usual inking options

That would change the PREVIEW Pane into an EDIT Pane. I personally don't think it would be easy to ink a document in such a small area. I would rather open the doc in full size instead.

crutkas commented 4 years ago

@DavidGretzschel i think you have acrobat reader installed which is why you can preview.

DavidGretzschel commented 4 years ago

@crutkas Yeah, you're probably right. I wasn't aware that an installed PDF Reader would or could automatically do that. At the moment, the preview flashes in a startup animation for "Soda PDF", which is installed. That's not even my default PDF reader (which is Sumatra)..... This must be new or maybe it's very old, I've just never had the Preview turned on.

Windows 10 still surprises me with random nonsense like that. [nonsense, because it makes the whole "preview"-feature unusable in general without asking, because performance will just die, if there's PDFs involved, also because there's no clear indication that an external app is doing anything or how to decide which app is doing it or how to turn it off] Maybe I'm too negative about it and there's a way to make it behave, and I just lack the skill?

EDIT: Sorry for the confusion, I caused.

Fabrice-Deshayes-aka-Xtream commented 4 years ago

it would be a nice feature. Explorer preview is relatively useless. Add in such format could make sens.

rdeveen commented 3 years ago

Working on this in my repo https://github.com/rdeveen/PowerToys

It's working in the explorer preview pane. image

Also working in Outlook. image

Added it to the settings page. image

Using @pvginkel his PdfiumViewer and @TimChen44 version of it for .NET Core PdfiumViewer.Core.

Now lets see what I need to do to create a good pr.

TheAndyMac commented 3 years ago

Excellent, and looks good :-)

maicol07 commented 3 years ago

That's great! I wonder if this can be extended to the file icon preview, like SVGs

ArkhaLime commented 3 years ago

Excellent, I was searching for a little pdf previewer for Outlook. I don't have any pdf viewer installed. I use Edge (chromium) for that.

You could also use the WebView2 for the pdf preview

rdeveen commented 3 years ago

I have tried to implement the new WebView2 control but didn't succeed.

First the user have to install a Canary build of Edge or the Webview2 Runtime (https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution). This gives a huge dependency to PowerToys. I guess that is not exceptable.

Secondly I didn't get it working. I thing because of the sandboxing of the preview handler and the WebView2 needed some temporary folders to store some caching data.

enricogior commented 3 years ago

@rdeveen

This gives a huge dependency to PowerToys. I guess that is not exceptable.

At this stage, it would be difficult to accept it. We are aiming towards stability and we cannot take this type of dependencies.

ArkhaLime commented 3 years ago

You are right, a big dependency and the use of a temporary folder. I did not think about that.

crutkas commented 3 years ago

webview2 is the problem and understanding all the downlevel OS issues and 'what if's' matrix. This is why we ask for a discussion before implementation.

One idea is detect if Edge is installed, if not, throw a warning to tell them to install / enable. Not sure how this would work however at installer time with the WSX

enricogior commented 3 years ago

@crutkas if we are talking about installing a non stable version of WebView2 this is too problematic, because the users may have an newer version installed that has incompatibilities, or PT may require a newer version that will cause incompatibilities with installed apps. I suggest we don't go down that rabbit hole.

crutkas commented 3 years ago

@enricogior, i saw @rdeveen PR, i worry about the base and working on ARM64 based on some of the NuGet file names.

DHowett commented 3 years ago

Whoops, it looks like PR 9088 didn't close this issue. Thanks all!

Aaron-Junker commented 3 years ago

@DHowett We usally don't close issues until the release of the next version. This helps to keep track of things we implemented for the changelog

Aaron-Junker commented 3 years ago

That's also why the PR didn't close this issue. It shouldn't do it

DHowett commented 3 years ago

Ah, thanks! Sorry about that.

Aaron-Junker commented 3 years ago

Ah, thanks! Sorry about that.

No problem

rdeveen commented 3 years ago

@DHowett We usally don't close issues until the release of the next version. This helps to keep track of things we implemented for the changelog

How to get this feature in the next release?

Aaron-Junker commented 3 years ago

@DHowett We usally don't close issues until the release of the next version. This helps to keep track of things we implemented for the changelog

How to get this feature in the next release?

It's in master, so it should actually be in v0.45.0, but it isn't...

cc: @crutkas

jaimecbernardo commented 3 years ago

@rdeveen , It will be released in 0.47.

Aaron-Junker commented 3 years ago

We could also pack it into the experimental release

rdeveen commented 3 years ago

Release in v0.47 👍