Can I temporarily set a WebBrowser control's Internet Options to display PDFs in the Browser?

StackOverflow https://stackoverflow.com/questions/4379082

Pergunta

We have a client at work that uses an ancient tool to preview PDFs so they can enter data from the PDF into a database. I recently rewrote this in C# because there were compatibility issues with the ancient plug-ins we were using for the preview.

Deciding that I'd rather let Microsoft and Adobe deal with compatibility issues I used a WebBrowser control to show the PDFs because I knew you could open the file directly in the browser and if I restricted the Browser to opening only files on the client's file-system and only files ending with '.pdf' it should be relatively safe.

Is there was a way to temporarily (for just the WebBrowser control's instance) enable "Display PDFs in Browser" from the Internet Options. The client is ok with their employees enabling it themselves, but I think it's probably safer for them to leave it at the company-default of "Don't display".

Foi útil?

Solução

That's an Acrobat Reader setting, not an Internet Options setting. Edit + Preferences, Internet. I'd guess that it is buried somewhere in the registry.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top