[Preview Handler

0 views
Skip to first unread message

Berry Spitsberg

unread,
Jun 6, 2024, 5:07:52 PM6/6/24
to ceipedsiocont

Preview handlers are called when an item is selected to show a lightweight, rich, read-only preview of the file's contents in the view's reading pane. This is done without launching the file's associated application.

Preview Handler


Download File ››› https://t.co/EMnrh5ZZgt



A preview handler is a hosted application. Hosts include the Windows Explorer in Windows Vista or Microsoft Outlook 2007. Hosts implement IPreviewHandlerFrame as a method of communication between the preview handler and the host.

Your handler is called through its IObjectWithSite, which returns an IUnknown pointer through which you request an IPreviewHandlerFrame object to interact with the host.

By default, preview handlers run in a low integrity level (IL) process for security reasons. You can optionally disable running as a low IL process by setting the following value in the registry. However, it is not recommended to do so. Systems could eventually be configured to reject any process that is not low IL.

Different preview handlers share the same process by default. Two instances of Prevhost.exe can be running simultaneously; one for handlers running as low IL processes, one for handlers that have opted out of that behavior.

As with thumbnail and property handlers, it is strongly recommended that you initialize your handler with a stream. You can initialize through a file or item if necessary, but streams provide the most secure way to implement a handler. Initialization through a stream ensures file integrity and the stability benefits to the system of running the handler as a low IL process, such as protecting the system from buffer overruns, limiting where a handler can write information, and limiting communication with other windows.

If you must initialize with a file or Shell item, store the file path or a reference to the IShellItem. Do not read data from these sources until IPreviewHandler::DoPreview is called.

In general, initialization should not do any heavy work such as composing and storing a preview image. For optimal efficiency, that sort of processing should not be done until the preview is called for.

If you have followed the recommendations to implement your preview handler as an in-process server, to debug your preview handler, you can attach to Prevhost.exe. As mentioned earlier, be aware that there could be two instances of Prevhost.exe, one for normal low IL processes and one for those handlers that have opted out of running as a low IL process.

If you do not find Prevhost.exe in your list of available processes, it probably has not been loaded at that point. Clicking on a file for a preview loads the surrogate and it should then appear as an attachable process.

If you want to force the creation of a new process for your handler rather than running under the default process, create a new subkey for your handler under AppID and set its DllSurrogate entry to "Prevhost.exe". Use that AppID subkey instead of the default Prevhost.exe AppID.

By providing a new process, the handler can avoid running under a shared process as it would do by default. This could allow you, for example, to ensure the specific version of the common language runtime (CLR) in the process. This is required if you are building a managed implementation of a preview handler.

It looks like users get the Preview Handler Surrogate Host error that you received when Windows does not release a file that it was trying to preview. This official Microsoft forum discusses how other Windows users were able to address the behavior.

A quick way to release a file that is in use is to restart your computer. If you've already saved and backed up your project file, try restarting your machine to see if this helps. If the issue persists, I'd go with Wendy's recommendation to open a case with our support team here.

The problem is caused by Microsoft PowerToys which has its own PDF previewer for windows explorer.
The solution is therefore to open powertoys settings > file explorer add-ons > turn off PDF preview in the preview pane.

The PDF preview handler for Adobe is broken and has been for a long time. Using Method #1 from the article, I set the default PDF preview handler to the Microsoft PDF preview handler and that fixed the issue. This allows you to keep Adobe as your default PDF reader but use a different preview handler.

I have always been able to view PDF's in outlook and File Explorer without opening them and then one day it stuopped working. I have done the troubleshoot items and made sure its set as the default. No updates have been done and nothing change prior to make it stop working.

Please try to turn off the protected mode for testing (Windows Only) Go to Edit > Preferences > Enhanced Security > Uncheck 'Enable Protected mode at start up' Turn off the protected mode and uncheck Enhanced Security > click OK and reboot the application and see if that works.
Note: Please turn on the security after testing to avoid any security risk

Hello -I also tried various steps posted with no success. Then, I realized my default viewer was Acrobat and not the Acrobat Reader DC application. Once I switched defaults to open in the Reader application, I was able to preview the files within mail and file-explorer as normal. I hope this helps.

We are sorry to hear that. I have translated the error message that you have posted in the screenshot and it says : Internal Error Occurred. Would you mind elaborating more about the steps you are doing that lead you to this error message?

The PDF preview on the right side of the explorer folder doesen't work and the issue " Internal Error occured" appared. It possible coud be a problem of my PC or something went wrong with the last update of Acrobate?


I'm having the same problem as mentioned above, i.e.:
1/ In Windows Explorer the message displayed in the preview window is: "This file cannot be previewed due to an error in PDF Preview Handler"
2/When clicking on a PDF file in Windows Explorer, an Adobe Acrobat message appears: "an internal error has occurred"

I still haven't found my resolution. It is noted that in File Explorer, I can no longer preview pdf files in the navigation pane, though Word documents ARE able to be previewed. This also affects my ability to print, as I use to be able to select multiple pdf files and send to the printer. PDF files dno longer work this way, though it WILL work that way with Word.

What is the version of the Acrobat DC you are using? To check the version go to Help > About Acrobat and make sure you have the recent version 22.3.20281 (Mac) or 22.3.20282 (Win) installed. Go to Help > Check for updates and reboot the computer once.

Also, try to repair the installation from the help menu (Win Only) and see if that works.

Please try to reset the Acrobat preferences as described here -discussions/how-to-reset-acrobat-preference-settings-to-defau...

Hi @PRODUCTION SAGA

Hope you are doing well and sorry for the delayed response

What is the version of Acrobat DC are you using? To check the version go to Help > About Acrobat and make sure you have the recent version 22.3.20310 installed. Go to Help > Check for updates and reboot the computer once. Also check for any missing/pending updates for Win OS and check

Please try to repair the installation from the help menu (Win Only) and see if that works.

Try to reset the Acrobat preferences as described here -discussions/how-to-reset-acrobat-preference-settings-to-defau...

You may also try to create a new test user profile with full admin rights in Win or enable the root account in MAC and try using the application there and check.

I am having the same problem with Pro 13 and Win 10 64-bit. The regsvr fix you have suggested to many who have experienced the same problem does not do anything. Could part of the problem be that there is no NitroPreviewHandler,dll in the installation folder? Also, I do not get the option to Modify to repair the program. Any other ideas?

1. Clear the content of the directory under C:\users\your_username\Appdata\local\temp. For whatever reason, not all temp files automatically remove themselves and is NOT usually caused by Nitro Pro files. Kindly note Appdata folder is hidden and to unhide it, please refer to this article -see-the-appdata-folder/

NOTE: This clean-up tool will erase any existing signature files within Nitro so please save them to another location before using the clean-up tool in order to keep them. Please see this link for backing up custom stamps/signatures:

3. Please clear all your downloads folder or delete all downloaded Nitro installers. This step is important because we noticed that if you are saving all the installers and you download them in the same folder (like the downloads folder), the EXE can pick up any MSI installer in that folder and you may pick-up one of the older builds instead of the newly downloaded package.

I noticed that one of the options on the initial installation screen was to "Install the PDF Viewer (Windows 7 only). It was checked by default. I can't say for sure, but I think when I first installed Nitro, I probably just unchecked the box thinking "I have Windows 10!" I used to be a brand manager, so I know some engineer/usability guy is thinking - Hey! that is clear isn't it? Well, if unchecking that box prevents the previewer from being installed on Windows 10 ... this silly user didn't get it the first time. ;)

795a8134c1
Reply all
Reply to author
Forward
0 new messages