ViewPDF Exception
Brought to you by:
otto_mayer
Hello,
if i call RT.ViewPDF(report, "HelloWorld.pdf") I get the following exception: "The Access to the registry key HKEY_CLASSES_ROOT\AcroExch.Document\shell\Open\command is forbidden" (or similar, that's a translation).
I use Vista, Visual Studio 2008, Acrobat 8.1.2. I did not change anything relevant, but yesterday it worked ...
The registry key is existing: HKEY_CLASSES_ROOT\AcroExch.Document\Shell\Open\Command
Value: "C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe" "%1"
Ciao!
Stefan
Logged In: YES
user_id=1089438
Originator: NO
This may be a matter of preference, but I would recommend using System.Diagnostics.Process.Start(pdfFilePath) rather than looking up acrobat reader's location as this could change or the user may have a different PDF Viewer (like Foxit Reader). Process.Start will use the default application for the extension of the file.