6

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.

  • This is genius - I have the same problem. If I can solve it, I will let you know. – dgo Nov 8 '16 at 16:40
  • 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 Dec 20 '16 at 4:15
  • 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 Dec 20 '16 at 4:49
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.

  • 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 Dec 20 '16 at 6:49
  • 1
    Something 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 Dec 20 '16 at 7:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.