[FileExplorer] Add PDF Thumbnail Provider for Windows Explorer (#13058)

* Add PdfPreviewHandler to build dependency of runner

* PDF Thumbnail Provider

* Remove using brackets

* Pdf Thumbnail - Settings and Unit Tests

* Removed resx

* Add PDF Thumbnail Provider binary

* Install Pdf Thumbnail Provider

* Fix pagee spelling error.

* Update Windows dependency to version 10.0.18362.0 because that is the minimal required version of the PowerToys.

* Add Pdf Preview Handler and Pdf Thumbnail Provider
This commit is contained in:
R. de Veen
2021-09-14 18:01:45 +02:00
committed by GitHub
parent 7e22f26b52
commit 7ac1e00d01
20 changed files with 487 additions and 9 deletions

View File

@@ -28,6 +28,9 @@ const CLSID CLSID_SHIMActivateSvgThumbnailProvider = { 0x9C723B8C, 0x4F5C, 0x414
// 36B27788-A8BB-4698-A756-DF9F11F64F84
const CLSID CLSID_SvgThumbnailProvider = { 0x36B27788, 0xA8BB, 0x4698, { 0xA7, 0x56, 0xDF, 0x9F, 0x11, 0xF6, 0x4F, 0x84 } };
// BCC13D15-9720-4CC4-8371-EA74A274741E
const GUID CLSID_PdfThumbnailProvider = { 0xbcc13d15, 0x9720, 0x4cc4, { 0x83, 0x71, 0xea, 0x74, 0xa2, 0x74, 0x74, 0x1e } };
// Pairs of NativeClsid vs ManagedClsid used for preview handlers.
const std::vector<std::pair<CLSID, CLSID>> NativeToManagedClsid({
{ CLSID_SHIMActivateMdPreviewHandler, CLSID_MdPreviewHandler },

View File

@@ -174,4 +174,7 @@
<data name="Prevpane_Pdf_Settings_Displayname" xml:space="preserve">
<value>PDF Previewer</value>
</data>
<data name="Pdf_Thumbnail_Provider_Settings_Description" xml:space="preserve">
<value>Pdf Thumbnail Provider</value>
</data>
</root>

View File

@@ -50,6 +50,16 @@ PowerPreviewModule::PowerPreviewModule() :
std::make_unique<RegistryWrapper>(),
L".svg\\shellex\\{E357FCCD-A995-4576-B01F-234630154E96}"));
// PDF
m_fileExplorerModules.emplace_back(std::make_unique<ThumbnailProviderSettings>(
true,
L"pdf-thumbnail-toggle-setting",
GET_RESOURCE_STRING(IDS_PDF_THUMBNAIL_PROVIDER_SETTINGS_DESCRIPTION),
L"{BCC13D15-9720-4CC4-8371-EA74A274741E}",
L"Pdf Thumbnail Provider",
std::make_unique<RegistryWrapper>(),
L".pdf\\shellex\\{E357FCCD-A995-4576-B01F-234630154E96}"));
// Initialize the toggle states for each module.
init_settings();