Registering other formats as PDF for preview in Windows 7

6

2

According to this question and answers it is possible to view other file types as text in preview window in Windows 7.

Now I have a related case: I would like to preview AI (Illustrator) files in the preview window. Since AI files are embedded inside a PDF file, if I change the file extension to PDF, it previews nicely. It seems to me that it should be possible to register AI to use the same handler.

enter image description here

Image 1: Time capture showing how same file previews as PDF but not AI

I tried blindly setting Content Type and PerceivedType with no success even after doing a low-effort search on MSDN for a few weeks. So if anybody knows:

  • How do I figure out what handler I should use?
  • How do I register that handler for use?

However, bear in mind that I want the AI to remain for all other purposes a separate format from PDF.

joojaa

Posted 2016-03-18T13:26:12.480

Reputation: 328

This is genius - I have the same problem. If I can solve it, I will let you know. – dgo – 2016-11-08T16:40:01.470

From user An a Student: "PDF-document" is not just a "text". PDF-preview is an image (or interactive Reader-like child-window) that have been rendered by dll-library of Adobe. so ... You have got a couple of AI files. Some of them have PDF inside. You would like to view that files as PDF in the preview. Right? It seems registry-editing could be not enough. Looks like you have to write your own dll-file with handler. You can use Delphi or something. Can you give me some example-files of "* .ai"? I can try to help you.

– fixer1234 – 2016-12-20T04:15:44.407

No its the other way around the ai specific data is inside a PDF. All of them are PDF files as the native ai is a PDF. @fixer1234 but it allready works if i rename the file a PDF so the dll is already in place. All i need to do is tell that dll to also handle .ai files in addition to PDF. – joojaa – 2016-12-20T04:49:35.910

Answers

2

Try copy same values that is into:

\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.pdf\*

For example:

\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.ai\

(default) = AcroExch.Document
Content Type = application/pdf

\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.ai\ShellEx\{8895b1c6-b41f-4c1c-a562-0d564250836f}\

(default) = {49400A7C-81A8-4F52-8CCE-D54739EE87EC}

Works fine on my PC.

An a Student

Posted 2016-03-18T13:26:12.480

Reputation: 61

Yeah, your English is a little ambiguous. :-) To clarify, are you suggesting to find all of the values currently under \HKEY_LOCAL_MACHINE\SOFTWARE\Classes.pdf\ and replicate them under \HKEY_LOCAL_MACHINE\SOFTWARE\Classes.ai? – fixer1234 – 2016-12-20T06:49:21.147

1Something like that. I just ignored OpenWithList, OpenWithProgids, PersistentHandler, etc. Looks like important things is "{8895b1c6-b41f-4c1c-a562-0d564250836f}" into "ShellEx" with default "{49400A7C-81A8-4F52-8CCE-D54739EE87EC}" and default "AcroExch.Document" of ".ai". I think this values may be differ in different OS. Best idea is copying them from ".pdf". We are lucky that it did not check the file extension. Otherwise we'll had to create a dll. – An a Student – 2016-12-20T07:08:14.630